On 2005-12-01, at 19:44 CET, Robert Wittams wrote:
All beyond here is a hack!
=
I think the least bad monkey patch you could do is probably the
following (untested):
def add_thumbnailing(_post_save = None, _post_delete = None):
def new_postsave(self):
th
Hi all,
I originally posted this in django-users as the tail end of a longer
discussion, but in retrospect, this is probably a better forum.
I have been looking at the code for function_get_sql_clause() recently
while working on a patch for quoting behaviour for subselects in
"tables" clauses (n
I think the arguing about the color of the bikeshed thought is
mis-placed here. I'm not offering feedback, i.e. arguing that the
bikeshed is painted the wrong color, I'm offering an idea, a patch,
real code. But, I obviously didn't present my idea well enough, so I
will present it in wiki form o
Hey Brent --
Thanks for your feedback.
However, as I see it, arguing about the syntax that an ORM should use
is just a rehashing of the argument over what color to paint the
bikeshed (http://www.unixguide.net/freebsd/faq/16.19.shtml). The
fact is that there's a serious mismatch between p
Alright, I'll get up a ticket as soon as I can.
Yes, it is a little ugly. I would suggest that you put the Q arguments
outside of your query for readability (also for those 'subqueries' you
were talking about):
hello = Q(headline__startswith='Hello')
bye = Q(headline__startswith='Goodbye')
articles.get_list(complex=(hello | goodbye))
As usual,
Brant Harris wrote:
>
> SQL:
> SELECT * FROM `documents` WHERE ((something > 2 AND other < 4 AND
> other LIKE 'hi%') OR (something < 4))
>
> I've coded this out completely, so it's not a pipe-dream. If there is
> more interest I can provide such code.
>
It'd be interesting to look at. I for
I've read it. I think the author is under false impression that ORM is
supposed to provide better/simpler alternative to SQL. It is not the goal of
ORM. ORM is about bridging SQL with systems written in conventional computer
languages. Usually it is assumed that the system is OO-based, hence O
Jonathan Ellis left a pretty brutal attack about Django's ORM on his
blog today that I picked up from Planet Python, and I got to thinking
about it. I don't quite agree with him on many of his points. But I
did agree that the OR syntax, as it stands, is rather ugly.
So I was trying to think of
I'd like to have a go at creating a fix for ticket #714: access to id
of current user on admin.
I have no idea what I'm doing though. Could anyone offer some
guidance on how I might go about solving this problem?
Afternoon, man about the Internet -- http:
Great, thanks.
On 1 Dec 2005, at 20:27, Wilson wrote:
Here's the ticket you're looking for:
http://code.djangoproject.com/ticket/61
Afternoon, man about the Internet -- http://aftnn.org/
An event system is a great idea! If we could tie it into AJAX there are
some pretty amazing things that we could do.
-rob
Here's the ticket you're looking for:
http://code.djangoproject.com/ticket/61
Robert Wittams wrote:
> Amit Upadhyay wrote:
> >
> > I am confused as to what really do you mean by event system?
> Most likely candidate is pydispatcher :
> http://pydispatcher.sourceforge.net/
>
> That'll get you the idea of the functionality, but the specific
> implementation is a post 1.0 deba
Hi,
After the move to SHA-1 there was a conversation on django-users
about the admin interface not being able to generate passwords for
new users.
http://groups.google.com/group/django-users/browse_thread/thread/
9fab7fbc34c1575/1dc5c952d8c094cf?rnum=1#1dc5c952d8c094cf
Are there any pl
Nebojša Đorđević - nesh wrote:
>
> On 2005-12-01, at 16:16 CET, Robert Wittams wrote:
>
>>
>>> And for the current trunk, is there any way (other than changing
>>> __init__.py) to me to hook-up with the model delete method?
>>
>>
>> Not from a field really other than evil monkey patching tactics
On 2005-12-01, at 16:16 CET, Robert Wittams wrote:
And for the current trunk, is there any way (other than changing
__init__.py) to me to hook-up with the model delete method?
Not from a field really other than evil monkey patching tactics, IIRC.
Because I don't want to keep a separate d
On 2005-12-01, at 18:57 CET, Nebojša Đorđević - nesh wrote:
OK, but can we make more thumbnails of different sizes from one image
simultaneously?
Thumbnails are generated on the first request from template (i.e
). You can pre-
generate some sizes in model _post_save if you want.
OTOH i
On 2005-12-01, at 18:52 CET, Nebojša Đorđević - nesh wrote:
Details follows
I forgot. Just unpack .zip somewhere in your PYTHONPATH to use it.
---
Nebojša Đorđević - nesh
Studio Quattro - Niš - SCG
http://djnesh.blogspot.com/ | http://djnesh-django.blogspot.com/
Registered Linux User 2821
On 2005-12-01, at 18:20 CET, Radek Svarz wrote:
OK, but can we make more thumbnails of different sizes from one image
simultaneously?
Thumbnails are generated on the first request from template (i.e src="{{ url|thumbnail:"width=100" }}" />). You can pre-generate some
sizes in model _post_sa
> thumbnails to make things more general. Thumbnails are saved in the
> same directory as a original file with following filename pattern:
OK, but can we make more thumbnails of different sizes from one image
simultaneously?
And can we add options for image decorations? (shadow, watermark, etc.
t
On 2005-12-01, at 17:52 CET, Radek Svarz wrote:
I've realized that this is becoming quite a pattern. Would this
correlate with your approach?
Well, no. I deliberately choose not to have any predefined size for
thumbnails to make things more general. Thumbnails are saved in the
same direct
>My main question was, are these changes things that people are
>interested in?
I am.
bye, Georg
Hi,
We have been using xt:Commerce for a while and I realized quite nice
approach to organize images. There are several subfolders of media for
product images, like follows:
product_images/original_images
product_images/thumbnail_images
product_images/info_images
product_images/popup_images
wher
Amit Upadhyay wrote:
> On 12/1/05, Robert Wittams <[EMAIL PROTECTED]> wrote:
>
>>
>>Nebojša Đorđević - nesh wrote:
>>
>>>IMHO some type of event system should definitely go in 1.0. Can we add
>>>this to VersionOneFeatures?
>>
>>I wouldn't mind personally, but I think that at some point we have t
So, I was messing around with the template parser a bit.
I came up with this functionality:
Stick:
{%load valid%}{%assure well-formed%}
...blah blah xml...
{%endassure%}
Within the assure block, text is checked for well-formedness by running
it through Expat. Parse errors are translated back
On 2005-12-01, at 16:40 CET, PythonistL wrote:
Please let know the Django community when you are finished with that.
First version is attached to #961, it requires to patch django
because that is the only way for me to add some "magic" into model
delete method (see save/delete/etc hooks f
Please let know the Django community when you are finished with that.
Any timeline?
Regards,
Lad.
On 2005-12-01, at 16:16 CET, Robert Wittams wrote:
And for the current trunk, is there any way (other than changing
__init__.py) to me to hook-up with the model delete method?
Not from a field really other than evil monkey patching tactics, IIRC.
That's I'm afraid off ;) . So I must keep a
On 12/1/05, Robert Wittams <[EMAIL PROTECTED]> wrote:
Nebojša Đorđević - nesh wrote:>> IMHO some type of event system should definitely go in 1.0. Can we add> this to VersionOneFeatures?I wouldn't mind personally, but I think that at some point we have to
draw a moratorium on 1.0 features - and th
Nebojša Đorđević - nesh wrote:
>
> IMHO some type of event system should definitely go in 1.0. Can we add
> this to VersionOneFeatures?
I wouldn't mind personally, but I think that at some point we have to
draw a moratorium on 1.0 features - and that point has passed. 1.0 will
not be the end of
Hi,
after thinking a bit more and reading the comments on the thread, I
think I have a useful proposal for this stuff:
- we define a view function that sends out a JavaScript file based on
.mo/.po files. This view uses the same routines that are used by django
itself. To build the message files,
On 2005-12-01, at 14:12 CET, Robert Wittams wrote:
I have a private branch here ( mutually-referential) that does a
bit of
this kind of stuff. It removes "most" of the dastardly special
casing in
meta/__init__.py . I will submit it as a ticket - it still has a few
problems but it would be g
[EMAIL PROTECTED] wrote:
> Hi,
>
> What about smarter cache system? I mean update not only by time-out,
> but also by a DB change.
>
> In a news sites it will be especially usefull: content can update not
> only each 'xxx' minutes, but it can also update by content
> addition/edit/deletion.
>
>
Nebojša Đorđević - nesh wrote:
>
> While I'm working on my custom ImageWithThumbnailsField I hit some
> serious obstacles:
>
> 1. No chance to attach any information to model when field is created,
> I added following (patch-like):
> --- ../django/django/core/meta/__init__.py (revision 15
2005/12/1, Nebojša Đorđević - nesh <[EMAIL PROTECTED]>:
And about thumbnails, well, I'm trying to automate this so you willjust need to ask for thumbnail of required size and it will be auto-magically generated for you (PIL is required), same with objectdeletion.
Nice! Amazing how things are going
While I'm working on my custom ImageWithThumbnailsField I hit some
serious obstacles:
1. No chance to attach any information to model when field is
created, I added following (patch-like):
--- ../django/django/core/meta/__init__.py (revision 1522)
+++ ../django/django/core/meta/__init
On 2005-12-01, at 11:24 CET, PythonistL wrote:
Do you have a good experience with ImageField ?
I will have to use images in my app. too but not sure about ImageField
.
I am thinking about having an extra integer field that has the same
number as a picture. The picture will be stored separatel
Hi Neboja,
Do you have a good experience with ImageField ?
I will have to use images in my app. too but not sure about ImageField
.
I am thinking about having an extra integer field that has the same
number as a picture. The picture will be stored separately from the
database and and also a thu
I'm forgot to mention that I'll make a new ImageThumbnailField (as a
ImageField subclass) witch will implement all of the my proposals
including all of the tags/filters required to make this work.
This way I can experiment with thumbnail generation without
disturbing main trunk.
---
Neb
On 1-12-2005, at 7:31, [EMAIL PROTECTED] wrote:
So, are you interested in PHP realization with main idea explained?
Yes
---
Nebojša Đorđević - nesh
Studio Quattro - Niš - SCG
http://djnesh.blogspot.com/ | http://djnesh-django.blogspot.com/
Registered Linux User 282159 [http://counter.li.o
As discussed in http://code.djangoproject.com/ticket/961 and also
referenced in http://code.djangoproject.com/ticket/674 and http://
code.djangoproject.com/ticket/425:
Original proposal by [EMAIL PROTECTED]:
There was some discussion about this in #425 and #674. Attached is
a patch that
42 matches
Mail list logo