type plus verbeux
authorOlivier Larchevêque <olivier.larcheveque@auf.org>
Tue, 17 Jul 2012 14:04:55 +0000 (10:04 -0400)
committerOlivier Larchevêque <olivier.larcheveque@auf.org>
Tue, 17 Jul 2012 14:04:55 +0000 (10:04 -0400)
project/rh/historique.py

index 729de41..2d58d86 100644 (file)
@@ -31,11 +31,13 @@ def format_revisions(qs):
                 klass = v.content_type.model_class()
                 id = int(v.object_id)
                 objet = klass.objects.get(id=id)
                 klass = v.content_type.model_class()
                 id = int(v.object_id)
                 objet = klass.objects.get(id=id)
-                change_url = reverse('admin:rh_%s_change' % v.content_type.model,
+                change_url = reverse('admin:%s_%s_change' %
+                        (v.content_type.app_label, v.content_type.model),
                         args=(id, ))
                         args=(id, ))
-                history_url = reverse('admin:rh_%s_history' % v.content_type.model,
+                history_url = reverse('admin:%s_%s_history' %
+                        (v.content_type.app_label, v.content_type.model),
                         args=(id, ))
                         args=(id, ))
-                type = klass._meta.verbose_name
+                type = "%s %s" % (v.content_type.app_label, v.content_type.model)
                 break
             except:
                 continue
                 break
             except:
                 continue