Re: to_template filter

2008-04-01 Thread glopglop
On 31 mar, 18:44, peschler <[EMAIL PROTECTED]> wrote: > Your "to_template" tag does what inclusion tags are for (not the {% > include %} tag!). > Fine, I forgot about those. Just one thing, though : this tag only has to be defined once. After that it's only html templating, no python. This inclu

to_template filter

2008-03-31 Thread glopglop
Hi, here is a simple filter I use sometimes when I want to templatize the presentation of a given model through several pages, such as a paagraph showing a person the same way in several pages, without resorting to inclusion (not always the same obnject name, could be included in a loop, ..) or g

Re: managers vs static/class methods ?

2008-02-21 Thread glopglop
On 20 fév, 17:07, Michael Elsdörfer <[EMAIL PROTECTED]> wrote: > > I understand you could also reuse it from model to model, but in my > > code I have rarely found reusing those methods between different > > models, except some ways that would generally be better solved with > > model inheri

Re: managers vs static/class methods ?

2008-02-21 Thread glopglop
Fine, it's clearer for me now (with the added smart examples). "The distinguishing factor between manager methods and class or static methods should be the database. Managers handle table-wide operations ; Python- level operations don't know anything about a database at all." Maybe a sentence li

Missing Documentation cross-reference to shortcuts ?

2007-11-13 Thread glopglop
A lookup on google shows that the page http://www.djangoproject.com/documentation/shortcuts/ isn't linked from anywhere on the documentation (and the site), and I had to search it to find it. (see http://www.google.com/search?hl=fr&c2coff=1&q=link%3Ahttp%3A%2F%2Fwww.djangoproject.com%2Fdocumenta