Skip to content

Instantly share code, notes, and snippets.

@robrocker7
Created September 7, 2012 16:00
Show Gist options
  • Save robrocker7/3667406 to your computer and use it in GitHub Desktop.
Save robrocker7/3667406 to your computer and use it in GitHub Desktop.
example custom view
def index(request):
ctx = {}
ctx['page_name'] = 'index'
ctx['pages'] = ['index']
latest_news = Article.objects.order_by('-date_created')[:3]
ctx['latest_news'] = latest_news
return simple_dtt(request, 'index.html', ctx)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment