I'm specifically talking about the Tag model, which I have no much experience with. The code goes like this:
@register_snippet
class ArticleTag(index.Indexed,Tag):
class Meta:
proxy=True
search_fields = [
index.SearchField('name', partial_match=True),
index.SearchField('slug', partial_match=True),
]
The Tag model has two fields, 'name' and 'slug'. But now I want to add a third custom field named 'type' that will be simply a CharField.
I tried modifying it like this:
@register_snippet
class ArticleTag(index.Indexed,Tag):
class Meta:
proxy=True
search_fields = [
index.SearchField('name', partial_match=True),
index.SearchField('slug', partial_match=True),
]
merge_to = models.CharField(max_length=500, blank=True, null=True)
panels = [
FieldPanel('name'),
FieldPanel('slug'),
FieldPanel('type'),
]
However the server yields:
ERRORS:
?: (models.E017) Proxy model 'ArticleTag' contains model fields.
How can I achieve what I am trying to do?