mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 21:27:49 +02:00
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:
@@ -1,4 +1,4 @@
|
||||
from ram.utils import git_suffix
|
||||
|
||||
__version__ = "0.6.5"
|
||||
__version__ = "0.7.0"
|
||||
__version__ += git_suffix(__file__)
|
||||
|
@@ -51,7 +51,7 @@ INSTALLED_APPS = [
|
||||
"rest_framework",
|
||||
"ram",
|
||||
"portal",
|
||||
"driver",
|
||||
# "driver",
|
||||
"metadata",
|
||||
"roster",
|
||||
"consist",
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user