Added documentation, links, missing information.

This commit is contained in:
Marcus Scholz 2020-09-01 22:35:39 +02:00
parent 75f8ac4a95
commit 69f0f4ccfd
1 changed files with 13 additions and 10 deletions

View File

@ -17,7 +17,7 @@ Right now it depends on the following non-core Python 3 libraries. These can be
## Development
### Setting up a (pipenv) virtual environment for development
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.
After having obtained the repository contents (either via .zip download or git clone), you can easily setup a [pipenv](https://docs.pipenv.org/) virtual environment. The repo provides a Pipfile for easy dependency management that does not mess with your system.
```
$ cd lostplaces-backend
@ -26,14 +26,17 @@ $ pipenv shell
(lostplaces-backend) $ lostplaces/manage.py makemigrations
(lostplaces-backend) $ lostplaces/manage.py migrate
(lostplaces-backend) $ lostplaces/manage.py createsuperuser
(lostplaces-backend) $ lostplaces/manage.py runserver
(lostplaces-backend) $ lostplaces/manage.py runserver --ipv6
```
### Returning to the venv
```
$ cd lostplaces-backend
$ pipenv shell
(lostplaces-backend) $ lostplaces/manage.py runserver
(lostplaces-backend) $ pipenv update # If dependencies changed, or updates available
(lostplaces-backend) $ lostplaces/manage.py makemigrations # If datamodels changed
(lostplaces-backend) $ lostplaces/manage.py migrate # If datamodels changed
(lostplaces-backend) $ lostplaces/manage.py runserver --ipv6
```
Visit: [admin](http://localhost:8000/admin) for administrative backend or
@ -42,16 +45,15 @@ Visit: [admin](http://localhost:8000/admin) for administrative backend or
## Installing lostplaces
### Install dependencies
Python3, Django3, easy-thumbnails, image, django-widget-tweaks
Python3, Django3, easy-thumbnails, image, django-widget-tweaks, django-taggit
```
pip install --user django easy-thumbnails image django-widget-tweaks
pip install --user django easy-thumbnails image django-widget-tweaks django-taggit
```
Or, if you use pipenv
```
pipenv install
pipenv install / update
```
### Add 'lostplaces_app' to your INSTALLED_APPS setting like this
```
@ -60,6 +62,7 @@ INSTALLED_APPS = [
'lostplaces_app',
'easy_thumbnails',
'widget_tweaks',
'django_taggit'
]
```
@ -93,11 +96,11 @@ urlpatterns = [
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
```
Run ``python manage.py migrate`` to create the lost places models.
Run ``./manage.py migrate`` to create the lost places models.
Start the development server and visit http://127.0.0.1:8000/admin/
Start the development server and visit http://localhost:8000/admin/
Visit http://127.0.0.1:8000/lostplaces/ to CRUD lost places.
Visit http://localhost:8000/lostplaces/ to CRUD lost places.
Happy developing ;-)