Created
March 18, 2019 03:35
-
-
Save gh640/9caa88fd5c700ac4250460b9f690c3a0 to your computer and use it in GitHub Desktop.
Minimal Django project for django 2.1.x
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
"""Minimal Django project for django 2.1.x. | |
This code is mostly borrowed from http://shop.oreilly.com/product/0636920032502.do . | |
""" | |
import sys | |
from django.conf import settings | |
from django.http import HttpResponse | |
from django.urls import path | |
settings.configure(DEBUG=True, ROOT_URLCONF=__name__) | |
def index(request): | |
return HttpResponse('Hello World') | |
urlpatterns = (path('', index),) | |
if __name__ == '__main__': | |
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