If you will only test
PyLucid 0.9 on your local machine, you should follow this instructions:
To clone all related projects, use the PyLucid virtual environment boot script :
Bash 1
2 ~$ wget http://github.com/jedie/PyLucid-boot/raw/master/pylucid_boot/pylucid-boot.py
~$ python pylucid-boot.py PyLucid_env
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
First add the
python interpreter from
virtual environment here:
Window /
Preferences / PyDev / Interpreter -
Python / New... / Browse...
Select PyLucid_env/bin/python
Then import all projects under /PyLucid_env/src/ :
File / Import... / Other / Existing Folder As New Project
Select folder in PyLucid_env/src
Share all Projects respectively connect them with git:
right click in Pydev Package Explorer on the project root entry
Team / Share Project...
select git
select repository location and click on Finish
Use
python interpreter from
virtual environment in all projects:
Project / Properties / PyDev - Interpreter/Grammar
select the Interpreter from
virtual environment (configurated above)
For easy call
django management commands do this:
Bash 1
2
3 ~$ cd PyLucid_env
~/PyLucid_env$ ln src/pylucid/scripts/manage.sh .
~/PyLucid_env$ chmod +x manage.sh
You can check if management works with:
Bash 1 ~/PyLucid_env$ ./manage.sh --version
(You should get the
django version number at the output end)
You should not edit the default settings.py.
Create a local_settings.py here:
PyLucid_env/src/pylucid/pylucid_project/local_settings.py
In this file you can change every default settings.
At least you must insert this:
Python 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 DEBUG = True
SQL_DEBUG = False
TEMPLATE_DEBUG = False
from pylucid_project.apps.pylucid import app_settings as PYLUCID
PYLUCID . I18N_DEBUG = False
# 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
# Database connection info.
# see: http://docs.djangoproject.com/en/dev/ref/settings/#setting-DATABASES
DATABASES = {
'default' : {
'ENGINE' : 'django.db.backends.sqlite3' ,
'NAME' : 'test.db3'
}
}
Info: To display the changed settings, use:
Bash 1 ~/PyLucid_env$ ./manage.sh diffsettings
Note: you must create a new database by your self.
Django can only create tables.
go into the test environment:
Bash
create new tables:
Bash 1 ~/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 ~/PyLucid_env$ ./manage.sh loaddata pylucid.json
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 ~/PyLucid_env$ ./manage.sh runserver
Now you should be able to request the initial page with: http://127.0.0.1:8000/
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.
You can easy run all unittest with:
Bash 1 ~/PyLucid_env$ ./manage.sh test
Tests are not up to date. So, many tests failed.