Last active
August 29, 2015 14:21
-
-
Save dvl/8237f4e2f2668148f09d to your computer and use it in GitHub Desktop.
mininal Django app
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
# -*- coding: utf-8 -*- | |
from django.conf import settings | |
settings.configure( | |
DEBUG=True, | |
SECRET_KEY='th1s_1s_s3cr37', | |
ROOT_URLCONF=__name__, | |
) | |
from django.http import HttpResponse | |
def index(request): | |
return HttpResponse('Hello World') | |
from django.conf.urls import url | |
urlpatterns = ( | |
url(r'^$', index), | |
) | |
if __name__ == '__main__': | |
import sys | |
from django.core.management import execute_from_command_line | |
execute_from_command_line(sys.argv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment