Re: [Django] #29720: Validating migrations using manage.py

2018-08-29 Thread Django
#29720: Validating migrations using manage.py
-+-
 Reporter:  Thomas Basche|Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Migrations   |  Version:  2.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  migrations,  | Triage Stage:
  manage.py, validation  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Thomas Basche):

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


Comment:

 Replying to [comment:1 Tim Graham]:
 > It's not clear to me what you're proposing. If I understand the scenario
 you're describing, you'll get an error if you run `makemigrations
 --check`. Is that insufficient?
 > {{{
 > $ python manage.py makemigrations --check
 > CommandError: Conflicting migrations detected; multiple leaf nodes in
 the migration graph: (0002_auto_201808429_2051, 0002_auto_20180829_2051 in
 polls).
 > To fix them run 'python manage.py makemigrations --merge'
 > }}}

 That is probably actually bang on. Cheers! Perhaps I should have read the
 documentation a bit closer...

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


Re: [Django] #29717: Provide a way for tests to run on an existing empty DB

2018-08-29 Thread Django
#29717: Provide a way for tests to run on an existing empty DB
-+-
 Reporter:  Curtis Maloney   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Curtis Maloney):

 Replying to [comment:3 Tim Graham]:
 > Thanks for clarifying. Maybe the Oracle-specific
 [https://docs.djangoproject.com/en/dev/ref/settings/#create-db CREATE_DB]
 setting in DATABASES 'OPTIONS' does what you want to do for PostgreSQL?
 Possibly that might just be another way to do "keepdb" -- I didn't
 investigate enough to confirm.
 >

 From the docs:
 {{{
 If it is set to False, the test tablespaces won’t be automatically created
 at the beginning of the tests or dropped at the end.
 }}}

 This is _close_ to what I was after. However, I'd want it to create and
 tear down the models, etc.

 So really we want to build a matrix of steps:

 1. (a) Create DB --OR-- (b) Clear DB
 1. Apply migrations
 1. Revert migrations
 1. Drop DB

 Normally we affect all steps, with 3 implied by 4. Using --keepdb skips 3
 and 4. I'm looking for a way to allow only 1(b), 2, and 3.

 My current solution to step 3 is excessive, in that it will drop
 _everything_, not just the objects we created in migrations.  I don't
 believe there is currently a simple way to migrate everything to ZERO,
 instead we'd likely need to iterate the installed apps and do them
 individually.

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


Re: [Django] #29500: SQLite functions crashes on NULL values

2018-08-29 Thread Django
#29500: SQLite functions crashes on NULL values
-+-
 Reporter:  Sergey Fedoseev  |Owner:  Nick Pope
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 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 Nick Pope):

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


Re: [Django] #29720: Validating migrations using manage.py

2018-08-29 Thread Django
#29720: Validating migrations using manage.py
-+-
 Reporter:  Thomas Basche|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Migrations   |  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:
  manage.py, validation  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 It's not clear to me what you're proposing. If I understand the scenario
 you're describing, you'll get an error if you run `makemigrations
 --check`. Is that insufficient?
 {{{
 $ python manage.py makemigrations --check
 CommandError: Conflicting migrations detected; multiple leaf nodes in the
 migration graph: (0002_auto_201808429_2051, 0002_auto_20180829_2051 in
 polls).
 To fix them run 'python manage.py makemigrations --merge'
 }}}

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


Re: [Django] #29723: Admin crashes if InlineModelAdmin.has_add_permission() doesn't accept the obj argument (was: Backwards-incompatible change of InlineModelAdmin.has_add_permission() in 2.1)

2018-08-29 Thread Django
#29723: Admin crashes if InlineModelAdmin.has_add_permission() doesn't accept 
the
obj argument
--+--
 Reporter:  Aymeric Augustin  |Owner:  Tim Graham
 Type:  Bug   |   Status:  assigned
