Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

converted pinax.apps.topics to use django-taggit

  • Loading branch information...
commit f82e388a658d3e050f3d580e0b26701b196c4eef 1 parent 6283d27
@paltman paltman authored
View
2  docs/apps/topics/gettingstarted.txt
@@ -15,7 +15,7 @@ These are the requirements to run ``pinax.apps.account``:
* Python **2.4+** (Python 3.x is **not** supported yet)
* Django **1.2+**
- * django-tagging
+ * django-taggit
* django-threadedcomments
These dependencies should be added to your ``requirements/project.txt`` file
View
5 pinax/apps/topics/models.py
@@ -14,11 +14,10 @@
else:
notification = None
-from tagging.fields import TagField
+from taggit.managers import TaggableManager
from threadedcomments.models import ThreadedComment
-
class Topic(models.Model):
"""
a discussion topic for the tribe.
@@ -37,7 +36,7 @@ class Topic(models.Model):
modified = models.DateTimeField(_("modified"), default=datetime.now) # topic modified when commented on
body = models.TextField(_("body"), blank=True)
- tags = TagField()
+ tags = TaggableManager()
class Meta:
ordering = ["-modified"]
View
3  pinax/templates/default/topics/topic.html
@@ -3,7 +3,6 @@
{% load i18n %}
{% load account_tags %}
{% load uni_form_tags %}
-{% load extra_tagging_tags %}
{% load pagination_tags %}
{% load comments_tag %}
{% load avatar_tags %}
@@ -24,7 +23,7 @@
<div class="bulk">
<h1>{{ topic.title }}</h1>
<div class="body">{{ topic.body|urlize|linebreaks }}</div>
- <p>{% show_tags_for topic %}</p>
+ <p>{% topic.tags.all %}</p>
{% ifequal user topic.creator %}
<form class="uniForm" method="POST" action="{{ request.path }}delete/">
{% csrf_token %}
View
3  pinax/templates/default/topics/topic_item.html
@@ -2,7 +2,6 @@
{% load account_tags %}
{% load avatar_tags %}
{% load threadedcommentstags %}
-{% load extra_tagging_tags %}
{% load group_tags %}
<div class="topic clearfix">
@@ -23,6 +22,6 @@
{% endblocktrans %}
</div>
{% endif %}
- <p>{% show_tags_for topic %}</p>
+ <p>{% topic.tags.all %}</p>
</div>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.