Tried to create super user python manage.py createsuperuser and got the following error:
ERRORS:
<class 'store.admin.CategoryAdmin'>: (admin.E029) The value of 'prepopulated_fields["slug"]' must be a list or tuple.
<class 'store.admin.ProductAdmin'>: (admin.E029) The value of 'prepopulated_fields["slug"]' must be a list or tuple.
Hi,
Tried to create super user
python manage.py createsuperuser
and got the following error:Here is a fix:
For an explanation on why you must use either a list or tuple, see Django Admin Documentation:
ModelAdmin.prepopulated_fields
😄