# 382 - Redirect as 404

* extends 404 template (user should check the URL)
* introduces new decorator "uuid_required" which performs a check on a given 'uuid' or 'id' parameter
    * throws a Http404 exception --> redirect to 404 template instead of 500 error template
This commit is contained in:
2024-02-16 10:13:43 +01:00
parent 0b5691f501
commit 11cc8b6766
9 changed files with 62 additions and 30 deletions

View File

@@ -12,11 +12,13 @@ from django.utils.translation import gettext_lazy as _
from intervention.models import Intervention
from konova.contexts import BaseContext
from konova.decorators import uuid_required
from konova.forms import SimpleGeomForm
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.generators import generate_qr_code
@uuid_required
def report_view(request: HttpRequest, id: str):
""" Renders the public report view