PyLucid CMS Logo

create the virtual environment by foot

Low level way to create a PyLucid virtual environment.

↑ pre setup  #

↑ install easy_install and virtualenv:  #

Bash
1
2
3
~$ wget http://peak.telecommunity.com/dist/ez_setup.py
~$ sudo python ez_setup.py
~$ sudo easy_install virtualenv

You can also use the package management:

Bash
1
~$ sudo aptitude install python-setuptools python-virtualenv

↑ create virtual environment  #

Bash
1
~$ virtualenv PyLucid_env

↑ activate virtual environment  #

Bash
1
2
~$ cd  PyLucid_env/bin
~/PyLucid_env/bin$ source activate

↑ install pip into virtual environment  #

Bash
1
(PyLucid_env) ~/PyLucid_env/bin$ ./easy_install pip

↑ install  #

↑ install django  #

Bash
1
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable git+git://github.com/django/django.git@1.3.X#egg=django

↑ install dependency  #

Bash
1
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose feedparser Pygments django-reversion django-dbtemplates django-tagging

↑ install own external projects  #

To clone the git repositories, you need a GitHub account with SSH keys.

Bash
1
2
3
4
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable git+git@github.com:jedie/python-creole.git#egg=python-creole
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable git+git@github.com:jedie/django-dbpreferences.git#egg=dbpreferences
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable git+git@github.com:jedie/django-tools.git#egg=django-tools
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable git+git@github.com:jedie/PyLucid.git#egg=pylucid

Without key auth, you can use read-only clone url:

Bash
1
2
3
4
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable git+git://github.com/jedie/python-creole.git#egg=python-creole
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable git+git://github.com/jedie/django-dbpreferences.git#egg=dbpreferences
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable git+git://github.com/jedie/django-tools.git#egg=django-tools
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable git+git://github.com/jedie/PyLucid.git#egg=pylucid

Or you can use SVN access:

Bash
1
2
3
4
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable svn+http://svn.github.com:jedie/python-creole.git#egg=python-creole
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable svn+http://svn.github.com:jedie/django-dbpreferences.git#egg=dbpreferences
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable svn+http://svn.github.com:jedie/django-tools.git#egg=django-tools
(PyLucid_env) ~/PyLucid_env/bin$ ./pip install --verbose --editable svn+http://svn.github.com/jedie/PyLucid.git#egg=pylucid

↑ create manage.sh  #

For easy call django management commands do this:

Bash
1
2
3
(PyLucid_env) ~/PyLucid_env/bin$ cd ..
(PyLucid_env) ~/PyLucid_env$ ln src/pylucid/scripts/manage.sh .
(PyLucid_env) ~/PyLucid_env$ chmod +x manage.sh

You can check if management works with:

Bash
1
(PyLucid_env) ~/PyLucid_env$ ./manage.sh --version

(You should get the django version number at the output end)

↑ startup  #

↑ handle media files  #

For easy handling of media files, symlink django admin media into PyLucid media dir:

Bash
1
ln -s ~/PyLucid_env/src/django/django/contrib/admin/media/ ~/PyLucid_env/src/pylucid/pylucid_project/media/django

(You have to add the absolute path to /PyLucid_env/src/pylucid/pylucid_project/media/django into MEDIA_ROOT in your local_settings.py)

↑ create local_settings.py  #

You must create a own local_settings.py and add at least you database settings.

e.g.:

Bash
1
nano ~/PyLucid_env/src/pylucid/pylucid_project/local_settings.py

A example can you found here: local_settings.py example

0 Kommentare für 'by foot':
    Es existiert kein Kommentar für 'by foot'
Kommentar hinterlassen

django-processinfo: 5.1 ms of 356.4 ms (1.4%)