2015-12-23 05:10:52 +08:00
|
|
|
from django.conf.urls import url
|
|
|
|
|
|
|
|
from . import views
|
|
|
|
|
|
|
|
|
|
|
|
class URLObject(object):
|
|
|
|
urlpatterns = [
|
|
|
|
url(r'^inner/$', views.empty_view, name='urlobject-view'),
|
|
|
|
url(r'^inner/(?P<arg1>[0-9]+)/(?P<arg2>[0-9]+)/$', views.empty_view, name='urlobject-view'),
|
|
|
|
url(r'^inner/\+\\\$\*/$', views.empty_view, name='urlobject-special-view'),
|
|
|
|
]
|
|
|
|
|
|
|
|
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
|