Re: Issue 14878 And Changeset 15133

2011-01-07 Thread Lachlan Musicman
On Fri, Jan 7, 2011 at 18:05, Gert Van Gool wrote: > Not really related to #5373, since it's related to the new generic views code. I thought it might be a stretch, not knowing enough of the underlying code, but the phrase "the verbose name of a model includes a translation string" reminded me...

Re: Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Russell Keith-Magee
On Saturday, January 8, 2011, Jacob Kaplan-Moss wrote: > On Fri, Jan 7, 2011 at 10:11 AM, Jonathan S > wrote: >> Like {% include %} and {% extends %}, I think we can include two more >> template tags in Django's defaulttags for controlling the "render >> flow". Click the links below for a usage

Re: Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Jacob Kaplan-Moss
On Fri, Jan 7, 2011 at 10:11 AM, Jonathan S wrote: > Like {% include %} and {% extends %}, I think we can include two more > template tags in Django's defaulttags for controlling the "render > flow". Click the links below for a usage example. > > > ** A {% macro %} template tag > http://paste.poco

Re: Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Horst Gutmann
On Fri, Jan 7, 2011 at 5:41 PM, Jonathan S wrote: >> Regarding the macro-tag I think the idea is valid but I'd personally >> prefer a more flexible approach regarding variables being  provided >> for the macro block. Something like Jinja's macro comes to mind where >> I can define parameters for e

Re: Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Jonathan S
> Regarding the macro-tag I think the idea is valid but I'd personally > prefer a more flexible approach regarding variables being  provided > for the macro block. Something like Jinja's macro comes to mind where > I can define parameters for each macro and then pass them in as needed Jinja's appr

Re: Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Horst Gutmann
On Fri, Jan 7, 2011 at 5:18 PM, Dougal Matthews wrote: > On Friday, 7 January 2011 at 16:11, Jonathan S wrote: > > ** And a {% decorate %} template tag: > http://paste.pocoo.org/show/316593/ > > I think they are generic enough to be included. > {% decorate %} implements a commonly used design patt

Re: Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Jonathan S
Not really. But I believe it's still pretty fast using Django's render engine. Probably about the same speed as using {% extends %} or {% include %} (By the way. We are working on a template preprocessor as well, and every {% extends %}, {% include %}, {% macro %} and {% decorate %} is preprocess

Re: Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Jonas H.
On 01/07/2011 05:11 PM, Jonathan S wrote: ** And a {% decorate %} template tag: http://paste.pocoo.org/show/316593/ +1 {% macro %} avoids the usage of external template files. I think it's not worth the overhead of using an external file, when someone has to repeat small parts of code in a te

Re: Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Dougal Matthews
On Friday, 7 January 2011 at 16:11, Jonathan S wrote: > ** And a {% decorate %} template tag: > http://paste.pocoo.org/show/316593/ > > I think they are generic enough to be included. > {% decorate %} implements a commonly used design pattern. (Also known > by XAML programmers.) It avoids the nee

Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Jonathan S
Hi all, Like {% include %} and {% extends %}, I think we can include two more template tags in Django's defaulttags for controlling the "render flow". Click the links below for a usage example. ** A {% macro %} template tag http://paste.pocoo.org/show/316592/ ** And a {% decorate %} template ta

Re: User model being included by default

2011-01-07 Thread Subhranath Chunder
Firstly, I think this should be posted to the django-us...@googlegroups.comgroup instead. So, just make sure to post queries on using Django to there only. Coming back to your question. If you are using your own user model then, I hope you are using the not using the import 'from django.contrib.a