Last active
April 12, 2020 16:53
-
-
Save nsmgr8/6734519 to your computer and use it in GitHub Desktop.
The minimal django hello world! However, never, ever, NEVER write such code. Always modularise your code and follow the popular/de-facto/standard convention.
This file contains hidden or 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
from django.conf.urls import url | |
from django.http import HttpResponse | |
DEBUG, ROOT_URLCONF, SECRET_KEY = True, __name__, '.' | |
urlpatterns = url('', lambda _: HttpResponse('Hello world')), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run with django dev server as follows:
PYTHONPATH=. django-admin runserver --settings=djhello