Bugfixing (#27)

* Enforce ordering on some metadata models
* Fix a 500 error while accessing flat pages
* Clean up HTML and fix cards (missing class)
* Make the "driver" app optional and disabled by default
This commit is contained in:
2023-10-10 22:17:21 +02:00
committed by GitHub
parent 448ecae070
commit 87e1107156
9 changed files with 44 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
from ram.utils import git_suffix
__version__ = "0.6.5"
__version__ = "0.7.0"
__version__ += git_suffix(__file__)

View File

@@ -51,7 +51,7 @@ INSTALLED_APPS = [
"rest_framework",
"ram",
"portal",
"driver",
# "driver",
"metadata",
"roster",
"consist",

View File

@@ -13,6 +13,7 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.apps import apps
from django.conf import settings
from django.shortcuts import redirect
from django.conf.urls.static import static
@@ -27,10 +28,15 @@ urlpatterns = [
path("admin/", admin.site.urls),
path("api/v1/consist/", include("consist.urls")),
path("api/v1/roster/", include("roster.urls")),
path("api/v1/dcc/", include("driver.urls")),
path("api/v1/bookshelf/", include("bookshelf.urls")),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# Enable the "/dcc" routing only if the "driver" app is active
if apps.is_installed("driver"):
urlpatterns += [
path("api/v1/dcc/", include("driver.urls")),
]
if settings.DEBUG:
from django.views.generic import TemplateView
from rest_framework.schemas import get_schema_view