Skip to content

Commit

Permalink
Merge branch 'release/1.4.0' of github.com:MetaCell/scicrunch-antibod…
Browse files Browse the repository at this point in the history
…y-registry into release/1.4.0
  • Loading branch information
filippomc committed Jun 12, 2024
2 parents 91c7264 + 154e729 commit e075bbf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
18 changes: 9 additions & 9 deletions applications/portal/backend/portal/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@
"django.contrib.messages",
"django.contrib.staticfiles",
"django.contrib.postgres",
"import_export"
"import_export",
"django_prometheus",
]

MIDDLEWARE = [
"django_prometheus.middleware.PrometheusBeforeMiddleware",
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"cloudharness.middleware.django.CloudharnessMiddleware",
"django_prometheus.middleware.PrometheusAfterMiddleware",
]

ROOT_URLCONF = "portal.urls"
Expand Down Expand Up @@ -125,15 +128,12 @@
from cloudharness_django.settings import *

DATABASES["default"]["TEST"] = {
"ENGINE": "django.db.backends.postgres",
"NAME": "testdb",
}
"ENGINE": "django.db.backends.postgres",
"NAME": "testdb",
}

# add the local apps
INSTALLED_APPS += [
"api",
"portal"
]
INSTALLED_APPS += ["api", "portal"]

# override django admin base template with a local template
# to add some custom styling
Expand All @@ -154,4 +154,4 @@

# portal specific roles

from .constants import *
from .constants import *
17 changes: 11 additions & 6 deletions applications/portal/backend/portal/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,26 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""

import re
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, re_path
from django.urls import include, path, re_path

from portal.views import index


urlpatterns = [path("admin/", admin.site.urls)]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + \
static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns = [
path("admin/", admin.site.urls),
path("", include("django_prometheus.urls")),
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + static(
settings.STATIC_URL, document_root=settings.STATIC_ROOT
)
urlpatterns += [re_path(r"^(?P<path>.*)$", index, name="index")]


admin.site.site_header = 'Antibody Registry admin'
admin.site.site_title = 'Admin: Antibody Registry'
admin.site.site_header = "Antibody Registry admin"
admin.site.site_title = "Admin: Antibody Registry"
admin.site.index_title = "Index"
1 change: 1 addition & 0 deletions applications/portal/backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
gdown>=4.6.0
pandas==1.4.4
django-import-export==3.0.1
django-prometheus==2.3.1
psycopg2-binary==2.9.6

# Security
Expand Down

0 comments on commit e075bbf

Please sign in to comment.