UPD: beautified INSTALL.rst
This commit is contained in:
86
INSTALL.rst
86
INSTALL.rst
@@ -11,9 +11,9 @@ For production use you surly want a real web server that supports WSGI
|
|||||||
|
|
||||||
QUICK INSTALLATION FOR THE IMPATIENT
|
QUICK INSTALLATION FOR THE IMPATIENT
|
||||||
====================================
|
====================================
|
||||||
python setup.py mkpyenv
|
- python setup.py mkpyenv
|
||||||
source env/python/bin/activate
|
- source env/python/bin/activate
|
||||||
python setup.py quickdev
|
- python setup.py quickdev
|
||||||
|
|
||||||
|
|
||||||
INSTALLATION
|
INSTALLATION
|
||||||
@@ -21,76 +21,76 @@ INSTALLATION
|
|||||||
|
|
||||||
1. Python Environment
|
1. Python Environment
|
||||||
---------------------
|
---------------------
|
||||||
It is strongly recommended to create a separated python environment
|
It is strongly recommended to create a separated python environment
|
||||||
for this django project. But it is not exactly necessary.
|
for this django project. But it is not exactly necessary.
|
||||||
|
|
||||||
The creation of a separated python environment is very easy with the
|
The creation of a separated python environment is very easy with the
|
||||||
virtualenv tool (a python package).
|
virtualenv tool (a python package).
|
||||||
|
|
||||||
If you decide to not use virtualenv, proceed with step 2.
|
If you decide to not use virtualenv, proceed with step 2.
|
||||||
|
|
||||||
- Create the python environment in a directory called ./env/python:
|
- Create the python environment in a directory called ./env/python:
|
||||||
|
|
||||||
``virtualenv --prompt="(dav)" ./env/python``
|
``virtualenv --prompt="(dav)" ./env/python``
|
||||||
|
|
||||||
- If you use a posix compatible shell (like bash, the linux default shell),
|
- If you use a posix compatible shell (like bash, the linux default shell),
|
||||||
you have to activate the environment for the current shell session
|
you have to activate the environment for the current shell session
|
||||||
with the following command:
|
with the following command:
|
||||||
|
|
||||||
``source ./env/python/bin/activate``
|
``source ./env/python/bin/activate``
|
||||||
|
|
||||||
Your shell prompt should be prefixed with '(dav)' now.
|
Your shell prompt should be prefixed with '(dav)' now.
|
||||||
|
|
||||||
Do not exit the shell session (nor deactivate the environment) until the
|
Do not exit the shell session (nor deactivate the environment) until the
|
||||||
whole installation is done.
|
whole installation is done.
|
||||||
After that you can call the command ``deactivate`` to deactivate the project
|
After that you can call the command ``deactivate`` to deactivate the project
|
||||||
environment and access the systems standard python environment again.
|
environment and access the systems standard python environment again.
|
||||||
|
|
||||||
If you have left the session or deactivated the environment and want to
|
If you have left the session or deactivated the environment and want to
|
||||||
reactivate the environment (e.g. to execute a python command) use the
|
reactivate the environment (e.g. to execute a python command) use the
|
||||||
previous ``source ...`` command.
|
previous ``source ...`` command.
|
||||||
|
|
||||||
2. Install files
|
2. Install files
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
* ``python setup.py develop``
|
- ``python setup.py develop``
|
||||||
* ``django-dav-events-admin setup ./env/django``
|
- ``django-dav-events-admin setup ./env/django``
|
||||||
|
|
||||||
The django project directory ('./env/django' within the previous example)
|
The django project directory ('./env/django' within the previous example)
|
||||||
will be called *project root* for now on.
|
will be called *project root* for now on.
|
||||||
|
|
||||||
3. Enable modules
|
3. Enable modules
|
||||||
-----------------
|
-----------------
|
||||||
Our web application consist of several modules, that care about single
|
Our web application consist of several modules, that care about single
|
||||||
aspects of the whole picture.
|
aspects of the whole picture.
|
||||||
You want to enable some of those modules by execute a
|
You want to enable some of those modules by execute a
|
||||||
management command.
|
management command.
|
||||||
|
|
||||||
Change into the *project root* (where the file ``manage.py`` lives)
|
Change into the *project root* (where the file ``manage.py`` lives)
|
||||||
and run
|
and run
|
||||||
|
|
||||||
* ``python manage.py enable_module dav_auth``
|
- ``python manage.py enable_module dav_auth``
|
||||||
* ``python manage.py enable_module dav_events``
|
- ``python manage.py enable_module dav_events``
|
||||||
|
|
||||||
4. Create the database schema / Populate the database
|
4. Create the database schema / Populate the database
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
While you still are in the *project root* directory, run
|
While you still are in the *project root* directory, run
|
||||||
|
|
||||||
* ``python manage.py makemigrations``
|
- ``python manage.py makemigrations``
|
||||||
* ``python manage.py migrate``
|
- ``python manage.py migrate``
|
||||||
|
|
||||||
5. Create a super user or administrator account
|
5. Create a super user or administrator account
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
While you still are in the *project root* directory, run
|
While you still are in the *project root* directory, run
|
||||||
|
|
||||||
* ``python manage.py createsuperuser``
|
- ``python manage.py createsuperuser``
|
||||||
|
|
||||||
6. Start test server
|
6. Start test server
|
||||||
--------------------
|
--------------------
|
||||||
While you still are in the *project root* directory, run
|
While you still are in the *project root* directory, run
|
||||||
|
|
||||||
``python manage.py runserver``
|
- ``python manage.py runserver``
|
||||||
|
|
||||||
Now you should be able to connect to the test server via
|
Now you should be able to connect to the test server via
|
||||||
|
|
||||||
http://localhost:8000
|
http://localhost:8000
|
||||||
|
|||||||
Reference in New Issue
Block a user