Wrote basic (pipenv) contribution guide in Readme.md.

This commit is contained in:
Marcus Scholz 2020-07-29 11:55:17 +02:00
parent 4f3794c59d
commit 4499c6b055

View File

@ -1,32 +1,44 @@
# lostplaces-backend # lostplaces-backend
lostplaces-backend is a Django based Webproject. It once wants to become a lostplaces-backend is a django based Webproject. It once wants to become a
software which allows a group of urban explorers to manage, document and software which allows a group of urban explorers to manage, document and
share the locations of lost places while not exposing too much / any share the locations of lost places while not exposing too much / any
information to the public. information to the public.
The software ist currently in early development status, neither scope, The software ist currently in early development status, neither scope,
datalayout nor features are finalized yet. datalmodel(s) nor features are finalized yet.
## Dependencies ## Dependencies
Right now it depends on the following non-core Python 3 libraries. These can be installed using the package manager of your distribution Right now it depends on the following non-core Python 3 libraries. These can be installed using the package manager of your distribution
or into the venv locally. or into the venv locally.
* [django](https://www.djangoproject.com/) Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. * [django](https://www.djangoproject.com/) django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
* [django-thumbs-v2](https://github.com/rrmerugu/django-thumbs-v2) Create thumbnails for your images with Django. * [django-thumbs-v2](https://github.com/rrmerugu/django-thumbs-v2) Create thumbnails for your images with django.
Currently the the repo is quite a mess, with full Python 3.8 site-packages Currently the the repo is quite a mess, with full Python 3.8 site-packages
in-repo and other sketchy stuff. This will be fixed sometime. in-repo and other sketchy stuff. This will be fixed sometime.
### Setting up a virtual environment for development ### Setting up a (pipenv) virtual environment for development
source bin/activate (there are several venv definitions for different shells) After having obtained the repository contents (either via .zip download or git clone), you can easily setup a pipenv virtual environment. The repo provides a Pipfile for easy dependency management that does not mess with your system.
source/lostplaces/manage.py migrate
source/lostplaces/manage.py createsuperuser ```
source/lostplaces/manage.py runserver $ cd lostplaces-backend
$ pipenv install
$ pipenv shell
(lostplaces-backend) $ lostplaces/manage.py migrate
(lostplaces-backend) $ lostplaces/manage.py createsuperuser
(lostplaces-backend) $ lostplaces/manage.py runserver
```
### Returning to the venv
```
$ cd lostplaces-backend
$ pipenv shell
(lostplaces-backend) $ lostplaces/manage.py runserver
```
Visit: [admin](http://localhost:8000/admin) for administrative backend or Visit: [admin](http://localhost:8000/admin) for administrative backend or
[frontend](http://localhost:8000/) [frontend](http://localhost:8000/)
### Install django system-wide (as user) Happy developing ;-)
pip3 install --user django