Component:  contrib.admin |  Version:  2.1
 Severity:  Release blocker   |   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/10355 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.7428acdda45daf3553bf79a6c794df27%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29723: Backwards-incompatible change of InlineModelAdmin.has_add_permission() in 2.1

2018-08-29 Thread Django
#29723: Backwards-incompatible change of InlineModelAdmin.has_add_permission() 
in
2.1
--+--
 Reporter:  Aymeric Augustin  |Owner:  Tim Graham
 Type:  Bug   |   Status:  assigned
Component:  contrib.admin |  Version:  2.1
 Severity:  Release blocker   |   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):

 * status:  new => assigned
 * owner:  nobody => Tim Graham


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


[Django] #29725: Inefficient SQL generated when counting a ManyToMany

2018-08-29 Thread Django
#29725: Inefficient SQL generated when counting a ManyToMany
-+-
   Reporter:  Gavin  |  Owner:  nobody
  Wahl   |
   Type: | Status:  new
  Uncategorized  |
  Component:  Database   |Version:  2.1
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 When calling count() on an unfiltered many to many relation, a useless
 join is included in the SQL that makes it much slower than it should be.
 On my dataset, the difference is 1000ms to 100ms, because an index-only
 scan can be used.

 This is the SQL that is currently generated:

 {{{#!sql
 SELECT COUNT(*) AS "__count"
 FROM "app_foo"
 INNER JOIN "app_foo_bar" ON ("app_foo"."id" = "app_foo_bar"."foo_id")
 WHERE "app_foo_bar"."foo_id" = ?;
 }}}

 This is the SQL that should be generated:

 {{{#!sql
 SELECT COUNT(*) AS "__count"
 FROM "app_foo_bar"
 WHERE "app_foo_bar"."foo_id" = ?;
 }}}

 This optimization can only be applied when there are no filters applied,
 because then the join is used to satisfy the filters. In the no-filters
 case, only the through table needs to be consulted.

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


Re: [Django] #29724: Admin date_hierarchy filter by month displays an extra day

2018-08-29 Thread Django
#29724: Admin date_hierarchy filter by month displays an extra day
---+--
 Reporter:  Lavrenov Ivan  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.0
 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:  1
---+--

Comment (by Lavrenov Ivan):

 The timezone is '' America/Los_Angeles'', sorry for inaccuracy.
 I'm using Mysql database. I think it is something сonnected with
 converstion to local time. I have a record, which in UTC in the 1st
 September, but in local time it is still in the 31 August.

 P.S. Values stored in UTC format

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


Re: [Django] #29717: Provide a way for tests to run on an existing empty DB

