Compare commits
6 Commits
ca0e1a48dc
...
b0ddf91677
Author | SHA1 | Date | |
---|---|---|---|
b0ddf91677 | |||
c30af40079 | |||
dd266f8cdf | |||
9c70da0b77 | |||
89bc00e5da | |||
72dc41ab79 |
@ -137,17 +137,6 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads')
|
|||||||
AUTH_USER_MODEL = 'lostplaces_app.Explorer'
|
AUTH_USER_MODEL = 'lostplaces_app.Explorer'
|
||||||
|
|
||||||
# Templates to use for authentication
|
# Templates to use for authentication
|
||||||
LOGIN_REDIRECT_URL = 'home'
|
|
||||||
LOGOUT_REDIRECT_URL = 'home'
|
|
||||||
|
|
||||||
LOGIN_URL = reverse_lazy('login')
|
LOGIN_URL = reverse_lazy('login')
|
||||||
|
LOGIN_REDIRECT_URL = reverse_lazy('lostplaces_home')
|
||||||
THUMBNAIL_ALIASES = {
|
LOGOUT_REDIRECT_URL = reverse_lazy('lostplaces_home')
|
||||||
'': {
|
|
||||||
'thumbnail': {'size': (300, 200), 'crop': True},
|
|
||||||
'hero': {'size': (700, 466), 'crop': True},
|
|
||||||
'large': {'size': (1920, 1920), 'crop': False},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
SVG_ICONS_SOURCE_FILE = os.path.join(BASE_DIR, 'lostplaces_app', 'static', 'icons', 'icons.icomoon.json')
|
|
||||||
|
@ -23,8 +23,11 @@ from django.conf.urls.static import static
|
|||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
from django.views.generic.base import TemplateView
|
from django.views.generic.base import TemplateView
|
||||||
|
|
||||||
|
from lostplaces_app.views import SignUpView
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
|
path('signup/', SignUpView.as_view(), name='signup'),
|
||||||
path('explorers/', include('django.contrib.auth.urls')),
|
path('explorers/', include('django.contrib.auth.urls')),
|
||||||
path('', include('lostplaces_app.urls')),
|
path('', include('lostplaces_app.urls')),
|
||||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
@ -1,2 +1,11 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
settings.THUMBNAIL_ALIASES = {
|
||||||
|
'': {
|
||||||
|
'thumbnail': {'size': (300, 200), 'crop': True},
|
||||||
|
'hero': {'size': (700, 466), 'crop': True},
|
||||||
|
'large': {'size': (1920, 1920), 'crop': False},
|
||||||
|
},
|
||||||
|
}
|
@ -46,7 +46,7 @@
|
|||||||
<aside class="LP-Main__Sidebar">
|
<aside class="LP-Main__Sidebar">
|
||||||
<nav class="LP-Menu LP-Menu--sidebar">
|
<nav class="LP-Menu LP-Menu--sidebar">
|
||||||
<ul class="LP-Menu__List">
|
<ul class="LP-Menu__List">
|
||||||
<li class="LP-Menu__Item"><a href="/" class="LP-Link"><span class="LP-Link__Text">Home</span></a></li>
|
<li class="LP-Menu__Item"><a href="{% url 'lostplaces_home' %}" class="LP-Link"><span class="LP-Link__Text">Home</span></a></li>
|
||||||
<li class="LP-Menu__Item"><a href="{% url 'flatpage' slug='codex' %}" class="LP-Link"><span class="LP-Link__Text">UrBex codex</span></a></li>
|
<li class="LP-Menu__Item"><a href="{% url 'flatpage' slug='codex' %}" class="LP-Link"><span class="LP-Link__Text">UrBex codex</span></a></li>
|
||||||
|
|
||||||
{% block additional_menu_items %}
|
{% block additional_menu_items %}
|
||||||
@ -89,4 +89,5 @@
|
|||||||
{% endblock footer %}
|
{% endblock footer %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -3,7 +3,6 @@ from .views import (
|
|||||||
HomeView,
|
HomeView,
|
||||||
PlaceDetailView,
|
PlaceDetailView,
|
||||||
PlaceListView,
|
PlaceListView,
|
||||||
SignUpView,
|
|
||||||
PlaceCreateView,
|
PlaceCreateView,
|
||||||
PlaceUpdateView,
|
PlaceUpdateView,
|
||||||
PlaceDeleteView,
|
PlaceDeleteView,
|
||||||
@ -15,8 +14,7 @@ from .views import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', HomeView.as_view(), name='home'),
|
path('', HomeView.as_view(), name='lostplaces_home'),
|
||||||
path('signup/', SignUpView.as_view(), name='signup'),
|
|
||||||
path('place/<int:pk>/', PlaceDetailView.as_view(), name='place_detail'),
|
path('place/<int:pk>/', PlaceDetailView.as_view(), name='place_detail'),
|
||||||
path('place/create/', PlaceCreateView.as_view(), name='place_create'),
|
path('place/create/', PlaceCreateView.as_view(), name='place_create'),
|
||||||
path('photo_album/create/<int:place_id>', PhotoAlbumCreateView.as_view(), name='photo_album_create'),
|
path('photo_album/create/<int:place_id>', PhotoAlbumCreateView.as_view(), name='photo_album_create'),
|
||||||
|
@ -17,7 +17,7 @@ class IsAuthenticated(LoginRequiredMixin, View):
|
|||||||
If the user is not logged in, he gets redirected to
|
If the user is not logged in, he gets redirected to
|
||||||
the login page.
|
the login page.
|
||||||
'''
|
'''
|
||||||
redirect_field_name = 'redirect_to'
|
login_url = reverse_lazy('login')
|
||||||
permission_denied_message = 'Please login to proceed'
|
permission_denied_message = 'Please login to proceed'
|
||||||
|
|
||||||
def handle_no_permission(self):
|
def handle_no_permission(self):
|
||||||
@ -83,7 +83,6 @@ class PlaceAssetCreateView(IsAuthenticated, SuccessMessageMixin, CreateView):
|
|||||||
|
|
||||||
class PlaceAssetDeleteView(IsAuthenticated, IsPlaceSubmitter, SingleObjectMixin, View):
|
class PlaceAssetDeleteView(IsAuthenticated, IsPlaceSubmitter, SingleObjectMixin, View):
|
||||||
model = None
|
model = None
|
||||||
pk_url_kwarg = 'pk'
|
|
||||||
success_message = ''
|
success_message = ''
|
||||||
permission_denied_message = ''
|
permission_denied_message = ''
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user