Fix #6 #74
42
INSTALL.rst
42
INSTALL.rst
@@ -1,6 +1,6 @@
|
|||||||
REQUIREMENTS
|
REQUIREMENTS
|
||||||
============
|
============
|
||||||
- Python >= 3
|
- Python >= 3.12
|
||||||
- Django and some other python packages, that will be installed throughout
|
- Django and some other python packages, that will be installed throughout
|
||||||
the installation process
|
the installation process
|
||||||
|
|
||||||
@@ -10,9 +10,18 @@ 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 -m venv ./etc/python
|
||||||
- source env/python/bin/activate
|
- source env/python/bin/activate
|
||||||
- python setup.py quickdev
|
- python -m pip install -r requirements.txt
|
||||||
|
- python -m pip install -e .
|
||||||
|
- django-dav-events-admin setup ./env/django
|
||||||
|
- python ./env/django/manage.py enable_module dav_auth
|
||||||
|
- python ./env/django/manage.py enable_module dav_events
|
||||||
|
- python ./env/django/manage.py enable_module dav_registration
|
||||||
|
- python ./env/django/manage.py enable_module dav_event_office
|
||||||
|
- python ./env/django/manage.py makemigrations
|
||||||
|
- python ./env/django/manage.py migrate
|
||||||
|
- python ./env/django/manage.py createsuperuser
|
||||||
|
|
||||||
|
|
||||||
INSTALLATION
|
INSTALLATION
|
||||||
@@ -23,8 +32,6 @@ INSTALLATION
|
|||||||
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.
|
||||||
|
|
||||||
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:
|
||||||
|
|
||||||
``python -m venv --prompt="(dav)" ./env/python``
|
``python -m venv --prompt="(dav)" ./env/python``
|
||||||
@@ -56,14 +63,18 @@ previous ``source ...`` command.
|
|||||||
|
|
||||||
- ``python -m pip install -e .``
|
- ``python -m pip install -e .``
|
||||||
|
|
||||||
4. Setup django project directory
|
4. Setup django project root
|
||||||
---------------------------------
|
----------------------------
|
||||||
|
|
||||||
|
To run a django app, you need a django project root directory, with some
|
||||||
|
static and variable files in it.
|
||||||
|
In the last step a tool was installed, that can be used to create such
|
||||||
|
a project directory with all the neccessary subdirectories and files.
|
||||||
|
Our example will create the django project in ./etc/django and we will
|
||||||
|
call this directory *project root* for now on.
|
||||||
|
|
||||||
- ``django-dav-events-admin setup ./env/django``
|
- ``django-dav-events-admin setup ./env/django``
|
||||||
|
|
||||||
The django project directory ('./env/django' within the previous example)
|
|
||||||
will be called *project root* for now on.
|
|
||||||
|
|
||||||
5. Enable modules
|
5. Enable modules
|
||||||
-----------------
|
-----------------
|
||||||
Our web application consist of several modules, that care about single
|
Our web application consist of several modules, that care about single
|
||||||
@@ -76,6 +87,8 @@ 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``
|
||||||
|
- ``python manage.py enable_module dav_registration``
|
||||||
|
- ``python manage.py enable_module dav_event_office``
|
||||||
|
|
||||||
4. Create the database schema / Populate the database
|
4. Create the database schema / Populate the database
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
@@ -99,3 +112,12 @@ While you still are in the *project root* directory, run
|
|||||||
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
|
||||||
|
|
||||||
|
7. Configure production web server
|
||||||
|
----------------------------------
|
||||||
|
For production use you do not want to run the test server,
|
||||||
|
but have a real web server like apache or nginx running the
|
||||||
|
django app via the WSGI interface.
|
||||||
|
The entry point for your WSGI server is the file
|
||||||
|
``main/wsgi.py`` within the *project root* directory.
|
||||||
|
|
||||||
|
|||||||
11
setup.py
11
setup.py
@@ -82,10 +82,19 @@ class QuickSetup(Command):
|
|||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
|
|
||||||
|
def get_long_description():
|
||||||
|
path = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
file = os.path.join(path, 'README.rst')
|
||||||
|
with open(file) as f:
|
||||||
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='django-dav-events',
|
name='django-dav-events',
|
||||||
version='2.2.1',
|
version='2.2.1',
|
||||||
description='A django based web application project to organize DAV Events.',
|
description='A django based web application project to drive the Touren- & Kurseportal of DAV Karlsruhe.',
|
||||||
|
long_description=get_long_description(),
|
||||||
|
long_description_content_type='text/x-rst',
|
||||||
url='https://dev.heinzelwerk.de/git/DAV-KA/django-dav-events',
|
url='https://dev.heinzelwerk.de/git/DAV-KA/django-dav-events',
|
||||||
author='Jens Kleineheismann',
|
author='Jens Kleineheismann',
|
||||||
author_email='heinzel@alpenverein-karlsruhe.de',
|
author_email='heinzel@alpenverein-karlsruhe.de',
|
||||||
|
|||||||
Reference in New Issue
Block a user