Is this not a tuple?

前端 未结 4 646
旧时难觅i
旧时难觅i 2021-01-18 12:35

I can\'t figure out what I\'m doing wrong here. My error is: ImproperlyConfigured at /admin/ \'CategoryAdmin.fields\' must be a list or tuple.

Isn\'

4条回答
  •  盖世英雄少女心
    2021-01-18 12:51

    It should be:

    fields = ('title', )
    

    Example:

    In [64]: type(('title'))
    Out[64]: str
    
    In [65]: type(('title', ))
    Out[65]: tuple
    

提交回复
热议问题