若干django使用的笔记,以后应该会继续更新吧...
1、setting.py里面的
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
MEDIA_ROOT = os.path.join(PROJECT_PATH,'media')
2、创建项目相关
python django-admin.py startproject thepj
python manage.py runserver
python manage.py startapp theapp
3、模板引入相关
{% include "thedir/nav.html" %}