views:

39

answers:

2

if i have a question and answer system, and i want to add a tag feature, as for every question i should have some tags, separated by comma (just in stackoverflow):

1.I want to have a separate class model for that, with a foreign key to a question 2.in the form, i want the user to be able to add many tags, separated by comma, and when the form is sent, i want the tags to be stored in a table: each tag a registration

What should i use in form, so that the tags separated by comma to be saved in the database, each tag a registration? (for easy searching)

Thanks

+4  A: 

djago-taggit

update: read the docs to see how the tag input string results in tags, http://github.com/alex/django-taggit/blob/master/docs/forms.txt

Ashok
Yes, don't try and do this yourself. It's a solved problem.
Daniel Roseman
hmmm... i'm afaraid to use it, i'm a beginner and afraid not to be able to understand the code in a short time
dana
Seems like a good replacement for non-maintained django-tagging.
Dmitry Gladkov
+2  A: 

I agree that you'd better use reusable tagging app, but if you're not afraid to get your hands dirty, check out Django contenttypes framework

Dmitry Gladkov