Python Lover(5)Django REST Framework
Python Lover(5)Django REST FrameworkUpgrade the version to latest 1.7.5
> python3 -V
Python 3.4.1
> python -V
Python 2.7.8
> wget https://www.djangoproject.com/m/releases/1.7/Django-1.7.5.tar.gz
Install the django on latest python
> sudo python3 setup.py install
> python -c "import django;print(django.get_version())"
1.7.5
Check the project https://github.com/luohuazju/easy/tree/master/easypoll
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
> wget https://www.djangoproject.com/m/releases/1.7/Django-1.7.5.tar.gz
> wget https://pypi.python.org/packages/source/s/setuptools/setuptools-5.7.tar.gz
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
http://mengzhuo.org/blog/virtualenv%E5%92%8Cpip%E5%B0%8F%E6%8E%A2.html
http://www.the5fire.com/virtualenv-python-env.html
http://blogs.360.cn/blog/how-360-uses-python-1-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
https://docs.djangoproject.com/en/1.7/
页:
[1]