app-generator / django-admin-volt

Django Admin Volt - Free template for Django Admin Interface | AppSeed
https://app-generator.dev/docs/products/django-libs/theme-volt.html
MIT License
144 stars 34 forks source link

Error when trying to run: cannot import name 'smart_text' from 'django.utils.encoding' #3

Closed dbartolomei closed 2 years ago

dbartolomei commented 2 years ago

I'm getting the following error after installing the admin template:

Invalid template library specified. ImportError raised when trying to load 'admin_volt.templatetags.admin_volt': cannot import name 'smart_text' from 'django.utils.encoding'

I'm using Python 3.10.1 and Django 4.0

dbartolomei commented 2 years ago

Seems that smart_text was deprecated en Django 4.0

https://docs.djangoproject.com/en/4.0/internals/deprecation/

_django.utils.encoding.force_text() and smarttext() will be removed.

app-generator commented 2 years ago

Hello @dbartolomei

The template is not tested with Django 4.0. We will get back soon as we can with a fix.

BR

app-generator commented 2 years ago

@imankarimi in case you have the time, please make a test using Django 4. Ty!

imankarimi commented 2 years ago

Hello @dbartolomei seems Django v4 removed smart_text, I changed the code to support this. you can test it now

please reinstall the package.

app-generator commented 2 years ago

Fixed - v0.0.4 release PyPi - django-admin-volt - v0.0.4

@dbartolomei - please update @imankarimi - ty for your support

Closing!