Question

I am using django-taggit for one of my projects and as per the documentation I did the following in the model that i want to use tags / keywords in.

models.py

from taggit.managers import TaggableManager

class SomeModel(models.Model):
    title = models.CharField(max_length=15)
    description = models.TextField()
    keywords = TaggableManager()

I am using a ModelForm form for the above model and the label's text for the keywords field shows up as "Tags" instead of "Keywords".

How can i have django-taggit use the original field name ??

No correct solution

OTHER TIPS

Just opened up the TaggableManager definition to check this.

class TaggableManager(RelatedField):
    def __init__(self, verbose_name=_("Tags"),
    help_text=_("A comma-separated list of tags."), through=None, blank=False):

So to set the verbose_name simply initialize the manager as:

TaggableManager(verbose_name="keywords")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top