From 8cb7e61274b0a1d0af854e09392f859eba3a1835 Mon Sep 17 00:00:00 2001 From: reverend Date: Tue, 18 Aug 2020 14:24:08 +0200 Subject: [PATCH] Fixed formatting --- Readme.md | 72 +++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/Readme.md b/Readme.md index d3bc45f..8e9c310 100644 --- a/Readme.md +++ b/Readme.md @@ -36,56 +36,56 @@ Visit: [admin](http://localhost:8000/admin) for administrative backend or ## 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 - ``` +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', - ] - ``` +``` +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' +``` +from django.urls import reverse_lazy +... +AUTH_USER_MODEL = 'lostplaces_app.Explorer' - LOGIN_URL = reverse_lazy('login') +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}, - }, - } - ``` +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 +``` +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.