django-smartbase-admin 0.2.79__py3-none-any.whl → 0.2.81__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -390,12 +390,10 @@ class SBAdminImageWidget(SBAdminBaseWidget, AdminImageWidget):
390
390
 
391
391
 
392
392
  class SBAdminFilerFileWidget(SBAdminBaseWidget, FilerAdminFileWidget):
393
- template_name = "sb_admin/widgets/filer_file.html"
394
-
395
393
  def __init__(self, form_field=None, *args, **kwargs):
396
394
  self.form_field = form_field
397
395
  super(FilerAdminFileWidget, self).__init__(
398
- form_field.rel, form_field.view.admin_site
396
+ form_field.rel, form_field.view.admin_site, *args, **kwargs
399
397
  )
400
398
 
401
399
  def render(self, name, value, attrs=None, renderer=None):
@@ -454,7 +452,9 @@ class SBAdminFilerFileWidget(SBAdminBaseWidget, FilerAdminFileWidget):
454
452
  "id": css_id,
455
453
  "admin_icon_delete": "admin/img/icon-deletelink.svg",
456
454
  }
457
- html = render_to_string(self.template_name, context)
455
+ # using template name directly to prevent override of template_name
456
+ # when calling render of ForeignKeyRawIdWidget
457
+ html = render_to_string("sb_admin/widgets/filer_file.html", context)
458
458
  return mark_safe(html)
459
459
 
460
460
 
@@ -2,10 +2,9 @@ import json
2
2
  import pickle
3
3
  import urllib
4
4
 
5
- from django.conf import settings
6
- from django.db.models import Q, FilteredRelation, F, Value, CharField
5
+ from django.db.models import Q, FilteredRelation, F
7
6
  from django.shortcuts import redirect
8
- from django_smartbase_admin.templatetags.sb_admin_tags import SBAdminJSONEncoder
7
+ from django.urls import reverse
9
8
 