2018-08-29 Thread Django
#29717: Provide a way for tests to run on an existing empty DB
-+-
 Reporter:  Curtis Maloney   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 Thanks for clarifying. Maybe the Oracle-specific
 [https://docs.djangoproject.com/en/dev/ref/settings/#create-db CREATE_DB]
 setting in DATABASES 'OPTIONS' does what you want to do for PostgreSQL?
 Possibly that might just be another way to do "keepdb" -- I didn't
 investigate enough to confirm.

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


Re: [Django] #29724: Admin date_hierarchy filter by month displays an extra day (was: Bug with time filter in django admin)

2018-08-29 Thread Django
#29724: Admin date_hierarchy filter by month displays an extra day
---+--
 Reporter:  Lavrenov Ivan  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.0
 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:  1
---+--

Comment (by Tim Graham):

 Could you be more specific about how to reproduce this? I thought you
 meant `TIME_ZONE = 'Los-Angeles/America'` but I get "Incorrect timezone
 setting". Which database are you using?

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


Re: [Django] #29708: Deprecate PickleSerializer and move it out of core

2018-08-29 Thread Django
#29708: Deprecate PickleSerializer and move it out of core
-+-
 Reporter:  Alex Gaynor  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  contrib.sessions |  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam (Chainz) Johnson):

 * cc: Adam (Chainz) Johnson (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/062.7950d4a11ec5d0ff2f71a77b72db6381%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29724: Bug with time filter in django admin

2018-08-29 Thread Django
#29724: Bug with time filter in django admin
---+--
 Reporter:  freakaton  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.0
 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:  1
---+--
Changes (by freakaton):

 * Attachment "Снимок экрана 2018-08-29 в 16.59.28.png" added.

 representation of bug

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


[Django] #29724: Bug with time filter in django admin

2018-08-29 Thread Django
#29724: Bug with time filter in django admin
-+
   Reporter:  freakaton  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  contrib.admin  |Version:  2.0
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  1  |
-+
 When I authorized by user with not-UTC timezone, like ''Los-
 Angeles/America'' , and open filter by date in month, I see one extra day,
 that follows to the first day of the previous month

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


Re: [Django] #29722: Add introspection of special table and view types in PostgreSQL (was: Improve introspection for special table and view types in PostgreSQL)

2018-08-29 Thread Django
#29722: Add introspection of special table and view types in PostgreSQL
-+-
 Reporter:  Nick Pope|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  postgresql,  | Triage Stage:  Accepted
  introspection, inspectdb, views,   |
  partitions |
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


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


Re: [Django] #28223: Form not always picklable due to template renderer

2018-08-29 Thread Django
#28223: Form not always picklable due to template renderer
--+-
 Reporter:  Claude Paroz  |Owner:  Gaurav Sehgal
 Type:  Bug   |   Status:  assigned
Component:  Forms |  Version:  1.11
 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 Tim Graham):

 I believe template widget rendering
 (b52c73008a9d67e9ddbb841872dc15cdd3d6ee01 introduced this issue.

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


Re: [Django] #29069: Static file serving does not call request_finished signal

2018-08-29 Thread Django
#29069: Static file serving does not call request_finished signal
-+-
 Reporter:  André Cruz   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  HTTP handling|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  streamingresponse| Triage Stage:  Accepted
  request_finished   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Herbert Fortes):

 * cc: Herbert Fortes (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.a30091e82eb353eda67323e3998b8a5a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29721: Migrations are not applied atomically

2018-08-29 Thread Django
#29721: Migrations are not applied atomically
---+
 Reporter:  Gavin Wahl |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Migrations |  Version:  2.1
 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):

 * stage:  Unreviewed => Accepted


Comment:

 I guess we could move the recording logic in the context manager to be
 entirely correct but I'm surprised this has happened to you given the
 small amount of operations performed between the two blocks.

 Are you certain you didn't
 [https://docs.djangoproject.com/en/2.1/topics/migrations/#mysql the
 documented caveat of MySQL regarding atomic migrations]? In that case this
 change wouldn't help at all. Was it the `django_migrations` table creation
 that failed?

 Are you able to provide a patch/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.af6fff83541a5c7fd6c8a10e45ba5da0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #16995: ModelFormSet initial data from initial parameter uses "extra" forms

2018-08-29 Thread Django
#16995: ModelFormSet initial data from initial parameter uses "extra" forms
-+-
 Reporter:  p910221@…|Owner:  S. Dole
 |  Melipone
 Type:  Bug  |   Status:  assigned
Component:  Documentation|  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 S. Dole Melipone):

 * owner:  nobody => S. Dole Melipone
 * status:  new => assigned


Comment:

 I will work on adding this to the documentation.

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


Re: [Django] #29723: Backwards-incompatible change of InlineModelAdmin.has_add_permission() in 2.1 (was: Backwards-incompatible change of has_add_permission in 2.1)

2018-08-29 Thread Django
#29723: Backwards-incompatible change of InlineModelAdmin.has_add_permission() 
in
2.1
--+
 Reporter:  Aymeric Augustin  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.admin |  Version:  2.1
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  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.a41f65ee8a9c201c1457beb573419016%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29723: Backwards-incompatible change of has_add_permission in 2.1

