Forked from
KIF / AKPlanning
107 commits behind the upstream repository.
-
Benjamin Hättasch authored
Upgrade django to 4.1 Upgrade django-timezone-field, django-simple-history, django-debug-toolbar and django-bootstrap-datepicker-plus Upgrade mysqlclient Remove obsolete pytz Adapt timezone handling code to new interface of TimezoneInfo (part of python since 3.9 and backport included in 3.8) Drop support for python 3.7 (since Django 4 requires >= 3.8)
Benjamin Hättasch authoredUpgrade django to 4.1 Upgrade django-timezone-field, django-simple-history, django-debug-toolbar and django-bootstrap-datepicker-plus Upgrade mysqlclient Remove obsolete pytz Adapt timezone handling code to new interface of TimezoneInfo (part of python since 3.9 and backport included in 3.8) Drop support for python 3.7 (since Django 4 requires >= 3.8)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
INSTALL.md 9.31 KiB
AK Planning: Setup
This repository contains a Django project with several apps.
Requirements
AKPlanning has two types of requirements: System requirements are dependent on operating system and need to be installed manually beforehand. Python requirements will be installed inside a virtual environment (strongly recommended) during setup.
System Requirements
- Python 3.8+ incl. development tools
- Virtualenv
- pdflatex & beamer
class (
texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-extra texlive-luatex
) - for production using uwsgi:
- C compiler e.g. gcc
- uwsgi
- uwsgi Python3 plugin
- for production using Apache (in addition to uwsgi)
- the mod proxy uwsgi plugin for apache2
Python Requirements
Python requirements are listed in requirements.txt
. They can be installed with pip using -r requirements.txt
.
Development Setup
- create a new directory that should contain the files in future, e.g.
mkdir AKPlanning
- change into that directory
cd AKPlanning
- clone this repository
git clone URL .
Automatic Setup
- execute the setup bash script
Utils/setup.sh
Manual Setup
- setup a virtual environment using the proper python version
virtualenv venv -p python3.7
- activate virtualenv
source venv/bin/activate
- install python requirements
pip install -r requirements.txt
- setup necessary database tables etc.
python manage.py migrate
- prepare static files (can be omitted for dev setups)
python manage.py collectstatic
- compile translations
python manage.py compilemessages
- create a priviledged user, credentials are entered interactively on CLI
python manage.py createsuperuser
- deactivate virtualenv
deactivate
Development Server
Do not use this for deployment!
To start the application for development, in the root directory,
- activate virtualenv
source venv/bin/activate
- start development server
python manage.py runserver 0:8000
- In your browser, access
http://127.0.0.1:8000/admin/
and continue from there.
Deployment Setup
This application can be deployed using a web server as any other Django application. Remember to use a secret key that
is not stored in any repository or similar, and disable DEBUG mode (settings.py
).