Skip to content

Instantly share code, notes, and snippets.

@eknuth
Created October 15, 2011 19:08
Show Gist options
  • Save eknuth/1289996 to your computer and use it in GitHub Desktop.
Save eknuth/1289996 to your computer and use it in GitHub Desktop.
from annoying.decorators import render_to
@render_to('hero.html')
def home(request):
return {}
@ikirigin
Copy link

You can get away with not having a view at all with directly loading the template from urls.py. Add this to your url patterns:

url(r'^hero$', 'django.views.generic.simple.direct_to_template', {'template':'hero.html'}),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment