标签:lin world deb test core str for comm sys
==================hello.py=================================
import sys
from django.conf import settings
from django.http import HttpResponse
from django.conf.urls import url
from django.core.management import execute_from_command_line
settings.configure(
DEBUG=True,
SECRET_KEY=‘onlyfortest‘,
ROOT_URLCONF=name,
)
def index(request):
return HttpResponse(‘Hello World‘)
urlpatterns = (
url(‘^$‘, index),
)
if name == "main":
execute_from_command_line(sys.argv)
========================================================
运行命令:
python hello.py runserver
标签:lin world deb test core str for comm sys
原文地址:https://www.cnblogs.com/ht1947/p/9262243.html