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
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