You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
5 months ago | |
---|---|---|
assets | 5 months ago | |
catalog | 5 months ago | |
cms | 5 months ago | |
efundburo | 5 months ago | |
fonts/MonumentGrotesk | 5 months ago | |
locale | 5 months ago | |
scripts | 5 months ago | |
static | 5 months ago | |
.gitignore | 5 months ago | |
.gitlab-ci.yml | 5 months ago | |
.prettierrc | 5 months ago | |
README.md | 5 months ago | |
babel.config.json | 5 months ago | |
deploy.sh | 5 months ago | |
dev-requirements.txt | 5 months ago | |
dev-server.js | 5 months ago | |
manage.py | 5 months ago | |
package-lock.json | 5 months ago | |
package.json | 5 months ago | |
requirements.txt | 5 months ago | |
setup.cfg | 5 months ago | |
webpack-stats.json | 5 months ago | |
webpack.config.js | 5 months ago | |
yarn.lock | 5 months ago |
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 itemGET /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 stringauthor
: 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