admin pannel update

This commit is contained in:
Parsa Nazer
2025-02-02 03:19:33 +03:30
parent 83b265ad38
commit 079e3ed7b7
+102 -47
View File
@@ -178,6 +178,7 @@ STATIC_ROOT = '/app/static'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'custom_static'),
# BASE_DIR / "core" / "static"
]
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
@@ -233,31 +234,50 @@ UNFOLD = {
"href": lambda request: static("favicon.svg"),
},
],
# "LOGIN": {
# "image": lambda request: static("robot.png"),
# },
"BORDER_RADIUS": "15px",
"SHOW_HISTORY": True,
"SHOW_VIEW_ON_SITE": True,
"ENVIRONMENT": "core.settings.environment_callback",
"COLORS": {
"COLORS": {
"base": {
"50": "249 250 251",
"100": "243 244 246",
"200": "229 231 235",
"300": "209 213 219",
"400": "156 163 175",
"500": "107 114 128",
"600": "75 85 99",
"700": "55 65 81",
"800": "31 41 55",
"900": "17 24 39",
"950": "3 7 18"
},
"primary": {
"50": "255 241 242",
"100": "255 228 230",
"200": "254 205 211",
"300": "253 164 175",
"400": "251 113 133",
"500": "244 63 94",
"600": "225 29 72",
"700": "190 18 60",
"800": "159 18 57",
"900": "136 19 55",
"950": "76 5 25"
},
"font": {
"subtle-light": "107 114 128",
"subtle-dark": "156 163 175",
"default-light": "75 85 99",
"default-dark": "209 213 219",
"important-light": "17 24 39",
"important-dark": "243 244 246",
},
"primary": {
"50": "245 250 255",
"100": "230 243 254",
"200": "180 218 253",
"300": "131 193 252",
"400": "81 168 251",
"500": "31 144 249",
"600": "6 118 224",
"700": "4 92 174",
"800": "3 66 124",
"900": "2 39 75",
"950": "1 13 25"
"subtle-light": "var(--color-base-500)", # text-base-500
"subtle-dark": "var(--color-base-400)", # text-base-400
"default-light": "var(--color-base-600)", # text-base-600
"default-dark": "var(--color-base-300)", # text-base-300
"important-light": "var(--color-base-900)", # text-base-900
"important-dark": "var(--color-base-100)", # text-base-100
},
},
"EXTENSIONS": {
@@ -269,7 +289,7 @@ UNFOLD = {
},
"SIDEBAR": {
"show_search": True,
"show_search": False,
"show_all_applications": False,
"navigation": [
{
@@ -282,11 +302,6 @@ UNFOLD = {
"icon": "dashboard",
"link": reverse_lazy("admin:index"),
},
{
"title": _("اسلایدر"),
"icon": "home",
"link": reverse_lazy("admin:home_slidermodel_changelist"),
},
{
"title": _("سفارشات"),
"icon": "shopping_cart",
@@ -299,9 +314,9 @@ UNFOLD = {
{
"title": _("پنل فروش محصولات وبسایت"),
"title": _("Shop Products"),
"separator": True,
"collapsible": True,
"collapsible": False,
"items": [
{
"title": _("محصولات"),
@@ -309,7 +324,27 @@ UNFOLD = {
"link": reverse_lazy("admin:product_productmodel_changelist"),
},
# esm category model ro lower case bezar inja amir
{
"title": _("نظرات"),
"icon": "chat",
"link": reverse_lazy("admin:product_commentmodel_changelist"),
},
{
"title": _("قیمت دلار"),
"icon": "payments",
"link": reverse_lazy("admin:product_dollormodel_changelist"),
"badge": "utils.admin.dollor_price",
},
],
},
{
"title": _("Categories section"),
"separator": True,
"collapsible": False,
"items": [
{
"title": _("دسته بندی"),
@@ -320,23 +355,38 @@ UNFOLD = {
"title": _("زیر دسته بندی"),
"icon": "category",
"link": reverse_lazy("admin:product_subcategorymodel_changelist"),
}
],
},
{
"title": _("Visual Sections "),
"separator": True,
"collapsible": True,
"items": [
{
"title": _("اسلاید ها"),
"icon": "slide_library",
"link": reverse_lazy("admin:home_slidermodel_changelist"),
},
{
"title": _("نظرات"),
"icon": "chat",
"link": reverse_lazy("admin:product_commentmodel_changelist"),
},
"title": _("عکس مقایسه"),
"icon": "compare",
"link": reverse_lazy("admin:home_homeimagemodel_changelist"),
}
,
{
"title": _("قیمت دلار"),
"icon": "payments",
"link": reverse_lazy("admin:product_dollormodel_changelist"),
},
"title": _("مقالات و بلاگ ها"),
"icon": "newsmode",
"link": reverse_lazy("admin:blog_blogmodel_changelist"),
}
],
},
{
"title": _("بخش کاربران و مشتریان"),
"title": _("Users and Customers"),
"separator": True,
"collapsible": True,
"items": [
@@ -345,30 +395,35 @@ UNFOLD = {
"title": _("کاربران"),
"icon": "person",
"link": reverse_lazy("admin:account_user_changelist"),
},{
"title": _("چت محصول"),
"icon": "chat",
"link": reverse_lazy("admin:chat_productchatmodel_changelist"),
},
{
"title": _("ادرس ها"),
"icon": "contact_mail",
"link": reverse_lazy("admin:account_useraddressmodel_changelist"),
},
],
},
{
"title": _("بخش هوش مصنوعی"),
"title": _("Ticket and Support"),
"separator": True,
"collapsible": True,
"items": [
{
"title": _("چت محصول"),
"icon": "chat",
"link": reverse_lazy("admin:chat_productchatmodel_changelist"),
"title": _("تیکت"),
"icon": "confirmation_number",
"link": reverse_lazy("admin:ticket_ticket_changelist"),
},
],
},
],
},
@@ -376,7 +431,7 @@ UNFOLD = {
AUTH_USER_MODEL = 'account.User'
def environment_callback(request):
return ["Development", "warning"]
return ["Development", "danger"]
def badge_callback(request):