from django.contrib.admin.views.decorators import staff_member_required
from django.urls import re_path
from flatblocks.views import edit

urlpatterns = [
    re_path("^edit/(?P<pk>\d+)/$", staff_member_required(edit), name="flatblocks-edit"),
]

@@ -160,16 +160,26 @@
 re_path(
+%0A        r
 %22%5Eedit/(
@@ -192,16 +192,24 @@
 %5Cd+)/$%22,
+%0A       
  staff_m
@@ -229,16 +229,24 @@
 d(edit),
+%0A       
  name=%22f
@@ -260,13 +260,19 @@
 ks-edit%22
+,%0A    
 ),%0A%5D%0A

Use raw string notation for regular expression.