thread.py 755 B

123456789101112131415161718192021222324
  1. from django.core.urlresolvers import reverse
  2. from misago.threads.threadtypes import ThreadTypeBase
  3. class Thread(ThreadTypeBase):
  4. type_name = 'thread'
  5. def get_category_name(self, category):
  6. return category.name
  7. def get_category_absolute_url(self, category):
  8. return reverse('misago:category', kwargs={
  9. 'category_id': category.id, 'category_slug': category.slug
  10. })
  11. def get_thread_absolute_url(self, thread):
  12. return '/threads/not-implemented-yet-%s/' % thread.pk
  13. def get_thread_last_post_url(self, thread):
  14. return '/threads/not-implemented-yet-%s/last/' % thread.pk
  15. def get_thread_new_post_url(self, thread):
  16. return '/threads/not-implemented-yet-%s/new/' % thread.pk