ArchiveBox/archivebox/core/urls.py

27 lines
790 B
Python
Raw Normal View History

2019-04-02 20:36:41 +00:00
from django.contrib import admin
from django.utils.translation import ugettext_lazy
2019-04-02 20:36:41 +00:00
from django.urls import path, include
from django.conf import settings
2019-04-17 09:42:21 +00:00
from core.views import MainIndex, AddLinks, LinkDetails
admin.site.site_header = 'ArchiveBox Admin'
admin.site.index_title = 'Archive Administration'
2019-04-17 09:42:21 +00:00
2019-04-02 20:36:41 +00:00
urlpatterns = [
2019-04-17 09:42:21 +00:00
path('archive/<timestamp>/', LinkDetails.as_view(), name='LinkDetails'),
path('accounts/', include('django.contrib.auth.urls')),
path('admin/', admin.site.urls),
path('add/', AddLinks.as_view(), name='AddLinks'),
path('', MainIndex.as_view(), name='Home'),
2019-04-02 20:36:41 +00:00
]
if settings.SERVE_STATIC:
# serve staticfiles via runserver
from django.contrib.staticfiles import views
urlpatterns += [
path('static/<path>', views.serve),
]