diff --git a/.idea/runConfigurations/Start_sophon_backend.xml b/.idea/runConfigurations/Start_sophon_backend.xml
index 943fffb..aede7b2 100644
--- a/.idea/runConfigurations/Start_sophon_backend.xml
+++ b/.idea/runConfigurations/Start_sophon_backend.xml
@@ -27,6 +27,7 @@
+
diff --git a/backend/Backend (Django).iml b/backend/Backend (Django).iml
index 41c4599..879ea33 100644
--- a/backend/Backend (Django).iml
+++ b/backend/Backend (Django).iml
@@ -23,5 +23,10 @@
+
\ No newline at end of file
diff --git a/backend/sophon/admin.py b/backend/sophon/admin.py
new file mode 100644
index 0000000..70244c9
--- /dev/null
+++ b/backend/sophon/admin.py
@@ -0,0 +1,20 @@
+import django.contrib.admin.apps
+
+
+class SophonAdminConfig(django.contrib.admin.apps.AdminConfig):
+ """
+ Customized administration site config.
+ """
+ default_site = "sophon.admin.SophonAdminSite"
+
+
+class SophonAdminSite(django.contrib.admin.AdminSite):
+ """
+ Customized administration site.
+ """
+
+ site_header = "Sophon Server Administration"
+ site_title = "Sophon Server Administration"
+ site_url = None
+
+ index_title = "Resources Administration"
diff --git a/backend/sophon/core/admin.py b/backend/sophon/core/admin.py
index 41e3d54..cfb7a27 100644
--- a/backend/sophon/core/admin.py
+++ b/backend/sophon/core/admin.py
@@ -1,15 +1,18 @@
-from django.contrib import admin
+import django.contrib.admin
+import django.contrib.auth.models
from . import models
+django.contrib.admin.site.unregister(django.contrib.auth.models.Group)
-class SophonAdmin(admin.ModelAdmin):
+
+class SophonAdmin(django.contrib.admin.ModelAdmin):
"""
Base :class:`django.contrib.admin.ModelAdmin` class from which all other admin classes inherit.
"""
-@admin.register(models.SophonInstanceDetails)
+@django.contrib.admin.register(models.SophonInstanceDetails)
class SophonInstanceDetails(SophonAdmin):
list_display = (
"name",
@@ -28,7 +31,7 @@ class SophonInstanceDetails(SophonAdmin):
return False
-@admin.register(models.ResearchGroup)
+@django.contrib.admin.register(models.ResearchGroup)
class ResearchGroupAdmin(SophonAdmin):
list_display = (
"slug",
diff --git a/backend/sophon/settings.py b/backend/sophon/settings.py
index 340d94c..d48edad 100644
--- a/backend/sophon/settings.py
+++ b/backend/sophon/settings.py
@@ -265,7 +265,7 @@ BASE_DIR = pathlib.Path(__file__).resolve().parent.parent
# Define the installed django apps
INSTALLED_APPS = [
- 'django.contrib.admin',
+ 'sophon.admin.SophonAdminConfig',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
@@ -299,7 +299,9 @@ ROOT_URLCONF = 'sophon.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
+ 'DIRS': [
+ BASE_DIR / "sophon" / "templates"
+ ],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
diff --git a/backend/sophon/templates/admin/base.html b/backend/sophon/templates/admin/base.html
new file mode 100644
index 0000000..8d972fc
--- /dev/null
+++ b/backend/sophon/templates/admin/base.html
@@ -0,0 +1,56 @@
+{% extends 'admin/base.html' %}
+
+{% block extrahead %}
+
+{% endblock %}
\ No newline at end of file