Exemplo n.º 1
0
 def get_url(self, obj, lang=None, get={}):
     ct = ContentType.objects.get_for_model(self.model)
     info = ct.app_label, ct.model
     if lang:
         get.update({self.query_language_key: lang})
     url = '%s?%s' % (self.reverse('admin:%s_%s_change' % info, args=(obj.pk,)), urlencode(get))
     return url
Exemplo n.º 2
0
 def get_url(self, obj, lang=None, get={}):
     ct = ContentType.objects.get_for_model(self.model)
     info = ct.app_label, ct.model
     if lang:
         get.update({self.query_language_key: lang})
     url = '%s?%s' % (self.reverse('admin:%s_%s_change' % info, args=(obj.id,)), urlencode(get))
     return url