Code

Ticket #6356: datastructures.diff

File datastructures.diff, 993 bytes (added by tangerine, 7 years ago)

Patch

Line 
1Index: datastructures.py
2===================================================================
3--- datastructures.py   (revision 7011)
4+++ datastructures.py   (working copy)
5@@ -23,7 +23,7 @@
6         self.verbose_name_plural = model._meta.verbose_name_plural
7 
8     def __repr__(self):
9-        return '<EasyModel for %s>' % smart_str(self.model._meta.object_name)
10+        return smart_str(u'<EasyModel for %s>' % (self.model._meta.object_name))
11 
12     def model_databrowse(self):
13         "Returns the ModelDatabrowse class for this model."
14@@ -105,7 +105,7 @@
15         return self.instance._get_pk_val()
16 
17     def url(self):
18-        return '%s%s/%s/objects/%s/' % (self.model.site.root_url, self.model.model._meta.app_label, self.model.model._meta.module_name, iri_to_uri(self.pk()))
19+        return mark_safe('%s%s/%s/objects/%s/' % (self.model.site.root_url, self.model.model._meta.app_label, self.model.model._meta.module_name, iri_to_uri(self.pk())))
20 
21     def fields(self):
22         """