from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
urlpatterns = [
# url(r'^', include('mainApp.urls')),
url(r'^admin/', include('adminApp.urls')),
# url(r'^user/', include('userManagementApp.urls')),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# код urls.py из adminApp
from django.conf.urls import url
from .views import *
urlpatterns = [
url(r'^$', admin_main, name='admin_main'),
]
# CRUD Rubrics
urlpatterns += [
url(r'rubrics/', admin_rubrics, name='admin_rubrics'),
url(r'add/rubrics$', admin_add_rubrics, name='admin_add_rubrics'),
url(r'delete/rubrics/(\d+)$', admin_delete_rubrics, name='admin_delete_rubrics'),
url(r'update/rubrics/(\d+)$', admin_update_rubrics, name='admin_update_rubrics')]
# CRUD Subrubrics
urlpatterns += [
url(r'subrubrics/', admin_subrubrics, name='admin_subrubrics'),
url(r'add/subrubrics$', admin_add_subrubrics, name='admin_add_subrubrics'),
url(r'delete/subrubrics/(\d+)$', admin_delete_subrubrics, name='admin_delete_subrubrics'),
url(r'update/subrubrics/(\d+)$', admin_update_subrubrics, name='admin_update_subrubrics')]