10
9
  from django_smartbase_admin.engine.const import (
11
10
  BASE_PARAMS_NAME,
@@ -17,6 +16,7 @@ from django_smartbase_admin.engine.const import (
17
16
  )
18
17
  from django_smartbase_admin.engine.request import SBAdminViewRequestData
19
18
  from django_smartbase_admin.services.translations import SBAdminTranslationsService
19
+ from django_smartbase_admin.templatetags.sb_admin_tags import SBAdminJSONEncoder
20
20
 
21
21
 
22
22
  class SBAdminViewService(object):
@@ -107,7 +107,8 @@ class SBAdminViewService(object):
107
107
  response.content = (
108
108
  response.content.decode()
109
109
  .replace(
110
- f'href="/{settings.ADMIN_PATH}', f'href="/{settings.SB_ADMIN_PATH}'
110
+ f'href="{reverse("admin:index")}',
111
+ f'href="{reverse("sb_admin:index")}"',
111
112
  )
112
113
  .encode()
113
114
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-smartbase-admin
3
- Version: 0.2.79
3
+ Version: 0.2.81
4
4
  Summary:
5
5
  Author: SmartBase
6
6
  Author-email: info@smartbase.sk
@@ -5,7 +5,7 @@ django_smartbase_admin/actions/advanced_filters.py,sha256=Vm8b6TAwNehR8INjolFG7p
5
5
  django_smartbase_admin/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  django_smartbase_admin/admin/admin_base.py,sha256=ihhQbo6gn0QOyjZnj0oYJ6Du06MgHB9j9jdwUdhm6IY,40324
7
7
  django_smartbase_admin/admin/site.py,sha256=VrJBhwgZsLa2GohvjnNL7m4dVR3S4Ou1V1UzfE1qOoQ,6577
8
- django_smartbase_admin/admin/widgets.py,sha256=amFg72GlGqF1mqnt2mMPf61E0v9yyNPdWVSlnHX-ROc,19081
8
+ django_smartbase_admin/admin/widgets.py,sha256=SrCf_pAzEPZj6OXJOYU0b9wlA9ICiBtalptKhY6MDnw,19189
9
9
  django_smartbase_admin/apps.py,sha256=C1wT1YUEZNKcUJfpD01nIZEFgYEsuav52WFKvEURRDU,545
10
10
  django_smartbase_admin/compilemessages.py,sha256=-_FEFQlOvE4L8UzSuUxSxZQjgGlwL9IZtmg59fW_kIQ,342
11
11
  django_smartbase_admin/engine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -43,9 +43,8 @@ django_smartbase_admin/services/configuration.py,sha256=POMI0htBqFS9ptPXMtOhIlIK
43
43
  django_smartbase_admin/services/data.py,sha256=o36B_H9RnBvaQz3Rs3NygY1hVTr6hc89M-RK1saRXzc,156
44
44
  django_smartbase_admin/services/thread_local.py,sha256=C3x7hPsKRCddr05RGiN0f6fcSQ8qsrYRdx9oeMHRovU,293
45
45
  django_smartbase_admin/services/translations.py,sha256=aiekREx8KQA9CQRmtkUcys4ICJERMrkxPnLysp0YXO8,5606
46
- django_smartbase_admin/services/views.py,sha256=8rRpJjxuguy3yZk9TMNcr0CUvadqk3ReiWVyS5O5VsY,9086
46
+ django_smartbase_admin/services/views.py,sha256=tujNMHGWiHQRKAnnBJxOF9CJiWgc7MMYAjPSdCuGv-8,9089
47
47
  django_smartbase_admin/services/xlsx_export.py,sha256=fnIqahmZR6G5T5wSH-sXhhLSy1QD3A-OY6BAn1WLLOc,10723
48
- django_smartbase_admin/settings.py,sha256=djo7-rm4QRGRubS6MsToEHIVBEy0sR3_E050ds0x5QQ,148
49
48
  django_smartbase_admin/static/sb_admin/build/postcss.config.js,sha256=JlIB66vejH4YA3sPp7hDjimQXAGz5WlVhFDwjBDNTEo,610
50
49
  django_smartbase_admin/static/sb_admin/build/tailwind.config.js,sha256=5q5CGlXyn5s3hB6k2OCTu4auVcY4_yop5TrM5g0pT80,2369
51
50
  django_smartbase_admin/static/sb_admin/build/tailwind_config_partials/colors.js,sha256=nU7d3yxbJ9G3zwdwj5ahggAMZdQSGyagr0gIZqvh8yA,1015
@@ -666,7 +665,7 @@ django_smartbase_admin/views/dashboard_view.py,sha256=vtz5emYTQ5WDFeLA8HrcmjSOVd
666
665
  django_smartbase_admin/views/global_filter_view.py,sha256=eYo1moJGyi7jc2cPDA5ZBiEgA7Hmc-DxbQvbqUpDkg8,1127
667
666
  django_smartbase_admin/views/media_view.py,sha256=5BLWXuzynF7nM34t-mf2BQSRN5ojY8HxpLIqt7Jiq9g,292
668
667
  django_smartbase_admin/views/translations_view.py,sha256=A02q1t13akLKd2Pg_ej4tVi5qPUKYxB2LqsBbYXM0l8,20267
669
- django_smartbase_admin-0.2.79.dist-info/LICENSE.md,sha256=okRGMBOYvyhprt2eTpX_QXqpzC0MODF-U7zX-4fKPjQ,1078
670
- django_smartbase_admin-0.2.79.dist-info/METADATA,sha256=t7pYYopFSbIEPgbDlM1dQLPb2hMLQVQP-k_LsrjAhG0,996
671
- django_smartbase_admin-0.2.79.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
672
- django_smartbase_admin-0.2.79.dist-info/RECORD,,
668
+ django_smartbase_admin-0.2.81.dist-info/LICENSE.md,sha256=okRGMBOYvyhprt2eTpX_QXqpzC0MODF-U7zX-4fKPjQ,1078
669
+ django_smartbase_admin-0.2.81.dist-info/METADATA,sha256=nB75Q2_snq3j9J6Y46fHUnvOji55fHcn6jG1OMo5iYc,996
670
+ django_smartbase_admin-0.2.81.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
671
+ django_smartbase_admin-0.2.81.dist-info/RECORD,,
@@ -1,4 +0,0 @@
1
- from django.conf import settings
2
-
3
- SB_ADMIN_PATH = getattr(settings, "SB_ADMIN_PATH", "sb-admin/")
4
- setattr(settings, "SB_ADMIN_PATH", SB_ADMIN_PATH)