[Django] #24561: Allow 'choices'-check to work for callables.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Django] #24561: Allow 'choices'-check to work for callables.

Django
#24561: Allow 'choices'-check to work for callables.
--------------------------------------+--------------------
     Reporter:  EnTeQuAk              |      Owner:  nobody
         Type:  Bug                   |     Status:  new
    Component:  Core (System checks)  |    Version:  1.8
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  1
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 Django 1.8 introduced the ability to pass a callable for 'choices' but it
 seems the check-framework was not adapted to this.

 Pull Request: https://github.com/django/django/pull/4434/

--
Ticket URL: <https://code.djangoproject.com/ticket/24561>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.fdd2048a0b1ff3f1cbcb631f69c9858c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #24561: Allow model field choices to accept callables. (was: Allow 'choices'-check to work for callables.)

Django
#24561: Allow model field choices to accept callables.
-------------------------------------+-------------------------------------
     Reporter:  EnTeQuAk             |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by timgraham):

 * needs_better_patch:   => 1
 * component:  Core (System checks) => Database layer (models, ORM)
 * needs_tests:   => 0
 * version:  1.8 => master
 * needs_docs:   => 0
 * type:  Bug => New feature
 * stage:  Unreviewed => Accepted


Comment:

 It was added for `django.forms.ChoiceField`, but not model field
 `choices`. It might be a reasonable feature request, but it needs to be
 implemented. It might cause some difficulty in migrations, but I will
 accept the ticket if someone wants to investigate the possibility.

--
Ticket URL: <https://code.djangoproject.com/ticket/24561#comment:1>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.282c9d507b472e04a1d06aa1b17f2dc1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #24561: Allow model field choices to accept callables.

Django
In reply to this post by Django
#24561: Allow model field choices to accept callables.
-------------------------------------+-------------------------------------
     Reporter:  EnTeQuAk             |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by EnTeQuAk):

 Oh, then I misread the feature. I'll try to update the patch to port this
 to the model field `choices` as well.

--
Ticket URL: <https://code.djangoproject.com/ticket/24561#comment:2>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.6c2b2dde26fb6e1d97467ee4a249e4f5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #24561: Allow model field choices to accept callables.

Django
In reply to this post by Django
#24561: Allow model field choices to accept callables.
-------------------------------------+-------------------------------------
     Reporter:  Christopher Grebs    |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * needs_better_patch:  1 => 0
 * has_patch:  1 => 0


Comment:

 See also discussion in #28033.

--
Ticket URL: <https://code.djangoproject.com/ticket/24561#comment:3>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.8403989364aecdbefcd3ac9de5f3938a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Loading...