摘要:
1.首先创建一个工程newsnsdjango-admin.py startproject newsns在工程目录下新建一个文件夹templates,在settings.py文件中对该模版路径进行配置: 1 import os 2 3 ROOT_DIR = os.getcwd() 4 5 6 TEMPLATE_DIRS = ( 7 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". 8 # Always use forward slashe 阅读全文