2018-08-29 Thread Django
#29723: Backwards-incompatible change of has_add_permission in 2.1
--+
 Reporter:  Aymeric Augustin  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.admin |  Version:  2.1
 Severity:  Release blocker   |   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 Carlton Gibson):

 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Refs #27991 -- Add obj arg to InlineModelAdmin.has_add_permission()

 There's a check to determine how to call has_add_permission():


 {{{
 # RemovedInDjango30Warning: obj will be a required argument.
 args = get_func_args(inline.has_add_permission)
 if 'obj' in args:
 inline_has_add_permission =
 inline.has_add_permission(request, obj)
 else:
 inline_has_add_permission =
 inline.has_add_permission(request)
 }}}

 Looks like this should be applied to the other call sites.

 #8936 -- Added a view permission and a read-only admin made the addition
 of the offending `can_add = self.has_add_permission(request, obj) if
 request else True` call raising the exception here.

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


Re: [Django] #29689: Improve performance of FileSystemStorage.listdir() and FilePathField with os.scandir()

2018-08-29 Thread Django
#29689: Improve performance of FileSystemStorage.listdir() and FilePathField 
with
os.scandir()
-+-
 Reporter:  Federico Bond|Owner:  Federico
 Type:   |  Bond
  Cleanup/optimization   |   Status:  closed
Component:  File |  Version:  2.1
  uploads/storage|
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
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:"54b331451cb22ee354beadf31ee42cbd714877f0" 54b33145]:
 {{{
 #!CommitTicketReference repository=""
 revision="54b331451cb22ee354beadf31ee42cbd714877f0"
 Refs #29689 -- Moved FilePathField choices sorting outside the loop.
 }}}

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


[Django] #29723: Backwards-incompatible change of has_add_permission in 2.1

2018-08-29 Thread Django
#29723: Backwards-incompatible change of has_add_permission in 2.1
+
   Reporter:  Aymeric Augustin  |  Owner:  nobody
   Type:  Bug   | Status:  new
  Component:  contrib.admin |Version:  2.1
   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 |
+
 The release notes suggest that InlineModelAdmin.has_add_permission()
 methods that don’t accept obj as the second positional argument will be
 supported until Django 3.0:

 > Support for InlineModelAdmin.has_add_permission() methods that don’t
 accept obj as the second positional argument will be removed in Django
 3.0.

 This doesn't appear to be true in my experience.

 I have this method defined on an InlineModelAdmin:
 {{{
 def has_add_permission(self, request):
 return False
 }}}

 I'm getting this traceback with Django 2.1:

 {{{
 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/core/handlers/exception.py" in inner
   34. response = get_response(request)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/core/handlers/base.py" in _get_response
   126. response = self.process_exception_by_middleware(e,
 request)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/core/handlers/base.py" in _get_response
   124. response = wrapped_callback(request,
 *callback_args, **callback_kwargs)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/contrib/admin/options.py" in wrapper
   607. return self.admin_site.admin_view(view)(*args,
 **kwargs)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/utils/decorators.py" in _wrapped_view
   142. response = view_func(request, *args, **kwargs)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/views/decorators/cache.py" in _wrapped_view_func
   44. response = view_func(request, *args, **kwargs)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/contrib/admin/sites.py" in inner
   223. return view(request, *args, **kwargs)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/contrib/admin/options.py" in add_view
   1647. return self.changeform_view(request, None, form_url,
 extra_context)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/utils/decorators.py" in _wrapper
   45. return bound_method(*args, **kwargs)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/utils/decorators.py" in _wrapped_view
   142. response = view_func(request, *args, **kwargs)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/contrib/admin/options.py" in changeform_view
   1536. return self._changeform_view(request, object_id,
 form_url, extra_context)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/contrib/admin/options.py" in _changeform_view
   1590. formsets, inline_instances =
 self._create_formsets(request, form.instance, change=False)

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/contrib/admin/options.py" in _create_formsets
   1945. for FormSet, inline in
 self.get_formsets_with_inlines(*get_formsets_args):

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/contrib/admin/options.py" in get_formsets_with_inlines
   795. yield inline.get_formset(request, obj), inline

 File "/home/ubuntu/.pyenv/versions/3.6.2/envs/cupido/lib/python3.6/site-
 packages/django/contrib/admin/options.py" in get_formset
   2055. can_add = self.has_add_permission(request, obj) if request
 else True

 Exception Type: TypeError at /admin/cupido/notification/add/
 Exception Value: has_add_permission() takes 2 positional arguments but 3
 were given
 }}}

