Go to file
PCoder f0d178101a Init 2022-09-23 07:38:37 +05:30
assets Init 2022-09-23 07:38:37 +05:30
catalog Init 2022-09-23 07:38:37 +05:30
cms Init 2022-09-23 07:38:37 +05:30
efundburo Init 2022-09-23 07:38:37 +05:30
fonts/MonumentGrotesk Init 2022-09-23 07:38:37 +05:30
locale Init 2022-09-23 07:38:37 +05:30
scripts Init 2022-09-23 07:38:37 +05:30
static Init 2022-09-23 07:38:37 +05:30
.gitignore Init 2022-09-23 07:38:37 +05:30
.gitlab-ci.yml Init 2022-09-23 07:38:37 +05:30
.prettierrc Init 2022-09-23 07:38:37 +05:30
README.md Init 2022-09-23 07:38:37 +05:30
babel.config.json Init 2022-09-23 07:38:37 +05:30
deploy.sh Init 2022-09-23 07:38:37 +05:30
dev-requirements.txt Init 2022-09-23 07:38:37 +05:30
dev-server.js Init 2022-09-23 07:38:37 +05:30
manage.py Init 2022-09-23 07:38:37 +05:30
package-lock.json Init 2022-09-23 07:38:37 +05:30
package.json Init 2022-09-23 07:38:37 +05:30
requirements.txt Init 2022-09-23 07:38:37 +05:30
setup.cfg Init 2022-09-23 07:38:37 +05:30
webpack-stats.json Init 2022-09-23 07:38:37 +05:30
webpack.config.js Init 2022-09-23 07:38:37 +05:30
yarn.lock Init 2022-09-23 07:38:37 +05:30

README.md

eFundBüro

How to install

  • clone repository
  • Tested with python version 3.6
  • create virtualenv and pip install -r requirements.txt
  • Run python manage.py makemigrations
  • create db with python manage.py migrate
  • create superuser with python manage.py createsuperuser
  • import catalog from xlsx python manage.py import_catalog ~/ownCloud/Project_eFundbuero/Datenbank-Zeugs/Fundbüro\ Muster\ Export\ aus\ MuseumPlus.xlsx

Sample uwsgi config file

[uwsgi]
socket = /home/app/app/uwsgi.sock
chdir = /home/app/app
venv = /home/app/pyvenv
wsgi-file = efundburo/wsgi.py
processes = 4
threads = 2
chmod-socket = 666
vacuum = true
plugins = python3
uid = app
gid = app
env = DJANGO_SETTINGS_MODULE=efundburo.production
env = DEBUG=True
wsgi-disable-file-wrapper = true

Production setup

Endpoints

API

  • GET /search/?query={keyword} allow to retreive item matching the keyword in the item title, description or inventory_number.
  • GET /item/{item_pk}/ return the details of an item
  • GET /item/{item_pk}/comments/ return the validated comments of an item.
  • POST /item/{item_pk}/comments/ allow you to create a new comment. The endpoint expect a JSON dict with the following keys :
    • comment: the content of the comment as a string
    • author: the author of the comment as a string
    • optional field_specific: the field to comment on. Can be any of the field of the Item model

Application

Application is running as efundbuero user in /home/efundbuero/efundbuero. To deploy:

# SSH to server
sudo su - efundbuero
workon efundbuero
cd efundbuero
git pull
# Run migrations, collect staticfiles etc if needed
exit
sudo systemctl restart apache2