「筆記」Django 從架設到產生出API
自己寫的另一份教學
https://gist.github.com/Jakevin/71551339eec3351d85ee
五分鐘弄好Django在 AWS上
http://www.nickpolet.com/blog/deploying-django-on-aws/1/
Django 基本教學
http://daikeren.gitbooks.io/django_tutorial/content/index.html
Django 初級教學
http://daikeren.github.io/django_tutorial/
ADMIN CSS 如果不顯示
http://www.ycshao.com/?p=898
http://stackoverflow.com/questions/4420378/why-my-django-admin-site-does-not-have-the-css-style
SQL後台改善
http://blog.xuite.net/chaoyee/blog/23831427-Django+%E5%AE%89%E8%A3%9D%E5%8F%8A%E5%AF%A6%E4%BD%9C%E7%AD%86%E8%A8%98(%E4%B8%80)
Django製作API
https://github.com/tomchristie/django-rest-framework
http://www.weiguda.com/blog/18/
備註:出過問題
1. unable to open database file
解:chmod -R 777 db路徑
2.找不到模組時
//預設
export DJANGO_SETTINGS_MODULE = django.conf.global_settings
//建立好testproject專案後
export DJANGO_SETTINGS_MODULE=testproject.settings
常用指令
sudo shutdown -r now
/usr/local/lib/python3.4/dist-packages/django/bin/django-admin.py
python3 -m venv venv/testproject or deactivate
source venv/testproject/bin/activate
pip3 install django
django-admin startproject testproject
//預設
export DJANGO_SETTINGS_MODULE = django.conf.global_settings
//建立好testproject專案後
export DJANGO_SETTINGS_MODULE=testproject.settings
global_settings.py
python3 manage.py runserver
python3 manage.py startapp trips
python3 manage.py startapp excuse
python3 manage.py makemigrations
python3 manage.py migrate
tail -f /var/log/apache2/error.log
apachectl -k restart
提醒
本站內容即日起將轉到另一站上轉跳~