Skip to content

Instantly share code, notes, and snippets.

@otykhonruk
Last active January 5, 2018 09:16
Show Gist options
  • Save otykhonruk/c112e41e71f398b126a9c2453bd3656c to your computer and use it in GitHub Desktop.
Save otykhonruk/c112e41e71f398b126a9c2453bd3656c to your computer and use it in GitHub Desktop.
Example of minimal fully-functional django project.
from django import conf, http, urls
conf.settings.configure(
DEBUG = True,
ROOT_URLCONF = __name__
)
def index(request):
return http.HttpResponse('hello')
urlpatterns = [
urls.path('', 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