django restfull centos6.5 x86_64 python2.7

mkdir tutorial
cd tutorial

 virtualenv env
 source env/bin/activate
 
pip2.7 install django
pip2.7 install djangorestframework
pip2.7 install ipython 
yum install ncurses-devel 
pip2.7 install Readline 

 yum install sqlite-devel
 #重新编译Python 
#django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3
 cd Python2.7.8 
#不用./configure
 make 
 make install  

django-admin.py startproject tutorial  .
cd tutorial
django-admin.py startapp quickstart
cd ..
cd .


#第一次,请同步到数据库 
python2.7 manage.py migrate


#建立超级用户
python2.7    manage.py    createsuperus
#建立用户admin 密码:admin





摘自: http://www.django-rest-framework.org/tutorial/quickstart/#serializers


你可能感兴趣的:(django,python2.7,restfull,centos6.5,x86_64)