标签:cut dex url common exec conf middle world import
from django.http import HttpResponse from django.conf.urls import url from django.conf import settings import sys settings.configure( DEBUG = True, SECRET_KEY = "HAHA", ROOT_URLCONF = __name__, MIDDLEWARE_CLASSES = ( ‘django.middleware.common.CommonMiddleware‘, ‘django.middleware.csrf.CsrfViewMiddleware‘, ‘django.middleware.clickjacking.XFrameOptionsMiddleware‘, ), ) def index(request): return HttpResponse("hello world") urlpatterns = ( url(r‘^$‘,index), ) if __name__ == ‘__main__‘: from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
标签:cut dex url common exec conf middle world import
原文地址:http://www.cnblogs.com/Erick-L/p/7644869.html