There's no reason, apart from the fact that I feel like I'm repeating
myself in the views. I'm thinking template tags, because the template
inheritance tree has to be specified in the templates. Therefore it is
the only place to load necessary context variables without having to
repeat the inherit
Sam,
Am I missing something, or is there a reason you don't just factor out
the common bits into a function or set of functions in views.py, or a
library it imports?
For a couple of simple things we do on multiple sites (e.g. we do
friendly names including Title and Suffix etc, from data in the
Thanks, Panos. Just took a quick look - the settings context processor
is useful, but still requires explicit addition into each view using
that template.
The generic_content tags fit my examples, and probably for most use-
cases, but I don't know... I'm not comfortable in putting logic that
spec
Check out Django Template Utils[1], it will probably fit your needs.
[1] http://code.google.com/p/django-template-utils/
On Dec 29, 5:42 pm, Sam Lai <[EMAIL PROTECTED]> wrote:
> Thanks Alex and hedronist. I'm leaning towards creating a generic
> template tag that loads template context processor
Thanks Alex and hedronist. I'm leaning towards creating a generic
template tag that loads template context processors to do this (I
don't have the complicated needs you had hedronist... as far as I
know).
I was just wondering if there was a 'best-practice' way of doing this;
looks like creating t
HOMEPAGE: http://www.brandedsite.com
CONTACT: [EMAIL PROTECTED]
PAYMENT: Western Union / Bank of china / paypal
We are a proffesional asian wholesaler of --wholesale cheap
Nike Sneakers: Air Force One,Air Jordans1-22,
Jordan2.2,Jordan2.5,3.5,4.5,
6.5,7.5,13.5,15.5,21.5
> The other approach I've seen from James Bennett's blog, is to create a
> template tag to retrieve model data generally. This works too, but it
> feels like it's more legwork that should be required.
We ran into this problem on a site we just launched. We tried several
approaches but ultimately
I use inclusion template tags. It is very easy and following DRY
principle. And tags may be cached independently.
On 28 дек, 10:26, Sam Lai <[EMAIL PROTECTED]> wrote:
> New django user here, so if this has been covered already, I'd
> appreciate a pointer to the right thread.
>
> I've been plannin
New django user here, so if this has been covered already, I'd
appreciate a pointer to the right thread.
I've been planning and building my app lately, and it's been quite a
nice experience so far; django seems very well designed and
architected.
One thing's been annoying me though. I have a bas
9 matches
Mail list logo