Note

We prefer to use our script to create a new web page instance !

Anyhow, here the steps to create a PyLucid page instance by foot:

the manually steps

Specifications: We create a "page instance" in /var/www/YourSite and use the PyLucid installation from /home/FooBar/PyLucid_env/.

1
2
3
4
5
6
7
8
# Copy fastCGI dispatcher:
/home/FooBar$ cp scripts/apache_files/index.fcgi /var/www/YourSite/

# make .fcgi file executable:
/home/FooBar$ chmod +x /var/www/YourSite/index.fcgi

# Copy .htaccess file:
/home/FooBar$ cp scripts/apache_files/default.htaccess /var/www/YourSite/.htaccess

Please edit /var/www/YourSite/.htaccess: In some cases you must activate the suitable AddHandler line.

edit .fcgi file

You must change the path to your created environment in the .fcgi dispatcher file. Edit /var/www/YourSite/index.fcgi and change this part:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
...
#####################################################################################################
# CHANGE THIS PATH:
#
# The absolute filesystem path to ...PyLucid_env/bin/activate_this.py
#
os.environ["VIRTUALENV_FILE"] = "/home/FooBar/PyLucid_env/bin/activate_this.py"
#
#####################################################################################################
...

static media files

FIXME: django path is not correct!

Copy PyLucid and django static media files:

1
2
3
4
5
/home/FooBar$ mkdir -p /var/www/YourSite/static/django/
/home/FooBar$ mkdir -p /var/www/YourSite/static/PyLucid/

/home/FooBar$ cp -r PyLucid_env/src/django/django/contrib/admin/static/* /var/www/YourSite/static/django/
/home/FooBar$ cp -r PyLucid_env/src/pylucid/pylucid_project/static/* /var/www/YourSite/static/

more info: about static media files

setup CLI tool 'manage.py'

1
2
# copy 'manage.py' into your page instance:
/home/FooBar$ cp PyLucid_env/src/pylucid/scripts/manage.py /var/www/YourSite/

edit the file /var/www/YourSite/manage.py and change the ROOT_DIR to /home/FooBar/PyLucid_env/

create local_settings.py

To set own settings variable, you should create:

  • /var/www/YourSite/local_settings.py

You must set this into your local_settings.py:

1
2
3
MEDIA_ROOT = "/var/www/YourSite/static/"
MEDIA_URL = "/static/"
ADMIN_MEDIA_PREFIX = "/static/django/"

Note:

  • This two path are in default .htaccess in the mod rewrite exception list.
  • You will get JS errors, if pylucid media files can't be loaded.

(see also: a complete local_settings.py example)

next step

Continue with the normal install steps, after the done all these steps here, go to: