Menu:

Guide for testing v0.9 usefull for developers

If you will only test PyLucid 0.9 on your local machine, you should follow this instructions:

↑ get via SVN  #

Checkout the last SVN version:

Bash
1
.../PyLucidTest$ svn co http://svn.pylucid.net/pylucid/branches/0.9/scripts/

The next examples used a checkout in the directory PyLucidTest.

↑ setup virtual environment  #

Create a virtual environment:

Bash
1
2
.../PyLucidTest$ cd scripts
.../PyLucidTest/scripts$ ./create_test_env.sh

or update a existing virtual environment with:

Bash
1
.../PyLucidTest/scripts$ ./update_test_env.sh

Important: You can't move a created virtual environment into a other directory, after creating them! This is a limitation of virtualenv, see also: http://pypi.python.org/pypi/virtualenv#making-environments-relocatable

↑ create local settings  #

You should not edit the default settings.py. A better way is to create the file "local_settings.py" in the current working directory.

In this file you can change every default settings.

At least you should insert:

Python
1
2
3
4
# Serve static files for the development server?
# Using this method is inefficient and insecure.
# Do not use this in a production setting. Use this only for development.
SERVE_STATIC_FILES = True

Info: To display the changed settings, use:

Bash
1
.../PyLucidTest/PyLucid_env$ ./manage.sh diffsettings

↑ prepage database  #

Note: you must create a new database by your self. Django can only create tables.

go into the test environment:

Bash
1
.../PyLucidTest$ cd PyLucid_env/

create new tables:

Bash
1
.../PyLucidTest/PyLucid_env$ ./manage.sh syncdb

Django ask you to create a first superuser. You should do this. Otherwise "loaddata" would be failed.
You can create a superuser manually with: ./manage.sh createsuperuser

insert the initial data:

Bash
1
.../PyLucidTest/PyLucid_env$ ./manage.sh loaddata pylucid.json

↑ start test server  #

Django has a own http server. This is usefull for developers. But it sould not be used for productive environments!

run test server:

Bash
1
.../PyLucidTest/PyLucid_env$ ./manage.sh runserver

Now you should be able to request the initial page with: http://127.0.0.1:8000/

↑ finishing  #

  • request: http://127.0.0.1:8000/admin/ and login into the "Django admin site"
  • adjust the site data:
    • edit the model sites
    • change the domain name
  • finishing the installation:
    • From the menu click on: "PyLucid admin menu" / "PyLucid" / "install PyLucid"
    • setup the plugins with: "PyLucid admin menu" / "PyLucid" / "install Plugins"
  • Basic system setup check:
    • run from the menu: "PyLucid admin menu" / "system" / "base check"
    • Check the outout and correct the errors.

↑ run all unittests  #

You can easy run all unittest with:

Bash
1
.../PyLucidTest/PyLucid_env$ ./manage.sh test

Tests are not up to date. So, many tests failed.

tag navi documentation | v0.9