PyLucid CMS Logo

create a page instance by foot...

↑ Note  #

We prefer to use our Bootstrap script: Create a PyLucid environment with PyLucid-boot.

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

↑ the steps  #

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

Bash
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:

Python
 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:

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

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

more info: about static media files

↑ setup CLI tool 'manage.py'  #

Bash
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:

You must set this into your local_settings.py:

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

Note:

(see also: a complete local_settings.py example)

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

django-processinfo: 6.7 ms of 332.5 ms (2.0%)