2021-12-22 18:03:21 +00:00
|
|
|
"""URL patterns for the example project."""
|
2016-02-15 21:47:21 +00:00
|
|
|
import os
|
2009-09-30 14:53:09 +00:00
|
|
|
|
2021-12-16 11:26:40 +00:00
|
|
|
from django.conf.urls import include
|
2009-09-30 14:53:09 +00:00
|
|
|
from django.contrib import admin
|
2021-12-16 11:26:40 +00:00
|
|
|
from django.urls import path, re_path
|
2016-02-15 17:54:25 +00:00
|
|
|
from django.views.static import serve
|
|
|
|
|
|
2009-09-30 14:53:09 +00:00
|
|
|
admin.autodiscover()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ROOT_PATH = os.path.dirname(os.path.dirname(__file__))
|
|
|
|
|
|
2016-02-15 17:54:25 +00:00
|
|
|
urlpatterns = (
|
2009-09-30 14:53:09 +00:00
|
|
|
# Example:
|
|
|
|
|
# (r'^sample/', include('sample.foo.urls')),
|
2013-03-20 11:52:09 +00:00
|
|
|
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
|
2009-09-30 14:53:09 +00:00
|
|
|
# to INSTALLED_APPS to enable admin documentation:
|
|
|
|
|
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
|
|
|
|
# Uncomment the next line to enable the admin:
|
2021-12-16 11:26:40 +00:00
|
|
|
path("admin/", admin.site.urls),
|
|
|
|
|
path("categories/", include("categories.urls")),
|
2016-02-15 21:47:21 +00:00
|
|
|
# r'^cats/', include('categories.urls')),
|
2021-12-16 11:26:40 +00:00
|
|
|
re_path(
|
|
|
|
|
r"^static/categories/(?P<path>.*)$", serve, {"document_root": ROOT_PATH + "/categories/media/categories/"}
|
|
|
|
|
),
|
2010-12-16 17:26:20 +00:00
|
|
|
# (r'^static/editor/(?P<path>.*)$', 'django.views.static.serve',
|
|
|
|
|
# {'document_root': ROOT_PATH + '/editor/media/editor/',
|
|
|
|
|
# 'show_indexes':True}),
|
2021-12-16 11:26:40 +00:00
|
|
|
re_path(r"^static/(?P<path>.*)$", serve, {"document_root": os.path.join(ROOT_PATH, "example", "static")}),
|
2013-03-20 11:52:09 +00:00
|
|
|
)
|