Re: [Django] #27554: Queryset evaluation fails with mix of nested and flattened prefetches (AttributeError on RelatedManager)

2017-03-03 Thread Django
#27554: Queryset evaluation fails with mix of nested and flattened prefetches
(AttributeError on RelatedManager)
-+-
 Reporter:  Anthony Leontiev |Owner:  François
 |  Freitag
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  prefetch | Triage Stage:  Accepted
  AttributeError prefetch_related|
  nested RelatedManager  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by François Freitag):

 * owner:  nobody => François Freitag
 * status:  new => assigned
 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/8143 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.9adbf65bf5b76f27b74201c1e479a2cd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27902: user_can_authenticate prevents confirm_login_allowed from checking inactive user

2017-03-03 Thread Django
#27902: user_can_authenticate prevents confirm_login_allowed from checking 
inactive
user
-+-
 Reporter:  Brandon Chinn|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.auth |  Version:  1.10
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  authentication,  | Triage Stage:
  inactive   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Brandon Chinn):

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


Old description:

> With the addition of ModelBackend.user_can_authenticate,
> ModelBackend.authenticate now returns None if a user is inactive. Because
> of that, AuthenticationForm.clean will set self.user_cache to be None and
> will error with the invalid_login message instead of the inactive
> message.
>
> Not sure how we want this to be solved, but I'll try to put up a patch
> resolving this issue and see if that's the direction we want to take.

New description:

 With the addition of ModelBackend.user_can_authenticate,
 ModelBackend.authenticate now returns None if a user is inactive. Because
 of that, AuthenticationForm.clean will set self.user_cache to be None and
 will error with the invalid_login message instead of the inactive message.

 Not sure how we want this to be solved, but I'll try to put up a patch
 resolving this issue and see if that's the direction we want to take.

 UPDATE: didn't see that AllowAllUsersModelBackend was made for this
 purpose (auth_tests/test_forms.py:245)

--

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


[Django] #27902: user_can_authenticate prevents confirm_login_allowed from checking inactive user

2017-03-03 Thread Django
#27902: user_can_authenticate prevents confirm_login_allowed from checking 
inactive
user
-+-
   Reporter:  Brandon|  Owner:  nobody
  Chinn  |
   Type:  Bug| Status:  new
  Component: |Version:  1.10
  contrib.auth   |   Keywords:  authentication,
   Severity:  Normal |  inactive
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 With the addition of ModelBackend.user_can_authenticate,
 ModelBackend.authenticate now returns None if a user is inactive. Because
 of that, AuthenticationForm.clean will set self.user_cache to be None and
 will error with the invalid_login message instead of the inactive message.

 Not sure how we want this to be solved, but I'll try to put up a patch
 resolving this issue and see if that's the direction we want to take.

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


Re: [Django] #25790: Add a way to disable column sorting in the admin

2017-03-03 Thread Django
#25790: Add a way to disable column sorting in the admin
-+-
 Reporter:  Ramiro Morales   |Owner:  Simon
 |  Charette
 Type:  New feature  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  sorting ordering | Triage Stage:  Accepted
  change list changelist admin   |
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * owner:  Sasha Gaevsky => Simon Charette
 * cc: Simon Charette (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/064.403cfb3dc76d2904d9a3f93465f44013%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27656: Fix comment verb style according to PEP 257

2017-03-03 Thread Django
#27656: Fix comment verb style according to PEP 257
-+-
 Reporter:  Anton Samarchyan |Owner:  Anton
 Type:   |  Samarchyan
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Other) |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"711123e1cdaf3b08c876c045d8d38decdc7a63d3" 711123e1]:
 {{{
 #!CommitTicketReference repository=""
 revision="711123e1cdaf3b08c876c045d8d38decdc7a63d3"
 Refs #27656 -- Updated django.views docstring verbs according to PEP 257.
 }}}

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


Re: [Django] #27901: Problem with Django & MySQL & model fields returning custom unicode classes

2017-03-03 Thread Django
#27901: Problem with Django & MySQL & model fields returning custom unicode 
classes
-+-
 Reporter:  Dominique Barton |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  mysql, unicode,  | Triage Stage:
  error  |  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


Comment:

 In this case, you need to explain why Django is at fault and ideally
 provide a patch that fixes the issue. From what you provided so far, it
 looks like you're asking for help debugging your custom field. For ways to
 get help with that, see TicketClosingReasons/UseSupportChannels.

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


[Django] #27901: Problem with Django & MySQL & model fields returning custom unicode classes

