obsolete.computer

multistream/frontend/urls.py

File Type: text/x-script.python

#multistream URL Configuration

from django.contrib import admin
from django.urls import path, re_path
from django.views import static

from frontend import views, settings

handler404 = views.not_found
handler500 = views.server_error

urlpatterns = [
    path('', views.index),
    path('ms-admin/', admin.site.urls),
    path('favicon.ico/', views.not_found),
    re_path(r'^edit/(?P<streams_url>[a-zA-Z0-9_\-/]+)$', views.index),
    path('view/', views.view_streams),
    path('ms-getobject/type/<slug:obj_type>/tag/<slug:obj_tag>/index/<int:obj_index>/', views.get_object),
    path('community/<slug:community>/', views.view_community),
    re_path(r'^(?P<streams_url>[a-zA-Z0-9_\-/]+)/$', views.view_streams),
]

if settings.DEBUG == False and settings.RUNNING_ON_DEV == True:
    urlpatterns.append(path('static/<path>', static.serve, {'document_root': settings.STATIC_URL}))

Meta