-- 
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 

[Django] #29722: Improve introspection for special table and view types in PostgreSQL

2018-08-29 Thread Django
#29722: Improve introspection for special table and view types in PostgreSQL
-+-
   Reporter:  Nick Pope  |  Owner:  nobody
   Type:  New| Status:  new
  feature|
  Component:  Database   |Version:  master
  layer (models, ORM)|   Keywords:  postgresql,
   Severity:  Normal |  introspection, inspectdb, views,
   Triage Stage: |  partitions
  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Looking at the documentation for
 [https://www.postgresql.org/docs/10/static/catalog-pg-class.html pg_class]
 there are the following types that we might be interested in introspecting
 for generation of models:

 - `r` — ordinary table — obviously this is already supported.
 - `v` — views — support was implemented in #29004.
 - `f` — foreign table — being addressed by #29719.
 - `m` — materialized views — could be handled much like #29004, mapping
 `m` to `v`.
 - `p` — partitioned table — could be handled mapping `p` to `t`, but gets
 more complicated, read on below...

 For partitioned tables, we are unlikely to want to generate models for all
 of the individual partitions, although this could be supported with an
 `--include-partitions` flag.

 From [https://paquier.xyz/postgresql-2/partition-information/ this link]
 we can see an example of output for partitioned tables:

 {{{
  relid |  relname   | relsize | relispartition | relkind
 ---++-++-
  16410 | population |   0 | f  | p
  16417 | population_s   |8192 | t  | r
  16424 | population_t   |   0 | t  | p
  16431 | population_t_10_20 |8192 | t  | r
  16445 | population_t_20_30 |8192 | t  | r
 }}}

 On PostgreSQL 10+ we need to filter on `NOT relispartition` to ignore all
 of the partitions and only include the parent (which is the table that is
 usually interacted with).

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


Re: [Django] #29694: QuerySet.values_list() combined with .extra() may produce wrong .union()

2018-08-29 Thread Django
#29694: QuerySet.values_list() combined with .extra() may produce wrong .union()
-+-
 Reporter:  master   |Owner:  felixxm
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  union values_list| Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"e7acd99113dfedee1bfcdadd2f81db96ab01e95d" e7acd99]:
 {{{
 #!CommitTicketReference repository=""
 revision="e7acd99113dfedee1bfcdadd2f81db96ab01e95d"
 [2.1.x] Fixed #29694 -- Fixed column mismatch crash with QuerySet.values()
 or values_list() after combining querysets with extra() with union(),
 difference(), or intersection().

 Regression in 0b66c3b442875627fa6daef4ac1e90900d74290b.
 Backport of 39461a83c33f0cfe719d3b139413d1f5d1e75d5e 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.d32cd7803e08daf40ef988243f78d5ac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29694: QuerySet.values_list() combined with .extra() may produce wrong .union()

2018-08-29 Thread Django
#29694: QuerySet.values_list() combined with .extra() may produce wrong .union()
-+-
 Reporter:  master   |Owner:  felixxm
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  union values_list| Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by GitHub ):

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


Comment:

 In [changeset:"39461a83c33f0cfe719d3b139413d1f5d1e75d5e" 39461a8]:
 {{{
 #!CommitTicketReference repository=""
 revision="39461a83c33f0cfe719d3b139413d1f5d1e75d5e"
 Fixed #29694 -- Fixed column mismatch crash with QuerySet.values() or
 values_list() after combining querysets with extra() with union(),
 difference(), or intersection().

 Regression in 0b66c3b442875627fa6daef4ac1e90900d74290b.
 }}}

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