2017-03-03 Thread Django
#27901: Problem with Django & MySQL & model fields returning custom unicode 
classes
-+-
   Reporter:  Dominique  |  Owner:  nobody
  Barton |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  1.10
  layer (models, ORM)|   Keywords:  mysql, unicode,
   Severity:  Normal |  error
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Hi there

 I use a custom model field (inherited from `TextField`) which simply
 returns its value as an "enhanced" `unicode` object.
 Unfortunately, this will raise UnicodeErrors as MySQLdb apparently fails
 recognizing those values as `unicode`. The comparision isn't very clever
 there ;)

 MySQLdb has a `use_unicode` flag, but I don't know how to implement it in
 Django and I think this is a serious bug.

 I've prepared a whole test case right here: https://github.com/domibarton
 /django-mysql-unicode-error

 I hope this is enough for a "proper" bug description.

 Cheers
 Domi

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


Re: [Django] #27895: Test Client fails to decode json response with unicode characters

2017-03-03 Thread Django
#27895: Test Client fails to decode json response with unicode characters
-+-
 Reporter:  Aniruddha Maru   |Owner:  Aniruddha
 |  Maru
 Type:  Bug  |   Status:  assigned
Component:  Testing framework|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 Claude, could you provide an explanation of why Django would make that
 assumption? I'm not knowledgeable to confirm or reject 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.ebbb68ee699a1308183083282c8aebe0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27897: Searching for foreign key's pk in the admin crashes with FieldDoesNotExist (was: Cannot search for foreign key's pk in the admin anymore)

2017-03-03 Thread Django
#27897: Searching for foreign key's pk in the admin crashes with 
FieldDoesNotExist
---+
 Reporter:  rm_|Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 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 Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 Looks like a regression in 1.9 caused by
 d084176cc1273d5faf6f88eedb4c490e961f3a68. I'm hesitant to mark as a
 release blocker since it when unreported for so long and I think it can be
 worked around by using `__id` instead of `__pk` in `search_fields`, but
 when a patch is provided we could consider a backport.

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


Re: [Django] #27900: Make escapejs escape backticks to support usage in ES6 template literals

2017-03-03 Thread Django
#27900: Make escapejs escape backticks to support usage in ES6 template literals
--+
 Reporter:  Anthony King  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Utilities |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| 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):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/8141 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.1106ef3d63155e110b725c84ce8e4bef%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27900: Make escapejs escape backticks to support usage in ES6 template literals

