2018-12-08 06:52:28 +08:00
|
|
|
from django.urls import path, re_path
|
2015-12-23 05:10:52 +08:00
|
|
|
|
|
|
|
from . import views
|
|
|
|
|
|
|
|
|
2017-01-19 15:39:46 +08:00
|
|
|
class URLObject:
|
2015-12-23 05:10:52 +08:00
|
|
|
urlpatterns = [
|
2018-12-08 06:52:28 +08:00
|
|
|
path("inner/", views.empty_view, name="urlobject-view"),
|
|
|
|
re_path(
|
|
|
|
r"^inner/(?P<arg1>[0-9]+)/(?P<arg2>[0-9]+)/$",
|
|
|
|
views.empty_view,
|
|
|
|
name="urlobject-view",
|
|
|
|
),
|
|
|
|
re_path(r"^inner/\+\\\$\*/$", views.empty_view, name="urlobject-special-view"),
|
2015-12-23 05:10:52 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
def __init__(self, app_name, namespace=None):
|
|
|
|
self.app_name = app_name
|
|
|
|
self.namespace = namespace
|
|
|
|
|
|
|
|
@property
|
|
|
|
def urls(self):
|
2017-01-10 22:57:49 +08:00
|
|
|
return (self.urlpatterns, self.app_name), self.namespace
|
2015-12-23 05:10:52 +08:00
|
|
|
|
|
|
|
@property
|
|
|
|
def app_urls(self):
|
|
|
|
return self.urlpatterns, self.app_name
|