bx-1379-redesign #15
|
@ -84,6 +84,7 @@ INSTALLED_APPS = [
|
|||
"crispy_forms",
|
||||
"crispy_bootstrap4",
|
||||
"colorfield",
|
||||
'import_export',
|
||||
"frontImages",
|
||||
"object",
|
||||
]
|
||||
|
@ -184,6 +185,8 @@ REST_FRAMEWORK = {
|
|||
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4"
|
||||
CRISPY_TEMPLATE_PACK = "bootstrap4"
|
||||
|
||||
IMPORT_EXPORT_USE_TRANSACTIONS = True
|
||||
|
||||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
||||
LOGGING = {
|
||||
"version": 1,
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
from django.contrib import admin
|
||||
from import_export.admin import ImportExportModelAdmin
|
||||
from .models import ClickableArea, Element3D, Environment, Scene3D
|
||||
|
||||
|
||||
class Scene3DAdmin(admin.ModelAdmin):
|
||||
class Scene3DAdmin(ImportExportModelAdmin, admin.ModelAdmin):
|
||||
filter_horizontal = ("elements",)
|
||||
|
||||
class ImportExportBtnAdmin(ImportExportModelAdmin, admin.ModelAdmin):
|
||||
pass
|
||||
|
||||
admin.site.register(Environment)
|
||||
admin.site.register(Environment, ImportExportBtnAdmin)
|
||||
admin.site.register(Scene3D, Scene3DAdmin)
|
||||
admin.site.register(Element3D)
|
||||
admin.site.register(ClickableArea)
|
||||
admin.site.register(Element3D, ImportExportBtnAdmin)
|
||||
admin.site.register(ClickableArea, ImportExportBtnAdmin)
|
||||
|
|
|
@ -43,6 +43,20 @@ files = [
|
|||
django = ">=4.2"
|
||||
django-crispy-forms = ">=2.0"
|
||||
|
||||
[[package]]
|
||||
name = "diff-match-patch"
|
||||
version = "20230430"
|
||||
description = "Diff Match and Patch"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
files = [
|
||||
{file = "diff-match-patch-20230430.tar.gz", hash = "sha256:953019cdb9c9d2c9e47b5b12bcff3cf4746fc4598eb406076fa1fc27e6a1f15c"},
|
||||
{file = "diff_match_patch-20230430-py3-none-any.whl", hash = "sha256:dce43505fb7b1b317de7195579388df0746d90db07015ed47a85e5e44930ef93"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
dev = ["attribution (==1.6.2)", "black (==23.3.0)", "flit (==3.8.0)", "mypy (==1.2.0)", "ufmt (==2.1.0)", "usort (==1.0.6)"]
|
||||
|
||||
[[package]]
|
||||
name = "django"
|
||||
version = "5.0.6"
|
||||
|
@ -134,6 +148,31 @@ files = [
|
|||
[package.dependencies]
|
||||
Django = ">=4.2"
|
||||
|
||||
[[package]]
|
||||
name = "django-import-export"
|
||||
version = "4.1.1"
|
||||
description = "Django application and library for importing and exporting data with included admin integration."
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "django_import_export-4.1.1-py3-none-any.whl", hash = "sha256:730ae2443a02b1ba27d8dba078a27ae9123adfcabb78161b4f130843607b3df9"},
|
||||
{file = "django_import_export-4.1.1.tar.gz", hash = "sha256:16ecc5a9f0df46bde6eb278a3e65ebda0ee1db55656f36440e9fb83f40ab85a3"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
diff-match-patch = "*"
|
||||
Django = ">=3.2"
|
||||
tablib = "3.5.0"
|
||||
|
||||
[package.extras]
|
||||
all = ["tablib[all] (==3.5.0)"]
|
||||
cli = ["tablib[cli]"]
|
||||
ods = ["tablib[ods]"]
|
||||
pandas = ["tablib[pandas]"]
|
||||
xls = ["tablib[xls] (==3.5.0)"]
|
||||
xlsx = ["tablib[xlsx] (==3.5.0)"]
|
||||
yaml = ["tablib[yaml] (==3.5.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "djangorestframework"
|
||||
version = "3.15.1"
|
||||
|
@ -324,6 +363,27 @@ files = [
|
|||
dev = ["build", "hatch"]
|
||||
doc = ["sphinx"]
|
||||
|
||||
[[package]]
|
||||
name = "tablib"
|
||||
version = "3.5.0"
|
||||
description = "Format agnostic tabular data library (XLS, JSON, YAML, CSV, etc.)"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "tablib-3.5.0-py3-none-any.whl", hash = "sha256:9821caa9eca6062ff7299fa645e737aecff982e6b2b42046928a6413c8dabfd9"},
|
||||
{file = "tablib-3.5.0.tar.gz", hash = "sha256:f6661dfc45e1d4f51fa8a6239f9c8349380859a5bfaa73280645f046d6c96e33"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
all = ["markuppy", "odfpy", "openpyxl (>=2.6.0)", "pandas", "pyyaml", "tabulate", "xlrd", "xlwt"]
|
||||
cli = ["tabulate"]
|
||||
html = ["markuppy"]
|
||||
ods = ["odfpy"]
|
||||
pandas = ["pandas"]
|
||||
xls = ["xlrd", "xlwt"]
|
||||
xlsx = ["openpyxl (>=2.6.0)"]
|
||||
yaml = ["pyyaml"]
|
||||
|
||||
[[package]]
|
||||
name = "taskipy"
|
||||
version = "1.12.2"
|
||||
|
@ -377,4 +437,4 @@ files = [
|
|||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "e2a879fbbc841d8bceb6c622ba4fefd3930ffe8944faa0c9a3c9e976bbd7dd34"
|
||||
content-hash = "721ce91ef3ad82e5b07e5c1c94740541e5edc6250a4c6c51fcfa5ff2ab2cc290"
|
||||
|
|
|
@ -20,6 +20,7 @@ django-crispy-forms = "^2.2"
|
|||
crispy-bootstrap4 = "^2024.1"
|
||||
django-extensions = "^3.2.3"
|
||||
django-colorfield = "^0.11.0"
|
||||
django-import-export = "^4.1.1"
|
||||
|
||||
|
||||
[build-system]
|
||||
|
|
Loading…
Reference in New Issue