2017-03-03 Thread Django
#27900: Make escapejs escape backticks to support usage in ES6 template literals
+
   Reporter:  Anthony King  |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Utilities |Version:  master
   Severity:  Normal|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 Using the `escapejs` filter inside a template literal currently results in
 a syntax error if the string contains a `.

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


Re: [Django] #27887: TypeError when namespaced urlconf included from non-namespaced one

2017-03-03 Thread Django
#27887: TypeError when namespaced urlconf included from non-namespaced one
--+
 Reporter:  Matt Westcott |Owner:  nobody
 Type:  Bug   |   Status:  closed
Component:  Core (System checks)  |  Version:  1.11
 Severity:  Release blocker   |   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Tim Graham ):

 In [changeset:"1f20326db0ff2d5d741d0bc8dc4a8b13c97a3652" 1f20326d]:
 {{{
 #!CommitTicketReference repository=""
 revision="1f20326db0ff2d5d741d0bc8dc4a8b13c97a3652"
 [1.11.x] Fixed #27887 -- Fixed URLs check crash with namespaced URLs
 inside non-namespaced URLs.

 Backport of b23d264046db1c8f58a174b9be27ee760341ba06 from master
 }}}

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


Re: [Django] #27887: TypeError when namespaced urlconf included from non-namespaced one

2017-03-03 Thread Django
#27887: TypeError when namespaced urlconf included from non-namespaced one
--+
 Reporter:  Matt Westcott |Owner:  nobody
 Type:  Bug   |   Status:  closed
Component:  Core (System checks)  |  Version:  1.11
 Severity:  Release blocker   |   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by GitHub ):

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


Comment:

 In [changeset:"b23d264046db1c8f58a174b9be27ee760341ba06" b23d2640]:
 {{{
 #!CommitTicketReference repository=""
 revision="b23d264046db1c8f58a174b9be27ee760341ba06"
 Fixed #27887 -- Fixed URLs check crash with namespaced URLs inside non-
 namespaced URLs.
 }}}

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


Re: [Django] #27860: Changing a CharField to a ForeignKey crashes when migrating in PostgreSQL

2017-03-03 Thread Django
#27860: Changing a CharField to a ForeignKey crashes when migrating in 
PostgreSQL
--+
 Reporter:  Daniel Quinn  |Owner:  felixxm
 Type:  Bug   |   Status:  assigned
Component:  Migrations|  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:  PostgreSQL| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Tim Graham ):

 In [changeset:"6b47431aaf5222b687791f92f352413a16fc62cd" 6b47431]:
 {{{
 #!CommitTicketReference repository=""
 revision="6b47431aaf5222b687791f92f352413a16fc62cd"
 Refs #27860 -- Simplified deleting indexes on PostgreSQL using "IF
 EXISTS".
 }}}

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


Re: [Django] #27899: Phrase search query for Postgres full text search

2017-03-03 Thread Django
#27899: Phrase search query for Postgres full text search
--+
 Reporter:  Ilya Semenov  |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  contrib.postgres  |  Version:  master
 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 Simon Charette):

 * version:  1.10 => master
 * component:  Uncategorized => contrib.postgres
 * 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/065.ed787a81e7f181d6f9e5c184f4030ef1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27892: Independent migrations

2017-03-03 Thread Django
#27892: Independent migrations
--+
 Reporter:  ChillarAnand  |Owner:  ChillarAnand
 Type:  New feature   |   Status:  assigned
Component:  Migrations|  Version:  master
 Severity:  Normal|   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 Simon Charette):

 > This migration is temporary.

 It isn't. All database created from scratch will require this operation to
 be run before they can rely on the extension?

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


Re: [Django] #27896: In Django 1.10 when sqlite is used and TIME_ZONE=None a django.db.utils.OperationalError error is raised when filtering by __date on a DateTimeField

2017-03-03 Thread Django
#27896: In Django 1.10 when sqlite is used and TIME_ZONE=None a
django.db.utils.OperationalError error is raised when filtering by __date
on a DateTimeField
-+-
 Reporter:  David Black  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 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):

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


Old description:

> In Django 1.10 when sqlite is used and TIME_ZONE=None a
> django.db.utils.OperationalError error is raised when filtering by __date
> on a DateTimeField.
>
> For example,
> {{{
> ExampleModel.objects.filter(created_date__date=a_date).exists()
> }}}
>
> I have created a test project on github to demonstrate this issue which
> can be found at https://github.com/dbaxa/django-sqlite-datetime-bug .
>

>   {{{#!python
> Creating test database for alias 'default'...
> .E
> ==
> ERROR: test_filter_using__date_not_none_time_zone
> (example.tests.TestExampleModel)
> --
> Traceback (most recent call last):
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/backends/utils.py", line 64, in execute
> return self.cursor.execute(sql, params)
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/backends/sqlite3/base.py", line 337, in execute
> return Database.Cursor.execute(self, query, params)
> sqlite3.OperationalError: user-defined function raised exception
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File "/home/user/django-sqlite-bug-
> example/sqlite_datetime_bug/example/tests.py", line 24, in
> test_filter_using__date_not_none_time_zone
> self.shared_test()
>   File "/home/user/django-sqlite-bug-
> example/sqlite_datetime_bug/example/tests.py", line 20, in shared_test
> self.assertTrue(results.exists())
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/models/query.py", line 660, in exists
> return self.query.has_results(using=self.db)
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/models/sql/query.py", line 494, in has_results
> return compiler.has_results()
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/models/sql/compiler.py", line 806, in has_results
> return bool(self.execute_sql(SINGLE))
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/models/sql/compiler.py", line 835, in execute_sql
> cursor.execute(sql, params)
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/backends/utils.py", line 64, in execute
> return self.cursor.execute(sql, params)
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/utils.py", line 94, in __exit__
> six.reraise(dj_exc_type, dj_exc_value, traceback)
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/utils/six.py", line 685, in reraise
> raise value.with_traceback(tb)
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/backends/utils.py", line 64, in execute
> return self.cursor.execute(sql, params)
>   File "/home/user/.virtualenvs/django/lib/python3.5/site-
> packages/django/db/backends/sqlite3/base.py", line 337, in execute
> return Database.Cursor.execute(self, query, params)
> django.db.utils.OperationalError: user-defined function raised exception
>
> --
> Ran 2 tests in 0.024s
>
> FAILED (errors=1)
> Destroying test database for alias 'default'...
> }}}
>

> This issue does not affect Django 1.11 as it does not allow TIME_ZONE to
> be set to None.

New description:

 In Django 1.10 when sqlite is used and `TIME_ZONE=None` a
 django.db.utils.OperationalError error is raised when filtering by
 `__date` on a `DateTimeField`.

 For example,
 {{{
 ExampleModel.objects.filter(created_date__date=a_date).exists()
 }}}

 I have created a test project on github to demonstrate this issue which
 can be found at https://github.com/dbaxa/django-sqlite-datetime-bug .


   {{{#!python
 Creating test database for alias 'default'

[Django] #27899: Phrase search query for Postgres full text search

2017-03-03 Thread Django
#27899: Phrase search query for Postgres full text search
-+
   Reporter:  Ilya Semenov   |  Owner:  nobody
   Type:  New feature| Status:  new
  Component:  Uncategorized  |Version:  1.10
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 Postgres 9.6 now supports phrase search with `... @@
 phraseto_tsquery('hello world')`. It would be great if Django supported it
 natively.

 Currently, `django.contrib.postgres.search.SearchQuery` hard-codes SQL
 lookup formatting:

 {{{#!python
 class SearchQuery(SearchQueryCombinable, Value):
 def as_sql(self, compiler, connection):
 ...
 template = 'plainto_tsquery({}::regconfig,
 %s)'.format(config_sql)
 }}}

 I believe the lookup function should be taken from a class level variable
 instead, and two more classes should be introduced: `PhraseSearchQuery`
 using `phraseto_tsquery`, and `RawSearchQuery` using `to_tsquery`.

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


Re: [Django] #27898: Inheriting from AbstractBaseUser does not interpolate unique error message on field

2017-03-03 Thread Django
#27898: Inheriting from AbstractBaseUser does not interpolate unique error 
message
on field
---+--
 Reporter:  unho   |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Uncategorized  |  Version:  1.10
 Severity:  Normal |   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):

 Could you please gave an example model and code to reproduce the problem?

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


Re: [Django] #27892: Independent migrations

2017-03-03 Thread Django
#27892: Independent migrations
--+
 Reporter:  ChillarAnand  |Owner:  ChillarAnand
 Type:  New feature   |   Status:  assigned
Component:  Migrations|  Version:  master
 Severity:  Normal|   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 understand what you mean by the first two sentences in comment 2.

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


Re: [Django] #27890: runtests.py cleanup exception on Python 3.6

2017-03-03 Thread Django
#27890: runtests.py cleanup exception on Python 3.6
+
 Reporter:  Vytis Banaitis  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Core (Other)|  Version:  master
 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
+

Comment (by Claude Paroz):

 Oh, now I see, sorry for the misunderstanding.

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


Re: [Django] #27854: Make `collectstatic` warn (rather than blow up) on missing directories

2017-03-03 Thread Django
#27854: Make `collectstatic` warn (rather than blow up) on missing directories
-+-
 Reporter:  David Evans  |Owner:  Mahesh
 Type:   |  Kumar Jurel
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.staticfiles  |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mahesh Kumar Jurel):

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


[Django] #27898: Inheriting from AbstractBaseUser does not interpolate unique error message on field

2017-03-03 Thread Django
#27898: Inheriting from AbstractBaseUser does not interpolate unique error 
message
on field
-+
   Reporter:  unho   |  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Uncategorized  |Version:  1.10
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 If a custom `User` model inherits from `AbstractBaseUser` instead of
 `AbstractUser` and it defines a unique field the uniqueness error message
 used is not correctly interpolated and is rendered as is: %(model_name)s
 with this %(field_label)s already exists.

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


Re: [Django] #27897: Cannot search for foreign key's pk in the admin anymore (was: Cannot search for pk in the admin anymore)

2017-03-03 Thread Django
#27897: Cannot search for foreign key's pk in the admin anymore
---+--
 Reporter:  rm_|Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Description changed by rm_:

Old description:

> On django 1.10.6 and python 2.7.9 given this Model and ModelAdmin:
>
> {{{
> class Foo(models.Model):
> name = models.CharField(
> max_length=256
> )
>
> class FooAdmin(admin.ModelAdmin):
> search_fields = ['pk']
> }}}
>
> Each search returns:
>
> {{{
> File "/venv/local/lib/python2.7/site-
> packages/django/contrib/admin/views/main.py" in __init__
>   81. self.queryset = self.get_queryset(request)
> File "/venv/local/lib/python2.7/site-
> packages/django/contrib/admin/views/main.py" in get_queryset
>   359. request, qs, self.query)
> File "/venv/local/lib/python2.7/site-
> packages/django/contrib/admin/options.py" in get_search_results
>   994. if lookup_needs_distinct(self.opts,
> search_spec):
> File "/venv/local/lib/python2.7/site-
> packages/django/contrib/admin/utils.py" in lookup_needs_distinct
>   26. field = opts.get_field(field_name)
> File "/venv/local/lib/python2.7/site-
> packages/django/db/models/options.py" in get_field
>   554. raise FieldDoesNotExist('%s has no field named %r' %
> (self.object_name, field_name))
>
> Exception Type: FieldDoesNotExist at /admin/athome/disciplina/
> Exception Value: Foo has no field named u'pk'
> }}}
>
> Same code works fine in 1.8.16.

New description:

 On django 1.10.6 and python 2.7.9 given this Model and ModelAdmin:

 {{{
 class Bar(models.Model):
 name = models.CharField(
 max_length=256
 )

 class Foo(models.Model):
 name = models.CharField(
 max_length=256
 )
 bar = models.ForeignKey(Bar)

 class FooAdmin(admin.ModelAdmin):
 search_fields = ['bar__pk']
 }}}

 Each search returns:

 {{{
 File "/venv/local/lib/python2.7/site-
 packages/django/contrib/admin/views/main.py" in __init__
   78. self.queryset = self.get_queryset(request)

 File "/venv/local/lib/python2.7/site-
 packages/django/contrib/admin/views/main.py" in get_queryset
   346. qs, search_use_distinct =
 self.model_admin.get_search_results(request, qs, self.query)

 File "/venv/local/lib/python2.7/site-
 packages/django/contrib/admin/options.py" in get_search_results
   908. if lookup_needs_distinct(self.opts,
 search_spec):

 File "/venv/local/lib/python2.7/site-
 packages/django/contrib/admin/utils.py" in lookup_needs_distinct
   32. field = opts.get_field(field_name)

 File "/venv/local/lib/python2.7/site-packages/django/db/models/options.py"
 in get_field
   619. raise FieldDoesNotExist('%s has no field named %r' %
 (self.object_name, field_name))

 Exception Type: FieldDoesNotExist at /admin/app/foo/
 Exception Value: Bar has no field named u'pk'
 }}}

 Same code works fine in 1.8.16.

 UPDATE: i've updated the test case as searching for the pk of the admin
 model does not work in 1.8.16 too

--

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


[Django] #27897: Cannot search for pk in the admin anymore

2017-03-03 Thread Django
#27897: Cannot search for pk in the admin anymore
-+
   Reporter:  rm_|  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  contrib.admin  |Version:  1.10
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 On django 1.10.6 and python 2.7.9 given this Model and ModelAdmin:

 {{{
 class Foo(models.Model):
 name = models.CharField(
 max_length=256
 )

 class FooAdmin(admin.ModelAdmin):
 search_fields = ['pk']
 }}}

 Each search returns:

 {{{
 File "/venv/local/lib/python2.7/site-
 packages/django/contrib/admin/views/main.py" in __init__
   81. self.queryset = self.get_queryset(request)
 File "/venv/local/lib/python2.7/site-
 packages/django/contrib/admin/views/main.py" in get_queryset
   359. request, qs, self.query)
 File "/venv/local/lib/python2.7/site-
 packages/django/contrib/admin/options.py" in get_search_results
   994. if lookup_needs_distinct(self.opts,
 search_spec):
 File "/venv/local/lib/python2.7/site-
 packages/django/contrib/admin/utils.py" in lookup_needs_distinct
   26. field = opts.get_field(field_name)
 File "/venv/local/lib/python2.7/site-packages/django/db/models/options.py"
 in get_field
   554. raise FieldDoesNotExist('%s has no field named %r' %
 (self.object_name, field_name))

 Exception Type: FieldDoesNotExist at /admin/athome/disciplina/
 Exception Value: Foo has no field named u'pk'
 }}}

 Same code works fine in 1.8.16.

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


Re: [Django] #27890: runtests.py cleanup exception on Python 3.6

2017-03-03 Thread Django
#27890: runtests.py cleanup exception on Python 3.6
+
 Reporter:  Vytis Banaitis  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Core (Other)|  Version:  master
 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
+

Comment (by Vytis Banaitis):

 Replying to [comment:4 Claude Paroz]:
 > Really? My idea was something like:
 >
 > {{{
 > def custom_delete(tmpdir):
 > try:
 > shutil.rmtree(tmpdir)
 > except FileNotFoundError:
 >  pass
 >
 > atexit.register(custom_delete, TMPDIR)
 > }}}
 Removal of TMPDIR happens without error.
 The error is raised by `multiprocessing` exit handler which tries to
 delete a directory inside of TMPDIR.

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