feat(apps): Install django-unfold

This commit is contained in:
Tom Hubrecht 2024-09-21 23:01:21 +02:00
parent 7c11b0de4b
commit e31731f8e6
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc
4 changed files with 43 additions and 1 deletions

View file

@ -54,6 +54,7 @@ in
ps.django-sass-processor
ps.django-sass-processor-dart-sass
ps.django-stubs
ps.django-unfold
ps.ipython
ps.loadcredential
ps.pykanidm

View file

@ -0,0 +1,40 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
django,
}:
buildPythonPackage rec {
pname = "django-unfold";
version = "0.39.0";
pyproject = true;
src = fetchFromGitHub {
owner = "unfoldadmin";
repo = "django-unfold";
rev = version;
hash = "sha256-CmmlTx2eLcANc6ANy25ii1KVebkmUEJmDCe+/RwakAg=";
};
build-system = [
poetry-core
];
dependencies = [
django
];
pythonImportsCheck = [
"unfold"
];
meta = {
description = "Modern Django admin theme for seamless interface development";
homepage = "https://github.com/unfoldadmin/django-unfold";
changelog = "https://github.com/unfoldadmin/django-unfold/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
};
}

View file

@ -24,6 +24,7 @@ ALLOWED_HOSTS = credentials.get_json("ALLOWED_HOSTS", [])
# List the installed applications
INSTALLED_APPS = [
"unfold",
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",

View file

@ -25,11 +25,11 @@ urlpatterns = [
path("login", TemplateView.as_view(template_name="login.html"), name="login"),
path("", include("dgsi.urls")),
path("accounts/", include("allauth.urls")),
path("admin/", admin.site.urls),
]
if settings.DEBUG:
urlpatterns += [
path("admin/", admin.site.urls),
path("__reload__/", include("django_browser_reload.urls")),
path("__debug__/", include("debug_toolbar.urls")),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)