Compare commits

..

No commits in common. "69f0f4ccfdf4a084a6850622358023d2e0f33848" and "c3eede548c997819281bac1a97004a67788eaa29" have entirely different histories.

View File

@ -11,13 +11,12 @@ Right now it depends on the following non-core Python 3 libraries. These can be
* [easy-thumbnails](https://github.com/SmileyChris/easy-thumbnails) A powerful, yet easy to implement thumbnailing application for Django 1.11+
* [image](https://github.com/francescortiz/image) Image cropping for django
* [django-widget-tweaks](https://github.com/jazzband/django-widget-tweaks) Tweak the form field rendering in templates, not in python-level form definitions.
* [django-taggit](https://github.com/jazzband/django-taggit) A simpler approach to tagging with Django.
## 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](https://docs.pipenv.org/) 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 virtual environment. The repo provides a Pipfile for easy dependency management that does not mess with your system.
```
$ cd lostplaces-backend
@ -26,17 +25,14 @@ $ 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 --ipv6
(lostplaces-backend) $ lostplaces/manage.py runserver
```
### Returning to the venv
```
$ cd lostplaces-backend
$ pipenv shell
(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
(lostplaces-backend) $ lostplaces/manage.py runserver
```
Visit: [admin](http://localhost:8000/admin) for administrative backend or
@ -45,15 +41,16 @@ Visit: [admin](http://localhost:8000/admin) for administrative backend or
## Installing lostplaces
### Install dependencies
Python3, Django3, easy-thumbnails, image, django-widget-tweaks, django-taggit
Python3, Django3, easy-thumbnails, image, django-widget-tweaks
```
pip install --user django easy-thumbnails image django-widget-tweaks django-taggit
pip install --user django easy-thumbnails image django-widget-tweaks
```
Or, if you use pipenv
```
pipenv install / update
pipenv install
```
### Add 'lostplaces_app' to your INSTALLED_APPS setting like this
```
@ -62,7 +59,6 @@ INSTALLED_APPS = [
'lostplaces_app',
'easy_thumbnails',
'widget_tweaks',
'django_taggit'
]
```
@ -96,11 +92,11 @@ urlpatterns = [
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
```
Run ``./manage.py migrate`` to create the lost places models.
Run ``python manage.py migrate`` to create the lost places models.
Start the development server and visit http://localhost:8000/admin/
Start the development server and visit http://127.0.0.1:8000/admin/
Visit http://localhost:8000/lostplaces/ to CRUD lost places.
Visit http://127.0.0.1:8000/lostplaces/ to CRUD lost places.
Happy developing ;-)