Making models validation-aware

2006-01-21 Thread Adrian Holovaty
I've been messing with manipulator code in magic-removal, and it struck me that we could avoid a lot of the boilerplate, cruft and newbie confusion by making models validation-aware. Example: class Poll(Model): pub_date = DateTimeField() question = CharField(maxlength=30)

Re: magic-removal admin URLs / model names: singular or plural?

2006-01-21 Thread Adrian Holovaty
On 1/21/06, Tom Tobin <[EMAIL PROTECTED]> wrote: > I opened ticket [1259] as it seems that there's a mismatch in > magic-removal between aspects of the admin interface regarding model > names being referenced as singular or plural. I believe there was > recent discussion on standardizing to singu

magic-removal admin URLs / model names: singular or plural?

2006-01-21 Thread Tom Tobin
I opened ticket [1259] as it seems that there's a mismatch in magic-removal between aspects of the admin interface regarding model names being referenced as singular or plural. I believe there was recent discussion on standardizing to singular model names; if someone can confirm which way this is

Re: Bulk delete - lets try this again...

2006-01-21 Thread Russell Keith-Magee
On 1/21/06, hugo <[EMAIL PROTECTED]> wrote: > So I am +1 on that change, I've attached an alternate version of the patch that implements this idea. In this version, the object instance defers to the default manager for delete functionality. This removes the duplication of SQL delete logic, but

how to set title/description for items in rss

2006-01-21 Thread Amit Upadhyay
Hi,I am trying to generate RSS feeds using Django, and followed the documentation, but am not able to figure out how to specify title and description for individual items. Right now Django is using the string representation of item objects. My feeds are "complex feed" as per documentation, I tried

Re: help with custom tag plus custom filter

2006-01-21 Thread imbunche
Thanks for your reply, that means my tag implementation is wrong :-( ... Then, how can I resolve the variable name inside the tag implementation?? I'd like to invoke the tag like: {% imgpath /static/images/ %} ... and are variables. It looks like it can not be supported ... I hope I'm wrong.

Re: help with custom tag plus custom filter

2006-01-21 Thread Adrian Holovaty
On 1/21/06, imbunche <[EMAIL PROTECTED]> wrote: > The custom filter and the custom tag mentioned above work fine by > themselves, it also works if I use any standard filter like upper or > lower but if I use: > > {% imgpath {{myimg | thumb}} %} The syntax is slightly off in that example. You'll w

Re: filter are not inherited [BUG??]

2006-01-21 Thread Adrian Holovaty
On 1/21/06, imbunche <[EMAIL PROTECTED]> wrote: > Thanks a lot for the prompt response. > I think this feature is a bit counterintuitive may be it should be > noted in the documentation. Good call. I've added a "Custom libraries and template inheritance" section to the template docs: http://www.

Re: filter are not inherited [BUG??]

2006-01-21 Thread imbunche
> This is a feature -- each template that uses custom tags or filters > needs to load them explicitly. > > Adrian Thanks a lot for the prompt response. I think this feature is a bit counterintuitive may be it should be noted in the documentation. thx again. Saludos, IvO

help with custom tag plus custom filter

2006-01-21 Thread imbunche
Hi, I have a tag (called imgpath) which creates the renders the tag with the image passed as argument and verifies the file exists or provides some defaults ... that works fine. Notice that the argument to {%imgpath%} can be a template variable, e.g. {% imgpath {{baseurl}}/images/{{myimage}} %}

Re: filter are not inherited [BUG??]

2006-01-21 Thread Adrian Holovaty
On 1/21/06, imbunche <[EMAIL PROTECTED]> wrote: > I would have imagine that an inherited template has access to the same > set of filters/customtags than the parent template. > > Is this a feature or a bug?? in any case the documentation should make > it clear. > Can someone clarify??. Should I su

filter are not inherited [BUG??]

2006-01-21 Thread imbunche
Hi, I notice that if I load my set of filters in my base view (base.html) and then try to use any of those filter in any template that {% extends %} base the filter are not available (not recognized) leading to the error page. I would have imagine that an inherited template has access to the sam

Re: dot can't match in url configuration

2006-01-21 Thread Antonio Cavedoni
Hey Chris, On 21 Jan 2006, at 15:30, [EMAIL PROTECTED] wrote: The default django url configuration system seems does not allow url with "dot", i.e. I need url like "http://mysite.com/user/ favorate/web2.0", but this url con't match any url configuration even I use following config: (r'^us

dot can't match in url configuration

2006-01-21 Thread [EMAIL PROTECTED]
Hi guys. The default django url configuration system seems does not allow url with "dot", i.e. I need url like "http://mysite.com/user/favorate/web2.0";, but this url con't match any url configuration even I use following config: (r'^user/favorate/(?P.*)$', 'test.fav.index'), Any suggestion?

Re: Bulk delete - lets try this again...

2006-01-21 Thread hugo
>However, it would >mean moving some model logic into the manager, making Model.delete() >defer to the manager to collate and remove objects. Would this rub >anyone the wrong (or right) way? Actually I think sooner or later we will need objects to keep track of the manager they came from - for ex

Re: SQL Referential Integrity (WAS: Bulk delete? on django-users)

2006-01-21 Thread Amit Upadhyay
On 1/21/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: Yes, this means that people with MySQL 3/4 databases will need toupgrade or choose another database. But why should we spend so muchtime and effort writing, testing, and debugging a reimplementation ofreferential integrity in Django simply

Bulk delete - lets try this again...

2006-01-21 Thread Russell Keith-Magee
Hi guys Ok, lets try this one again. I've attached (but not committed) a patch for bulk delete in magic-removal (Ticket #1219). Issues worth note: - pre-delete/post-delete signals are sent for all deleted objects. This could turn into a bit of a signal flood if you delete a lot of objects, or