Created
April 18, 2014 07:48
-
-
Save reorx/11030100 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
BASE_PATH = os.path.dirname(__file__) | |
from django.conf import settings | |
from django.conf.urls import patterns, url | |
from django.core.management import execute_from_command_line | |
from django.shortcuts import render | |
settings.configure( | |
DEBUG=True, | |
SECRET_KEY='placerandomsecretkeyhere', | |
ROOT_URLCONF=sys.modules[__name__], | |
TEMPLATE_DIRS=( | |
os.path.join(BASE_PATH, 'templates'), | |
), | |
) | |
def index(request): | |
return render(request, 'index.html', {'request': request}) | |
urlpatterns = patterns('', | |
url(r'^$', index, name='index'), | |
) | |
if __name__ == "__main__": | |
execute_from_command_line(sys.argv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment