Skip to content

Instantly share code, notes, and snippets.

@eknuth
Created October 15, 2011 19:04
Show Gist options
  • Save eknuth/1289991 to your computer and use it in GitHub Desktop.
Save eknuth/1289991 to your computer and use it in GitHub Desktop.
add this to your settings file
import os
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(SITE_ROOT, 'templates')
)
url(r'^$', 'om.views.home', name='home'),
from annoying.decorators import render_to
@render_to('hero.html')
def home(request):
return {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment