Add tag to cartridge admin panel

34 Views Asked by At

I want to add one new field 'tag' in my Product class. I added that field and now I want to add that tag manually from cartridge admin panel.

So, to do that I am importing one admin class in my settings.py,

from cartridge.shop.admin import ProductAdmin

When I am importing above class, I am getting error on terminal,

django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

I wants to add that "tag" field in ProductAdmin class like below,but before I write below code in my project I am getting that "SECRET_KEY" error on import,

ProductAdmin.list_display.append("tag")
1

There are 1 best solutions below

3
Sayse On

ProductAdmin looks like it requires the secret key setting which it is unable to get since it is loaded before settings, so you cannot include this in settings (nor can I think of a reason you'd need to)

Whatever it is you're trying to do, you need to do it elsewhere.