diff --git a/selfserv/urls.py b/selfserv/urls.py index 22c08b8..b993489 100644 --- a/selfserv/urls.py +++ b/selfserv/urls.py @@ -1,5 +1,5 @@ # Society Self-Service -# Copyright © 2018 Yingtong Li (RunasSudo) +# Copyright © 2018-2019 Yingtong Li (RunasSudo) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -19,11 +19,16 @@ from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path -urlpatterns = [ - path('admin/', admin.site.urls), - path('auth/', include('social_django.urls', namespace='social')), - path('treasury/', include('sstreasury.urls')), - path('promotions/', include('sspromotions.urls')), - path('membership/', include('ssmembership.urls')), - path('', include('ssmain.urls')), -] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) +urlpatterns = [] +urlpatterns.append(path('admin/', admin.site.urls)) +urlpatterns.append(path('auth/', include('social_django.urls', namespace='social'))) + +if 'sstreasury' in settings.INSTALLED_APPS: + urlpatterns.append(path('treasury/', include('sstreasury.urls'))) +if 'sspromotions' in settings.INSTALLED_APPS: + urlpatterns.append(path('promotions/', include('sspromotions.urls'))) +if 'ssmembership' in settings.INSTALLED_APPS: + urlpatterns.append(path('membership/', include('ssmembership.urls'))) + +urlpatterns.append(path('', include('ssmain.urls'))) +urlpatterns.extend(static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)) diff --git a/ssmain/jinja2/ssmain/splash.html b/ssmain/jinja2/ssmain/splash.html index 53e8223..1442446 100644 --- a/ssmain/jinja2/ssmain/splash.html +++ b/ssmain/jinja2/ssmain/splash.html @@ -2,7 +2,7 @@ {# Society Self-Service - Copyright © 2018 Yingtong Li (RunasSudo) + Copyright © 2018-2019 Yingtong Li (RunasSudo) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by @@ -30,17 +30,19 @@ {% block content %}