Re: [Django] #22050: defer('related__subfield') and select_related() on proxy model raises error

2014-06-25 Thread Django
#22050: defer('related__subfield') and select_related() on proxy model raises 
error
-+-
 Reporter:  lovasb   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  defer,proxy,query|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"9385aa3198e7ab460990dd8f82e466fd243557a0"]:
 {{{
 #!CommitTicketReference repository=""
 revision="9385aa3198e7ab460990dd8f82e466fd243557a0"
 Fixed #22050 -- Fixed defer fields on proxy related models.
 }}}

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


Re: [Django] #22050: defer('related__subfield') and select_related() on proxy model raises error

2014-04-10 Thread Django
#22050: defer('related__subfield') and select_related() on proxy model raises 
error
-+-
 Reporter:  lovasb   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  defer,proxy,query|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by timo):

 * component:  Uncategorized => Database layer (models, ORM)


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


Re: [Django] #22050: defer('related__subfield') and select_related() on proxy model raises error

2014-03-30 Thread Django
#22050: defer('related__subfield') and select_related() on proxy model raises 
error
---+
 Reporter:  lovasb |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Uncategorized  |  Version:  1.6
 Severity:  Normal |   Resolution:
 Keywords:  defer,proxy,query  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by anonymous):

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


Re: [Django] #22050: defer('related__subfield') and select_related() on proxy model raises error

2014-02-15 Thread Django
#22050: defer('related__subfield') and select_related() on proxy model raises 
error
---+--
 Reporter:  lovasb |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Uncategorized  |  Version:  1.6
 Severity:  Normal |   Resolution:
 Keywords:  defer,proxy,query  | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by lovasb):

 Replying to [comment:2 bmispelon]:
 > Looks like there's one already:
 https://github.com/django/django/pull/2279


 Yeah, that's mine! :)

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


Re: [Django] #22050: defer('related__subfield') and select_related() on proxy model raises error

2014-02-15 Thread Django
#22050: defer('related__subfield') and select_related() on proxy model raises 
error
---+--
 Reporter:  lovasb |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Uncategorized  |  Version:  1.6
 Severity:  Normal |   Resolution:
 Keywords:  defer,proxy,query  | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by lovasb):

 Replying to [comment:1 bmispelon]:
 > Hi,
 >
 > Could you submit a pull request for this, or at least consolidate all
 the patches into one? It would make reviewing the ticket easier.
 >
 > Thanks.


 Hi,

 Here is my pull request: https://github.com/django/django/pull/2279/files

 Bence

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


Re: [Django] #22050: defer('related__subfield') and select_related() on proxy model raises error

2014-02-15 Thread Django
#22050: defer('related__subfield') and select_related() on proxy model raises 
error
---+--
 Reporter:  lovasb |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Uncategorized  |  Version:  1.6
 Severity:  Normal |   Resolution:
 Keywords:  defer,proxy,query  | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by bmispelon):

 Looks like there's one already: https://github.com/django/django/pull/2279

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


Re: [Django] #22050: defer('related__subfield') and select_related() on proxy model raises error

2014-02-15 Thread Django
#22050: defer('related__subfield') and select_related() on proxy model raises 
error
---+--
 Reporter:  lovasb |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Uncategorized  |  Version:  1.6
 Severity:  Normal |   Resolution:
 Keywords:  defer,proxy,query  | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by bmispelon):

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


Comment:

 Hi,

 Could you submit a pull request for this, or at least consolidate all the
 patches into one? It would make reviewing the ticket easier.

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


[Django] #22050: defer('related__subfield') and select_related() on proxy model raises error

2014-02-15 Thread Django
#22050: defer('related__subfield') and select_related() on proxy model raises 
error
---+---
 Reporter:  lovasb |  Owner:  nobody
 Type:  Bug| Status:  new
Component:  Uncategorized  |Version:  1.6
 Severity:  Normal |   Keywords:  defer,proxy,query
 Triage Stage:  Unreviewed |  Has patch:  1
Easy pickings:  0  |  UI/UX:  0
---+---
 Given model (in the defer test directory):

 {{{
 class Secondary(models.Model):
 first = models.CharField(max_length=50)
 second = models.CharField(max_length=50)


 @python_2_unicode_compatible
 class Primary(models.Model):
 name = models.CharField(max_length=50)
 value = models.CharField(max_length=50)
 related = models.ForeignKey(Secondary)

 def __str__(self):
 return self.name

 class PrimaryProxy(Primary):
 class Meta:
 proxy = True
 }}}

 Select only() on related models: {{{
 PrimaryProxy.objects.all().select_related().only('related__first') }}}
 Raises KeyError:
 {{{
 E
 ==
 ERROR: test_defer_proxy_related_field (defer.tests.DeferTests)
 --
 Traceback (most recent call last):
   File "/home/lovasb/WORK/Personal/django/tests/defer/tests.py", line 176,
 in test_defer_proxy_related_field
 self.assertEqual(len(children), 1)
   File "/home/lovasb/WORK/Personal/django/django/db/models/query.py", line
 122, in __len__
 self._fetch_all()
   File "/home/lovasb/WORK/Personal/django/django/db/models/query.py", line
 963, in _fetch_all
 self._result_cache = list(self.iterator())
   File "/home/lovasb/WORK/Personal/django/django/db/models/query.py", line
 222, in iterator
 only_load = self.query.get_loaded_field_names()
   File "/home/lovasb/WORK/Personal/django/django/db/models/sql/query.py",
 line 1819, in get_loaded_field_names
 self.deferred_to_data(collection, self.get_loaded_field_names_cb)
   File "/home/lovasb/WORK/Personal/django/django/db/models/sql/query.py",
 line 602, in deferred_to_data
 must_include[old_model].add(source)
 KeyError: 
 }}}

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