privatethread.py 600 B

1234567891011121314151617181920
  1. from django.core.urlresolvers import reverse
  2. from django.utils.translation import ugettext_lazy as _
  3. from misago.threads.threadtypes import ThreadTypeBase
  4. class PrivateThread(ThreadTypeBase):
  5. type_name = 'private_threads'
  6. def get_category_name(self, category):
  7. return _('Private Threads')
  8. def get_category_absolute_url(self, category):
  9. return reverse('misago:private_threads')
  10. def get_thread_absolute_url(self, thread):
  11. return reverse('misago:private_thread', kwargs={
  12. 'thread_slug': thread.slug,
  13. 'thread_id': thread.id
  14. })