From 2cdf6f1e2b39ec6ca87786b0401875ab26f00993 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 2 Mar 2019 16:17:48 +0100 Subject: [PATCH] Allow editing location --- map/mixins.py | 8 ++++++ map/static/map/style.css | 4 +++ map/templates/map/base.html | 18 +++++++----- map/templates/map/change_location.html | 12 ++++++++ map/urls.py | 2 ++ map/views.py | 40 ++++++++++++++++++++++++-- 6 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 map/mixins.py create mode 100644 map/templates/map/change_location.html diff --git a/map/mixins.py b/map/mixins.py new file mode 100644 index 0000000..2f72cc7 --- /dev/null +++ b/map/mixins.py @@ -0,0 +1,8 @@ +class QuickActionsMixin: + def get_quick_actions(self): + return [] + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context['quick_actions'] = self.get_quick_actions() + return context diff --git a/map/static/map/style.css b/map/static/map/style.css index eba67fe..e1c5921 100644 --- a/map/static/map/style.css +++ b/map/static/map/style.css @@ -2,3 +2,7 @@ height: 70vh; margin-top: 1rem; } + +.messages-container { + margin-top: 1em; +} \ No newline at end of file diff --git a/map/templates/map/base.html b/map/templates/map/base.html index 6623205..e654d9b 100644 --- a/map/templates/map/base.html +++ b/map/templates/map/base.html @@ -25,14 +25,18 @@ {% include 'map/navbar.html' %}
- {% for message in messages %} -