Re: [Django] #29434: model_to_dict should work with prefix

2018-05-27 Thread Django
#29434: model_to_dict should work with prefix
-+-
 Reporter:  danilovmy|Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  models, prefix   | 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/067.c5ec665e47e97c1f5894096bd775546a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29434: model_to_dict should work with prefix

2018-05-22 Thread Django
#29434: model_to_dict should work with prefix
-+-
 Reporter:  danilovmy|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  models, prefix   | 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):

 * type:  Uncategorized => Cleanup/optimization


Old description:

> model_to_dict Returns a dict containing the data in ``instance`` suitable
> for passing as a Form's ``initial`` keyword argument.
> i am agree with that.
>
> but sometimes it can helped to generate it with prefix in keys.

New description:

 model_to_dict Returns a dict containing the data in `instance` suitable
 for passing as a Form's `initial` keyword argument.
 i am agree with that.

 but sometimes it can helped to generate it with prefix in keys.

--

Comment:

 Can you describe your use case in a bit more detail? Is the idea that the
 function would accept a `prefix` argument and simply add that prefix to
 all keys in the resulting dictionary? I'm unsure why you couldn't do that
 outside of Django. `model_to_dict()` is a private API and I don't see much
 argument for adding options that Django itself doesn't use.

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


[Django] #29434: model_to_dict should work with prefix

2018-05-22 Thread Django
#29434: model_to_dict should work with prefix
-+-
   Reporter:  danilovmy  |  Owner:  nobody
   Type: | Status:  new
  Uncategorized  |
  Component:  Database   |Version:
  layer (models, ORM)|
   Severity:  Normal |   Keywords:  models, prefix
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 model_to_dict Returns a dict containing the data in ``instance`` suitable
 for passing as a Form's ``initial`` keyword argument.
 i am agree with that.

 but sometimes it can helped to generate it with prefix in keys.

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