fix issue with editing and deleting phonebook numbers starting with one or more 0s, django would remove leading 0s because the url pattern was an int, use a regex expecting 4 digits instead

This commit is contained in:
Thomas Steen Rasmussen 2021-08-12 03:16:39 +02:00
parent ea5fa120b1
commit 816f1e5ace
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
from django.urls import include, path
from django.urls import include, path, re_path
from .views import (
DectExportView,
@ -25,8 +25,8 @@ urlpatterns = [
DectRegistrationCreateView.as_view(),
name="dectregistration_create",
),
path(
"<int:dect_number>/",
re_path(
r"^(?P<dect_number>\d{4})/",
include(
[
path(