Ubuntu 10.10 Pentax K-5

Friday, March 02, 2012

Django + Pinax (python-based web development framework

Under xiaogang's supervision, i am testing the python-based web development framework.

Django
https://docs.djangoproject.com/en/1.3/

Installed pip.exe (python package management tool)
Installed virtualenv.exe and pinax.exe

Pinax  packs a lot of moduels of Django and with easy deployment (WSGI).
http://pinax.readthedocs.org/en/latest/index.html



To run:
Create a new virtualenv
> virtualenv.exe nanhua-env
> nanhua-env\Scripts\activate

> pip install pinax

>pinax-admin setup_project -b basic nanhua  (create a project/folder)
>cd nanhua

> python manage.py syncdb  (update the database from models.py)
> python manage.py runserver

For the problem at virtualenv, to setup mysql-python:
>easy_install file://c:/users/you/downloads/mysql-python-1.2.3.win32-py2.7.exe (modify to reflect the location of the downloaded installer and its name).

1 comment:

Cai Yundong (蔡云栋) said...

You have new version of pip, the function pip.call_subprocess has been moved to pip.util.call_subprocess. See: https://github.com/pypa/pip/pull/464

Just replace the string in

C:\virtualenvs\mysite\lib\site-packages\pinax\core\management\commands\setup_project.py

Before executing the pinax-admin