#64 Testing drafts in differents views
This commit is contained in:
@@ -12,6 +12,7 @@ from django.contrib import messages
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.utils.translation import gettext as _
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from django.shortcuts import render, redirect, get_object_or_404
|
||||
from django.urls import reverse_lazy, reverse
|
||||
@@ -59,6 +60,12 @@ class PlaceDetailView(IsAuthenticatedMixin, IsEligibleToSeePlaceMixin, View):
|
||||
place.calculate_place_level()
|
||||
explorer = request.user.explorer
|
||||
|
||||
if place.mode == 'draft':
|
||||
messages.info(
|
||||
self.request,
|
||||
_('This place is still in draft mode and only visible to the submitter and superusers')
|
||||
)
|
||||
|
||||
context = {
|
||||
'place': place,
|
||||
'mapping_config': {
|
||||
|
||||
Reference in New Issue
Block a user