Added installation instructions
This commit is contained in:
parent
d58d118953
commit
a5839c2c36
61
Readme.md
61
Readme.md
@ -33,4 +33,65 @@ $ pipenv shell
|
||||
Visit: [admin](http://localhost:8000/admin) for administrative backend or
|
||||
[frontend](http://localhost:8000/)
|
||||
|
||||
## Installing lostplaces
|
||||
|
||||
### Install dependencies
|
||||
Python3, Django3, easy-thumbnails, image, django-widget-tweaks
|
||||
```
|
||||
pip install django easy-thumbnails image django-widget-tweaks
|
||||
```
|
||||
Or, if you use pipenv
|
||||
```
|
||||
pipenv install
|
||||
```
|
||||
|
||||
|
||||
### Add 'lostplaces_app' to your INSTALLED_APPS setting like this
|
||||
|
||||
```
|
||||
INSTALLED_APPS = [
|
||||
...
|
||||
'lostplaces_app',
|
||||
'easy_thumbnails',
|
||||
'widget_tweaks',
|
||||
]
|
||||
```
|
||||
|
||||
### Add this configuration to your settings.py
|
||||
|
||||
```
|
||||
from django.urls import reverse_lazy
|
||||
...
|
||||
AUTH_USER_MODEL = 'lostplaces_app.Explorer'
|
||||
|
||||
LOGIN_URL = reverse_lazy('login')
|
||||
|
||||
THUMBNAIL_ALIASES = {
|
||||
'': {
|
||||
'thumbnail': {'size': (300, 300), 'crop': False},
|
||||
'hero': {'size': (700, 700), 'crop': False},
|
||||
'large': {'size': (1920, 1920), 'crop': False},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Include the lostplaces URLconf in your project urls.py like this
|
||||
|
||||
```
|
||||
from django.urls import path, include
|
||||
...
|
||||
urlpatterns = [
|
||||
...
|
||||
path('lostplaces/', include('lostplaces_app.urls')),
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
```
|
||||
|
||||
Run ``python manage.py migrate`` to create the lost places models.
|
||||
|
||||
Start the development server and visit http://127.0.0.1:8000/admin/
|
||||
|
||||
Visit http://127.0.0.1:8000/lostplaces/ to CRUD lost places.
|
||||
|
||||
|
||||
Happy developing ;-)
|
||||
|
Loading…
Reference in New Issue
Block a user