Just one word: wow!
Yes, definitely I'm gonna dig into it :)
On Dec 20, 2:34 am, Ethan Jucovy wrote:
> Lately I have really liked using custom template tags for these sorts of
> queries.
>
> Once you get the hang of writing them, it's very quick to build a little
> library of queries in custom t
Lately I have really liked using custom template tags for these sorts of
queries.
Once you get the hang of writing them, it's very quick to build a little
library of queries in custom tags for your application. These are *very*
convenient to use because you don't have to modify views.py -- or any
@Brian
Thank you very much for clear explanation!
I gives me much more than enormous pages of manuals.
@Itay
Thanks for suggestion, but refractoring inside views.py looks more
clear to manage.
I wasn't also sure, if such simple solution requires middleware
involved. I will probably have
more than
Osiaq wrote:
> def services(request):
> property = Property.objects.all().order_by('name')[:4]
> city = City.objects.all()
> category=PropertyCategory.objects.all()
> status=PropertyStatus.objects.all()
> return render_to_response('website/services.html',{'property':
>
i'm quite a noob myself but my best guess is to use context processor,
see
http://stackoverflow.com/questions/557460/django-having-middleware-communicate-with-views-templates
On Sat, Dec 19, 2009 at 8:14 PM, Osiaq wrote:
> VIEWS:
>
> def services(request):
> property = Property.objects.
VIEWS:
def services(request):
property = Property.objects.all().order_by('name')[:4]
city = City.objects.all()
category=PropertyCategory.objects.all()
status=PropertyStatus.objects.all()
return render_to_response('website/services.html',{'property':
property
6 matches
Mail list logo