How would you inherit from and override the django model classes to create a listOfStringsField?

后端 未结 5 2003
轻奢々
轻奢々 2021-02-06 05:24

I want to create a new type of field for django models that is basically a ListOfStrings. So in your model code you would have the following:

models.py:

5条回答
  •  死守一世寂寞
    2021-02-06 05:29

    What you have described sounds to me really similar to the tags.
    So, why not using django tagging?
    It works like a charm, you can install it independently from your application and its API is quite easy to use.

提交回复
热议问题