Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2014-11-04 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:  inglesp
 Type:  New feature   |   Status:  closed
Component:  Forms |  Version:  master
 Severity:  Normal|   Resolution:  fixed
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"74e1980cf96eb45079bef464fabdcbe0a6db2423"]:
 {{{
 #!CommitTicketReference repository=""
 revision="74e1980cf96eb45079bef464fabdcbe0a6db2423"
 Fixed #13181 -- Added support for callable choices to forms.ChoiceField

 Thanks vanschelven and expleo for the initial patch.
 }}}

--
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/067.bbb6c7b025f4485de30b987e91b45a22%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2014-11-04 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:  inglesp
 Type:  New feature   |   Status:  assigned
Component:  Forms |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by inglesp):

 * needs_better_patch:  1 => 0


--
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/067.82b91c80ee21bf332189c32d5ee8798a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2014-11-01 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:  inglesp
 Type:  New feature   |   Status:  assigned
Component:  Forms |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by inglesp):

 Thanks Tim for the review.

 I think there's one outstanding issue with the ticket, relating to the
 change in `ChoiceField.__deepcopy__`.  I've left my thoughts on the PR.

--
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/067.9a898fe435c3529fb551e67c08a52193%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2014-10-30 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:  inglesp
 Type:  New feature   |   Status:  assigned
Component:  Forms |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | 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:  0 => 1
 * version:  1.2-beta => master


Comment:

 I left comments for improvement on the PR. Please uncheck "Patch needs
 improvement" when you update it, thanks.

--
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/067.3e861d199784d75dcd9f7c18ae492d37%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2014-10-27 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:  inglesp
 Type:  New feature   |   Status:  assigned
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by inglesp):

 * needs_docs:  1 => 0


--
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/067.a96338a7581cdfebccfc1f66f88ba87b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2014-10-27 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:  inglesp
 Type:  New feature   |   Status:  assigned
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by inglesp):

 https://github.com/django/django/pull/770 was stale so I have created a
 new PR: https://github.com/django/django/pull/3427, which now includes
 documentation changes.

--
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/067.59c4513b423f232c52e75aaf6c509b8a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2014-10-27 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:  inglesp
 Type:  New feature   |   Status:  assigned
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by inglesp):

 * owner:   => inglesp
 * status:  new => assigned


--
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/067.2eb85211f3a39091b721c4ceb680f88d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-12-11 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:
 Type:  New feature   |   Status:  new
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Fak3):

 * cc: someuniquename@… (added)


-- 
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/067.8acd7e81165a0302ae49489425d67ba0%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-03-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:
 Type:  New feature   |   Status:  new
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by apollo13):

 * stage:  Design decision needed => Accepted


Comment:

 Moving back to "Accepted" since the ticket per se is accepted and we are
 dropping DDN.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-02-25 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+-
 Reporter:  mariarchi|Owner:
 Type:  New feature  |   Status:  new
Component:  Forms|  Version:  1.2-beta
 Severity:  Normal   |   Resolution:
 Keywords:  ChoiceField, | Triage Stage:  Design
  choices|  decision needed
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by expleo):

 * stage:  Accepted => Design decision needed


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-02-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:
 Type:  New feature   |   Status:  new
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by expleo):

 Updated pull request with with_field_as_param.diff:
 https://github.com/django/django/pull/770/files

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-02-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:
 Type:  New feature   |   Status:  new
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by vanschelven):

 Comments on the recent patches:

 * I'm not a fan of the "refactoring" using the delegate presented in
 "full_version". The commonalities are simply not worth the refactoring.
 * I __do__ like the version where the field is sent as a param; but
 whether that's actually useful is DDN.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-02-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:
 Type:  New feature   |   Status:  new
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by vanschelven):

 This approach (with_callable_choice_iterator.diff) is a prettier way to
 wrap the callable. The attached diff is the minimal way to get this issue
 fixed; I'll further look in to ways that combine it with:

 * Refactoring `CallableChoiceIterator` and `ModelChoiceIterator` to be of
 a common base class
 * We may want to consider passing field to the callable so that the
 callable has a bit more context. I'll play a bit with it.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-02-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:
 Type:  New feature   |   Status:  new
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by expleo):

 I managed to get it working this way:
 https://github.com/django/django/pull/770/files

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-02-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:
 Type:  New feature   |   Status:  new
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by vanschelven):

 * owner:  vanschelven =>
 * status:  assigned => new


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-02-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+-
 Reporter:  mariarchi|Owner:
 Type:  New feature  |  vanschelven
Component:  Forms|   Status:  assigned
 Severity:  Normal   |  Version:  1.2-beta
 Keywords:  ChoiceField, |   Resolution:
  choices| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by vanschelven):

 Attached (as_actual_callable.diff) is a super-ugly solution to what I
 consider the "real problem". Please see this as a starting point for
 further discussion.

 The earlier patch basically evaluated the callable on-field-definition,
 i.e. once. The whole purpose of using a callable is to lazily evaluate so
 that was not an acceptible solution.

 I noticed ModelChoiceField had this problem solved (as opposed to the
 regular ChoiceField), i.e. for each instance of a form the field's choices
 are freshly looked up in the queryset. In that case, they've made it work
 by patching `__deepcopy__` (which is called when a form is instantiated)
 to change the widget's choices every time.

 See this solution here:
 
