[Django] #28013: admin/inlines.js has different functionality from admin/inlines.min.js

5 views
Skip to first unread message

Django

unread,
Apr 3, 2017, 11:25:49 AM4/3/17
to django-...@googlegroups.com
#28013: admin/inlines.js has different functionality from admin/inlines.min.js
------------------------------------------+------------------------
Reporter: Joseph Solomon | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
If you have an inline field in the Django admin that has a name property
that only has a getter and no setter, admin/inlines.js will throw an
exception and stop adding the new inline (on add clicks). When using
admin/inlines.min.js, it does not throw an error and successfully adds the
additional row.

I have run into this issue with using django-trix elements.
An example project is here: https://github.com/istrategylabs/trix_test.

This has been tested with Django 1.10.6 and 1.11rc1.

--
Ticket URL: <https://code.djangoproject.com/ticket/28013>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 3, 2017, 5:23:53 PM4/3/17
to django-...@googlegroups.com
#28013: admin/inlines.js has different functionality from admin/inlines.min.js
--------------------------------+--------------------------------------

Reporter: Joseph Solomon | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------

Comment (by kapil garg):

I was unable to reproduce the bug. I used the following code. I tried both
'inlines.js' and 'inlines.min.js'


{{{
class Parent(models.Model):
name = models.CharField(max_length=100, default='Father')

class Child(models.Model):
parent = models.ForeignKey(Parent, on_delete=models.CASCADE)
name = models.CharField(max_length=100, default='Child')

class ChildAdmin(admin.TabularInline):
model = Child

@admin.register(Parent)
class ParentAdmin(admin.ModelAdmin):
inlines = (ChildAdmin,)
list_display = ('id', 'name')
fields = ('name',)
}}}

Is there any other thing need to do to reproduce the error ?

--
Ticket URL: <https://code.djangoproject.com/ticket/28013#comment:1>

Django

unread,
Apr 5, 2017, 8:53:02 AM4/5/17
to django-...@googlegroups.com
#28013: admin/inlines.js has different functionality from admin/inlines.min.js
--------------------------------+--------------------------------------

Reporter: Joseph Solomon | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------

Comment (by Tim Graham):

Joseph, ideally the sample project wouldn't involve any third-party
JavaScript to rule out some issue there.

If there's some behavior difference in the minified JavaScript, then it
might be a bug for
[https://docs.djangoproject.com/en/dev/internals/contributing/writing-
code/javascript/#compressing-javascript the closure compiler] that Django
uses to generate that code.

--
Ticket URL: <https://code.djangoproject.com/ticket/28013#comment:2>

Django

unread,
Apr 11, 2017, 12:33:36 PM4/11/17
to django-...@googlegroups.com
#28013: admin/inlines.js has different functionality from admin/inlines.min.js
--------------------------------+--------------------------------------

Reporter: Joseph Solomon | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => needsinfo


--
Ticket URL: <https://code.djangoproject.com/ticket/28013#comment:3>

Reply all
Reply to author
Forward
0 new messages