Re: [Django] #29992: Error in admin checking list_display items

2018-11-29 Thread Django
#29992: Error in admin checking list_display items
--+--
 Reporter:  Giovanni Toffoli  |Owner:  nobody
 Type:  Bug   |   Status:  closed
Component:  contrib.admin |  Version:  2.1
 Severity:  Release blocker   |   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: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.aa8af1038ccad0dab091b2e15f089fbf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29992: Error in admin checking list_display items

2018-11-29 Thread Django
#29992: Error in admin checking list_display items
-+--
 Reporter:  gtoffoli |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   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 gtoffoli):

 You are right. I created a new project for testing, starting with that
 excerpt; then added some more stuff, without being able to reproduce the
 problem.
 I don't know what, in the real project, interferes with the creation of
 admin classes. When I can, I'll keep adding stuff to the test project.
 For the moment I will use a patched version of the admin.check module.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.843d14e1b5cd98eb4e61759c80bf8c90%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29992: Error in admin checking list_display items

2018-11-28 Thread Django
#29992: Error in admin checking list_display items
-+--
 Reporter:  gtoffoli |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   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):

 I don't get a check error with the excerpt you provided. Please provide a
 minimal project that demonstrates the issue.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.bb1f33c9e0104ca1d9f1215f67dd7eff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29992: Error in admin checking list_display items

2018-11-28 Thread Django
#29992: Error in admin checking list_display items
-+--
 Reporter:  gtoffoli |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   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 gtoffoli):

 In my view #29636 correctly identifies the commit at the origin of the
 problem, but doesn't explain the cause.
 My case is very similar but it involves only ''CharField'' and
 ''TextField'', not a field class I defined, nor, for example,
 ''IntegerField''.
 And, as far as I can understand, these field classes haven't the
 ''__get__'' method at all.

 An excerpt of my code follows


 {{{
 @python_2_unicode_compatible
 class Repo(models.Model):
 name = models.CharField(max_length=255, db_index=True,
 verbose_name=_('name'))
 description = models.TextField(blank=True, null=True,
 verbose_name=_('short description'))
 state = models.IntegerField(choices=PUBLICATION_STATE_CHOICES,
 default=DRAFT, null=True, verbose_name='publication state')
 ...
 }}}



 {{{
 class RepoAdmin(admin.ModelAdmin):
 list_display = ('id', 'name', 'slug', 'description', 'repo_type',
 'state', 'user_fullname', 'created', 'modified',)
 ...

 }}}

 and this is an excerpt of the error log:


 {{{
 : (admin.E108) The value of
 'list_display[1]' refers to 'name', which is not a callable, an attribute
 of 'RepoAdmin', or an attribute or method on 'commons.Repo'.
 : (admin.E108) The value of
 'list_display[3]' refers to 'description', which is not a callable, an
 attribute of 'RepoAdmin', or an attribute or method on 'commons.Repo'.

 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.56bf293775b84fd835f4d00399f6b2a6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29992: Error in admin checking list_display items

2018-11-28 Thread Django
#29992: Error in admin checking list_display items
-+--
 Reporter:  gtoffoli |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   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):

 Check if #29636 explains the cause.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.605f27fdf6630bd3923d8e2a54257e6a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29992: Error in admin checking list_display items

2018-11-28 Thread Django
#29992: Error in admin checking list_display items
-+--
 Reporter:  gtoffoli |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   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):

 Please give a minimal sample project that reproduces the issue.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.54304cb788643d05d560b0ae00a4f1ff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29992: Error in admin checking list_display items

2018-11-28 Thread Django
#29992: Error in admin checking list_display items
---+
   Reporter:  gtoffoli |  Owner:  nobody
   Type:  Bug  | Status:  new
  Component:  contrib.admin|Version:  2.1
   Severity:  Release blocker  |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+
 I'm porting my app from Django 1.8 and 2.0.6 to **Django 2.1.3**.
 In the last environment, ''runserver'' emits a lot of system check issues
 of type **admin.E108**
 They refer to fields from different modules and many different classes,
 but all of them are ''CharField'' or ''TextField''.

 I see that method **_check_list_display_item** of class
 ''ModelAdminChecks'' in module ''check'' of ''django.contrib.admin'' has
 changed significantly between releases 2.0.6 and 2.1.3; in the latter, has
 been removed the last branch (else) of the top-level if-elif-else
 structure, although it was explicitly stated, in a comment inside it, that
 the associated path was required.

 I'm not able to make a complete diagnosis, but it seems that testing

 {{{
 hasattr(model, item)
 }}}

 in general gives a different result than testing the existence of the same
 field with

 {{{
 model._meta.get_field(item)
 }}}

 In fact, using the ''manage.py shell'' command, I experimentally verified
 such difference on a subset of the fields presenting the above mentioned
 problem: the ''hasattr'' test yields sometimes True and sometimes False
 (don't know why), while the other way of testing the existence of the
 field always yields a True result.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.0c98f86bff311182c4fe43aa877c01ab%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.