In your case the list comprehensions probably made it more readable. In
other cases list comprehensions can make things less readable (I'm guilty of
doing this sometimes). I thought maybe you were using brackets as I did that
too the first time I wrote a template.
Dave
On Jan 10, 2008 11:28 AM, M
Thanks for your suggestions. I have managed to get rid of my
get_entries_list() and pass queryset directly to the template. I made
the mistake of using {{ entry.get_absolute_path() }} instead of {{
entry.get_absolute_path }} in the templates. I've also rewritten a lot
of for loops into list compre
I think you should be able to access the query sets directly in your
template. Not sure why that didn't work for you.
Here they pass a queryset to render_to_response:
http://www.djangoproject.com/documentation/tutorial03/#a-shortcut-render-to-response
Put a loop in your template and then access a
Just off the top, it looks like the get_all_tags function could be re-
written as a list comprehension. As for the more django oriented
stuff, I'll leave that to the pros.
On Jan 10, 7:12 am, "Matic Žgur" <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> being new in Django, I'd like to ask you for
Hi everybody,
being new in Django, I'd like to ask you for some tips about what
should be in views.py and what shouldn't be.
I'm writing a blog app with custom views.py. I know that it would be a
lot easier (and wiser) to use generic views for what I'm trying to
accomplish, but I'd like to learn
5 matches
Mail list logo