Google AppEngine Login Decorator
A decorator for Django apps running Google AppEngine that requires a user to be authenticated.
- authentication
- appengine
A decorator for Django apps running Google AppEngine that requires a user to be authenticated.
Creates a template tag called "split_list" which can split a list into chunks of a given size. For instance, if you have a list 'some_data', and you want to put it into a table with three items per row, you could use this tag: {% split_list some_data as chunked_data 3 %} Given a some_data of [1,2,3,4,5,6], the context variable 'chunked_data' becomes [[1,2,3],[4,5,6]] This is useful for creating rows of equal numbers of items. Thanks to the users of #django (pauladamsmith, Adam_G, and ubernostrum) for advice and pointers, thanks to Guyon Morée for writing the chunking recipe that this tag is based on.
Sometimes you'll have a list of ORM objects that aren't in a QuerySet, but you still want to sort them by date. For instance, you have a list of shows with a date_time attribute. Maybe you used a list comprehension to filter them...who knows. Regardless, you have a list (not a QuerySet) of Django objects.
cmcavoy has posted 3 snippets.