Skip to content

Instantly share code, notes, and snippets.

@yaanno
Created January 17, 2010 15:33
Show Gist options
  • Save yaanno/279416 to your computer and use it in GitHub Desktop.
Save yaanno/279416 to your computer and use it in GitHub Desktop.
# in my django template
# instead of this:
article_list = [
<Article: Images and frames>,
<Article: Rich media in your prezi>,
<Article: The Prezi Workflow>
]
# lemme have this:
article_list = [
{'title': 'Images and frames', 'body': 'How nice'},
{'title': 'Rich media in your prezi', 'body': 'Mucho better'},
{'title': 'The Workflow', 'body': 'Awsom'},
]
# normally we have more detailed structures, its just an example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment