Fixed formatting
This commit is contained in:
parent
fa1274c595
commit
8cb7e61274
72
Readme.md
72
Readme.md
@ -36,56 +36,56 @@ Visit: [admin](http://localhost:8000/admin) for administrative backend or
|
|||||||
## Installing lostplaces
|
## Installing lostplaces
|
||||||
|
|
||||||
### Install dependencies
|
### Install dependencies
|
||||||
Python3, Django3, easy-thumbnails, image, django-widget-tweaks
|
Python3, Django3, easy-thumbnails, image, django-widget-tweaks
|
||||||
```
|
```
|
||||||
pip install django easy-thumbnails image django-widget-tweaks
|
pip install django easy-thumbnails image django-widget-tweaks
|
||||||
```
|
```
|
||||||
Or, if you use pipenv
|
Or, if you use pipenv
|
||||||
```
|
```
|
||||||
pipenv install
|
pipenv install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Add 'lostplaces_app' to your INSTALLED_APPS setting like this
|
### Add 'lostplaces_app' to your INSTALLED_APPS setting like this
|
||||||
|
|
||||||
```
|
```
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
...
|
...
|
||||||
'lostplaces_app',
|
'lostplaces_app',
|
||||||
'easy_thumbnails',
|
'easy_thumbnails',
|
||||||
'widget_tweaks',
|
'widget_tweaks',
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Add this configuration to your settings.py
|
### Add this configuration to your settings.py
|
||||||
|
|
||||||
```
|
```
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
...
|
...
|
||||||
AUTH_USER_MODEL = 'lostplaces_app.Explorer'
|
AUTH_USER_MODEL = 'lostplaces_app.Explorer'
|
||||||
|
|
||||||
LOGIN_URL = reverse_lazy('login')
|
LOGIN_URL = reverse_lazy('login')
|
||||||
|
|
||||||
THUMBNAIL_ALIASES = {
|
THUMBNAIL_ALIASES = {
|
||||||
'': {
|
'': {
|
||||||
'thumbnail': {'size': (300, 300), 'crop': False},
|
'thumbnail': {'size': (300, 300), 'crop': False},
|
||||||
'hero': {'size': (700, 700), 'crop': False},
|
'hero': {'size': (700, 700), 'crop': False},
|
||||||
'large': {'size': (1920, 1920), 'crop': False},
|
'large': {'size': (1920, 1920), 'crop': False},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Include the lostplaces URLconf in your project urls.py like this
|
### Include the lostplaces URLconf in your project urls.py like this
|
||||||
|
|
||||||
```
|
```
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
...
|
||||||
|
urlpatterns = [
|
||||||
...
|
...
|
||||||
urlpatterns = [
|
path('lostplaces/', include('lostplaces_app.urls')),
|
||||||
...
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
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.
|
Run ``python manage.py migrate`` to create the lost places models.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user