ThreadRoute.title as url; update scripts about old Diffusion.sounds -> Sound.Diffusion (still need tests); cleanup unused and old code

This commit is contained in:
bkfox
2016-06-21 00:13:10 +02:00
parent 2564ba298a
commit acd0737d5d
10 changed files with 85 additions and 166 deletions

View File

@ -127,10 +127,14 @@ class ThreadRoute(Route):
@classmethod
def get_title(cl, model, request, thread_model, pk, **kwargs):
return _('%(name)s: %(model)s') % {
'model': model._meta.verbose_name_plural,
'name': cl.get_thread(model, thread_model, pk).title,
}
thread = cl.get_thread(model, thread_model, pk)
return '<a href="{url}">{title}</a>'.format(
url = thread.url(),
title = _('%(name)s: %(model)s') % {
'model': model._meta.verbose_name_plural,
'name': thread.title,
}
)
class DateRoute(Route):