Ticket #6356: datastructures.diff
File datastructures.diff, 993 bytes (added by , 17 years ago) |
---|
-
datastructures.py
23 23 self.verbose_name_plural = model._meta.verbose_name_plural 24 24 25 25 def __repr__(self): 26 return '<EasyModel for %s>' % smart_str(self.model._meta.object_name)26 return smart_str(u'<EasyModel for %s>' % (self.model._meta.object_name)) 27 27 28 28 def model_databrowse(self): 29 29 "Returns the ModelDatabrowse class for this model." … … 105 105 return self.instance._get_pk_val() 106 106 107 107 def url(self): 108 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()))108 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()))) 109 109 110 110 def fields(self): 111 111 """