From 4e0bfef4836a1c90079a71f70f9f737a2f8495fb Mon Sep 17 00:00:00 2001 From: reverend Date: Sun, 29 Nov 2020 19:23:22 +0100 Subject: [PATCH] Incorporating Profile View into Project --- django_lostplaces/lostplaces/templates/global.html | 5 +++-- django_lostplaces/lostplaces/urls.py | 7 +++++-- django_lostplaces/lostplaces/views/__init__.py | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/django_lostplaces/lostplaces/templates/global.html b/django_lostplaces/lostplaces/templates/global.html index 4ebf0ed..25cec9d 100644 --- a/django_lostplaces/lostplaces/templates/global.html +++ b/django_lostplaces/lostplaces/templates/global.html @@ -29,9 +29,10 @@ {% if user.is_authenticated %} Hi {{ user.username }}! - {% trans 'Logout' %} + {% trans 'Logout' %} | + {% trans 'Profile' %} {% if user.is_superuser %} - {% trans 'Admin' %} + | {% trans 'Admin' %} {% endif %} {% else %} diff --git a/django_lostplaces/lostplaces/urls.py b/django_lostplaces/lostplaces/urls.py index 9c686ef..2796ed9 100644 --- a/django_lostplaces/lostplaces/urls.py +++ b/django_lostplaces/lostplaces/urls.py @@ -15,7 +15,8 @@ from lostplaces.views import ( PhotoAlbumDeleteView, PlaceImageCreateView, PlaceImageDeleteView, - FlatView + FlatView, + ExplorerProfileView ) urlpatterns = [ @@ -33,5 +34,7 @@ urlpatterns = [ # POST-only URLs for tag submission path('place/tag/', PlaceTagSubmitView.as_view(), name='place_tag_submit'), - path('place/tag/delete//', PlaceTagDeleteView.as_view(), name='place_tag_delete') + path('place/tag/delete//', PlaceTagDeleteView.as_view(), name='place_tag_delete'), + + path('explorer//', ExplorerProfileView.as_view(), name='explorer_profile') ] diff --git a/django_lostplaces/lostplaces/views/__init__.py b/django_lostplaces/lostplaces/views/__init__.py index 97115d5..734abcd 100644 --- a/django_lostplaces/lostplaces/views/__init__.py +++ b/django_lostplaces/lostplaces/views/__init__.py @@ -4,4 +4,5 @@ from lostplaces.views.base_views import * from lostplaces.views.views import * from lostplaces.views.place_views import * -from lostplaces.views.place_image_views import * \ No newline at end of file +from lostplaces.views.place_image_views import * +from lostplaces.views.explorer_views import * \ No newline at end of file