Installation

This repository contains a fully functional version of fachschaftsempfaenger as it is run by the student union of Computer Science at the university of Tuebingen. This guide aims to instruct you to get your version running either in development mode on your PC or on a production version on a server.

Development Server

  1. The easiest way to use this application is to install it via pip:

pip install git+https://github.com/fsi-tue/fachschaftsempfaenger

fachschaftsempfaenger is now installed as a normal python package.

  1. Install a Django Development Server on your local machine.

django-admin startproject yourproject

This will create a yourproject directory in your current directory:

yourproject/
  manage.py
  yourproject/
      __init__.py
      settings.py
      urls.py
      wsgi.py
  1. Add fachschaftsempfaenger to your INSTALLED_APPS in settings.py:

INSTALLED_APPS = [
    ...,
    'fachschaftsempfaenger'
]
  1. Adjust your settings.py to accomodate uploads made by fachschaftsempfaenger:

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/

...
MEDIA_URL = '/uploads/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads')
  1. Adjust urls.py to make your installation of fachschaftsempfaenger reachable:

...
from .settings import MEDIA_URL, MEDIA_ROOT
from django.urls import path, re_path, include
from django.conf.urls.static import static

urlpatterns = [
...
re_path(r'^', include('fachschaftsempfaenger.urls')),
...
] + static(MEDIA_URL, document_root=MEDIA_ROOT) # this make the uploads folder reachable
  1. Make the migrations to adapt the database scheme locally:

python manage.py migrate
python manage.py makemigrations fachschaftsempfaenger
python manage.py migrate fachschaftsempfaenger
  1. Define a superuser to access the Django admin:

python manage.py createsuperuser
  1. Start a local server:

python manage.py runserver
  1. Open a browser and go to http://127.0.0.1:8000/

Production Server

Note

This section is still under construction.