Python Lover(5)Django REST Framework

Python Lover(5)Django REST Framework

 
Upgrade the version to latest 1.7.5
> python3 -V
Python 3.4.1
 
> python -V
Python 2.7.8
 
Install the django on latest python 
> sudo python3 setup.py install
> python -c "import django;print(django.get_version())"
1.7.5
 
 
Deploy that project
>sudo apt-get install gunicorn
>sudo apt-get install python-pip
>sudo easy_install --upgrade pip
>apt-get install python3.4-dev
>sudo apt-get install python-dev
 
>sudo pip install greenlet
>sudo pip install eventlet
>sudo pip install gevent
 
Install Django
Install both
> sudo python setup.py install
 
generate the static files
> python manage.py collectstatic
 
Command this is working
> gunicorn easypoll.wsgi:application --bind=0.0.0.0:8888
 
This kind of command is not working
> gunicorn easypoll.wsgi:application -c gunicorn.py.ini
 
I will try later with other version.
 
References:
Virtualenv
 
old blog
http://sillycat.iteye.com/blog/2116834  create easypoll and poll model
http://sillycat.iteye.com/blog/2116836 admin/superuser, html template
http://sillycat.iteye.com/blog/2117212  form post/test class
http://sillycat.iteye.com/blog/2117576 static resource/ deployment
 
 
 
 

相关推荐