From 0f607d83e801192977bff15c256456fa2f44ff85 Mon Sep 17 00:00:00 2001 From: Adolfo Fitoria Date: Sun, 9 Aug 2009 22:36:26 -0600 Subject: adding meta keywords to questions and canonical tag --- forum/models.py | 3 +++ templates/question.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/forum/models.py b/forum/models.py index 4d8894e4..7de703ca 100644 --- a/forum/models.py +++ b/forum/models.py @@ -179,6 +179,9 @@ class Question(models.Model): """Creates a list of Tag names from the ``tagnames`` attribute.""" return [name for name in self.tagnames.split(u' ')] + def tagname_meta_generator(self): + return ','.join([str(tag) for tag in self.tagname_list()]) + def get_absolute_url(self): return '%s%s' % (reverse('question', args=[self.id]), self.title.replace(' ', '-')) diff --git a/templates/question.html b/templates/question.html index eaff9da3..1fd6467d 100644 --- a/templates/question.html +++ b/templates/question.html @@ -6,6 +6,9 @@ {% load i18n %} {% block title %}{% spaceless %}{{ question.get_question_title }}{% endspaceless %}{% endblock %} {% block forejs %} + + + {% if not question.closed and request.user.is_authenticated %} -- cgit v1.2.3-1-g7c22