Changes between Initial Version and Version 1 of Ticket #29701
- Timestamp:
- Aug 22, 2018, 8:51:48 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29701 – Description
initial v1 1 I noticed that using {{ has_add_permission()}} on a admin.TabularInlinefails.1 I noticed that using {{{has_add_permission()}}} on a {{{admin.TabularInline}}} fails. 2 2 3 3 … … 7 7 8 8 models.py 9 { code}9 {{{ 10 10 class ModelA(models.Model): 11 11 name = models.CharField(max_length=2) … … 27 27 def __str__(self): 28 28 return "%s-%s" % (self.a, self.b) 29 {code}29 }}} 30 30 31 31 admin.py 32 { code}32 {{{ 33 33 class ThroughInline(admin.TabularInline): 34 34 … … 49 49 class ThroughAdmin(admin.ModelAdmin): 50 50 pass 51 {code}51 }}} 52 52 53 53 Then create your objects. 54 { code}54 {{{ 55 55 >>> from <yourapp>.models import ModelA, ModelB, Through 56 56 >>> a = ModelA.objects.create(name='a') 57 57 >>> b= ModelB.objects.create(name='b') 58 58 >>> t = Through.objects.create(a=a, b=b) 59 {code}59 }}} 60 60 61 61 Fire up a runserver and visit the admin api: http://localhost:8000/admin/<yourapp>/modela/1/change/ … … 64 64 65 65 A server 500 66 { code}66 {{{ 67 67 KeyError at /admin/<appname>/modela/1/change/ 68 68 … … 116 116 83. content = template.render(context, self._request) 117 117 118 {code}118 }}} 119 119 120 120 h3. expected result … … 123 123 124 124 h3. version 125 {{ Django==2.1}}125 {{{Django==2.1}}}