urls.py 681 Bytes
Newer Older
luxcem's avatar
luxcem committed
1 2 3
"""
rp_new URL Configuration
"""
luxcem's avatar
luxcem committed
4

5
from django.conf import settings
luxcem's avatar
luxcem committed
6
from django.conf.urls import url, include
7
from django.conf.urls.static import static
luxcem's avatar
luxcem committed
8 9
from django.contrib import admin

luxcem's avatar
luxcem committed
10 11 12 13 14 15 16
# Django rest framework router
from core.routers import DefaultRouter
from rp.api.urls import router as rp_router

router = DefaultRouter()
router.extend(rp_router)

luxcem's avatar
luxcem committed
17 18
urlpatterns = [
    url(r"^admin/", admin.site.urls),
luxcem's avatar
luxcem committed
19
    url(r"^api/", include(router.urls, namespace="api")),
luxcem's avatar
luxcem committed
20
    url(r"^rp/", include("rp.urls", namespace="rp"))
luxcem's avatar
luxcem committed
21
]
22 23 24 25 26 27 28

if settings.DEBUG:
    # Serve static files in DEBUG mode
    urlpatterns += static(
        settings.MEDIA_URL,
        document_root=settings.MEDIA_ROOT
    )