23 lines
850 B
Python
23 lines
850 B
Python
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.views.generic import RedirectView, TemplateView
|
|
|
|
urlpatterns = [
|
|
path('admin/', admin.site.urls),
|
|
path('users/', include('users.urls')),
|
|
path('accounts/', include('django.contrib.auth.urls')), # For login/logout
|
|
path('', include('store.urls')), # Store is the home app
|
|
path('home', RedirectView.as_view(url='/', permanent=True), name='home'), # Redirect /home to /
|
|
path('decks/', include('decks.urls')),
|
|
path('proxy/', include('proxy.urls')),
|
|
|
|
# SEO
|
|
path('robots.txt', TemplateView.as_view(template_name="robots.txt", content_type="text/plain")),
|
|
]
|
|
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|