urls.py 963 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),
19 20
    url(r'^i18n/', include('django.conf.urls.i18n')),

luxcem's avatar
luxcem committed
21
    url(r"^api/", include(router.urls, namespace="api")),
22
    url(r"^feeds/", include("rp.feeds.urls", namespace="feeds")),
23 24
    url(r"^rp/", include("rp.urls", namespace="rp")),
    url(r'^accounts/', include('allauth.urls')),
luxcem's avatar
luxcem committed
25
]
26 27 28 29 30 31 32

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

    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]