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:
parent
ea5fa120b1
commit
816f1e5ace
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue