Ticket #6356: datastructures.diff

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

Patch

  • datastructures.py

     
    2323        self.verbose_name_plural = model._meta.verbose_name_plural
    2424
    2525    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))
    2727
    2828    def model_databrowse(self):
    2929        "Returns the ModelDatabrowse class for this model."
     
    105105        return self.instance._get_pk_val()
    106106
    107107    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())))
    109109
    110110    def fields(self):
    111111        """
Back to Top