https://github.com/django/django/blob/6bbf4e57c8b250d09a70d3d840531a42147705e9/django/forms/models.py#L954

 My solution does something similar: on deepcopy the actual evaluation is
 done. Note also the fact that the widget's choices have to be manually set
 to an actual value, which happens in `_set_choices()`

 Note that I use a different attribute to store the callable version of the
 choices. I hardly dare to call this elegant, but the amount of places
 there's dependencies on the fact that choices is an iterator is rather
 huge. Putting the callable version of choices in a different location
 makes sure we can dance around those issues.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-02-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+-
 Reporter:  mariarchi|Owner:
 Type:  New feature  |  vanschelven
Component:  Forms|   Status:  assigned
 Severity:  Normal   |  Version:  1.2-beta
 Keywords:  ChoiceField, |   Resolution:
  choices| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by vanschelven):

 * owner:  nobody => vanschelven
 * status:  new => assigned


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2013-01-04 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by vanschelven):

 I'll probably look into it in the upcoming sprint in Utrecht (Feb 23rd
 2013).
 Notes if anyone's picking it up before that:

 The comment made by mrts
 (https://code.djangoproject.com/ticket/13181#comment:3) is (as far as I
 understand it) not a good idea. As far as I understand it he/she is
 talking about evaluating the callable at field-definition time as well as
 when the form is actually initialized using form = MyForm().

 But this is exactly one of the problems I'm dealing with: on form
 definition time the callable that is bound to choices may not have a
 meaningful result. It may be erratic (because it fetches results over the
 internet or depends on a database that is sometimes offline). If you have
 such a callable it will crash the whole application in the current
 situation and the situation proposed by mtrs.

 My 2 cents.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2012-10-03 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+
 Reporter:  mariarchi |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Forms |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  ChoiceField, choices  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by t.zander@…):

 * cc: t.zander@… (added)


Comment:

 I'm interested in this, what's the status of it?

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2011-05-02 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+-
   Reporter:  mariarchi  |  Owner:  nobody
   Type:  New| Status:  new
  feature|  Component:  Forms
  Milestone: |   Severity:  Normal
Version:  1.2-beta   |   Keywords:  ChoiceField,
 Resolution: |  choices
   Triage Stage:  Accepted   |  Has patch:  1
Needs documentation:  1  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
-+-
Changes (by julien):

 * easy:   => 0


Comment:

 #15950 is a dupe and has a patch with a different approach.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2011-04-09 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+-
   Reporter:  mariarchi  |Owner:  nobody
   Type:  New|   Status:  new
  feature|Component:  Forms
  Milestone: | Severity:  Normal
Version:  1.2-beta   | Keywords:  ChoiceField, choices
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  1  |
Patch needs improvement:  0  |
-+-
Changes (by julien):

 * needs_docs:  0 => 1


-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2010-03-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
+---
  Reporter:  mariarchi  | Owner:  nobody  
Status:  new| Milestone:  
 Component:  Forms  |   Version:  1.2-beta
Resolution: |  Keywords:  ChoiceField, choices
 Stage:  Accepted   | Has_patch:  1   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * stage:  Unreviewed => Accepted

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2010-03-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+--
  Reporter:  mariarchi   | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Forms   |   Version:  1.2-beta
Resolution:  |  Keywords:  ChoiceField, choices
 Stage:  Unreviewed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by mariarchi):

  * needs_tests:  1 => 0

Comment:

 ...and tests

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2010-03-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+--
  Reporter:  mariarchi   | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Forms   |   Version:  1.2-beta
Resolution:  |  Keywords:  ChoiceField, choices
 Stage:  Unreviewed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  1   
Needs_better_patch:  0   |  
-+--
Comment (by mariarchi):

 @mrts: thx, updated the patch

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2010-03-23 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+--
  Reporter:  mariarchi   | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Forms   |   Version:  1.2-beta
Resolution:  |  Keywords:  ChoiceField, choices
 Stage:  Unreviewed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  1   
Needs_better_patch:  0   |  
-+--
Comment (by mrts):

 It's still important to check if the result can be converted to a list:

 {{{
 if callable(value):
 value = value()
 value = list(value)
 }}}

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2010-03-22 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+--
  Reporter:  mariarchi   | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Forms   |   Version:  1.2-beta
Resolution:  |  Keywords:  ChoiceField, choices
 Stage:  Unreviewed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  1   
Needs_better_patch:  0   |  
-+--
Comment (by Alex):

 No, the numbers on the test objects are fairly arbitrary, feel free to
 name you TestCase methods more semantic.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2010-03-22 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
-+--
  Reporter:  mariarchi   | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Forms   |   Version:  1.2-beta
Resolution:  |  Keywords:  ChoiceField, choices
 Stage:  Unreviewed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  1   
Needs_better_patch:  0   |  
-+--
Changes (by mariarchi):

  * needs_better_patch:  => 0
  * needs_tests:  => 1
  * needs_docs:  => 0

Comment:

 I would've written up tests, but I didn't really get how to add methods to
 regression tests - all functions have numbers - do you have to rename
 everything below inserted one?

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #13181: ChoiceField.choices need to accept callable, not only list or tuple

2010-03-22 Thread Django
#13181: ChoiceField.choices need to accept callable, not only list or tuple
--+-
 Reporter:  mariarchi |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Forms | Version:  1.2-beta  
 Keywords:  ChoiceField, choices  |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 see http://groups.google.com/group/django-
 developers/browse_thread/thread/3d98f84430bda806

 The subject pretty much describes all of it. If 'initial' can be a
 callable, why 'choices' can't? Writing custom function is way more
 convenient then altering __init__ method of the model.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.