Formatting

This commit is contained in:
reverend 2020-09-10 20:46:11 +02:00
parent 88c94acd93
commit 266bf0b368

View File

@ -84,6 +84,7 @@ After that, download the desired release (probably the latest one) [from the rea
Now configure your `settings.py` as follows: Now configure your `settings.py` as follows:
1. Add the following apps to the django project 1. Add the following apps to the django project
```python ```python
INSTALLED_APPS = [ INSTALLED_APPS = [
... ...
@ -93,7 +94,9 @@ INSTALLED_APPS = [
'django_taggit' 'django_taggit'
] ]
``` ```
2. Set the URL's and Root-directories for file handling, for example 2. Set the URL's and Root-directories for file handling, for example
```python ```python
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static_files') STATIC_ROOT = os.path.join(BASE_DIR, 'static_files')
@ -101,11 +104,15 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static_files')
MEDIA_URL = '/uploads/' MEDIA_URL = '/uploads/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads') MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads')
``` ```
3. Set the user model (this will be changed in the next release) 3. Set the user model (this will be changed in the next release)
```python ```python
AUTH_USER_MODEL = 'lostplaces_app.Explorer' AUTH_USER_MODEL = 'lostplaces_app.Explorer'
``` ```
4. Set the URL's for login, for example 4. Set the URL's for login, for example
```python ```python
LOGIN_URL = reverse_lazy('login') LOGIN_URL = reverse_lazy('login')
LOGIN_REDIRECT_URL = reverse_lazy('lostplaces_home') LOGIN_REDIRECT_URL = reverse_lazy('lostplaces_home')