Re: [Django] #28687: Add a 'Not Empty' option to admin's related filter

2019-01-11 Thread Django
#28687: Add a 'Not Empty' option to admin's related filter
-+-
 Reporter:  Brillgen Developers  |Owner:  Jake
 Type:   |  Barber
  Cleanup/optimization   |   Status:  new
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Sardorbek Imomaliev):

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


Comment:

 I think we should reopen this and fix an issue with current
 `RelatedFieldListFilter`. For example currently to add `Not Empty` choice
 you need to do this

 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
   class NotEmptyFilter(admin.RelatedFieldListFilter):
   @property
   def include_empty_choice(self):
   # FIXME: empty value selected incorrectly override in choices
   return False

   def has_output(self):
   return super().has_output() + 2

   def choices(self, changelist):
   yield from super().choices(changelist)
   yield {
   'selected': self.lookup_val_isnull == 'True',
   'query_string': changelist.get_query_string(
   {self.lookup_kwarg_isnull: 'True'}, [self.lookup_kwarg]
   ),
   'display': _('Empty'),
   yield {
   'selected': self.lookup_val_isnull == 'False',
   'query_string': changelist.get_query_string(
   {self.lookup_kwarg_isnull: 'False'}, [self.lookup_kwarg]
   ),
   'display': _('Not Empty'),
   }
   }}}
 }}}

 But you should be able to do just
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
   class NotEmptyFilter(admin.RelatedFieldListFilter):
   def has_output(self):
   return super().has_output() + 1

   def choices(self, changelist):
   yield from super().choices(changelist)
   yield {
   'selected': self.lookup_val_isnull == 'False',
   'query_string': changelist.get_query_string(
   {self.lookup_kwarg_isnull: 'False'}, [self.lookup_kwarg]
   ),
   'display': _('Not Empty'),
   }
   }}}
 }}}

 Currently this is not possible because of `bool(self.lookup_val_isnull)`
 check in selected for `Empty` choice, and if we add `Not Empty` choice
 like in second example we will get both `Empty` and `Not Empty` choices
 rendered as selected on `Not Empty`

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


Re: [Django] #29738: Django can't serialize DateTimeTZRange(lower=None, upper=None, bounds='[)')

2019-01-11 Thread Django
#29738: Django can't serialize DateTimeTZRange(lower=None, upper=None, 
bounds='[)')
-+-
 Reporter:  Graham Mayer |Owner:  Can
 |  Sarıgöl
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  rangefield   | Triage Stage:  Accepted
  postgresql psycopg2 migrations |
  removed|
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:"7d3b3897c1d7b1ae4dfea6ae0d4f431d3e3dec1c" 7d3b3897]:
 {{{
 #!CommitTicketReference repository=""
 revision="7d3b3897c1d7b1ae4dfea6ae0d4f431d3e3dec1c"
 Refs #29738 -- Allowed registering serializers with MigrationWriter.
 }}}

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


Re: [Django] #29738: Django can't serialize DateTimeTZRange(lower=None, upper=None, bounds='[)')

2019-01-11 Thread Django
#29738: Django can't serialize DateTimeTZRange(lower=None, upper=None, 
bounds='[)')
-+-
 Reporter:  Graham Mayer |Owner:  Can
 |  Sarıgöl
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  rangefield   | Triage Stage:  Accepted
  postgresql psycopg2 migrations |
  removed|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"e192223ed996ed30fe83787efdfa7f2be6b1a2ee" e192223e]:
 {{{
 #!CommitTicketReference repository=""
 revision="e192223ed996ed30fe83787efdfa7f2be6b1a2ee"
 Fixed #29738 -- Allowed serializing psycopg2 range types in migrations.
 }}}

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


Re: [Django] #30097: InlineModelAdmin.has_add_permission() broke backwards compatibility by requiring obj argument

2019-01-11 Thread Django
#30097: InlineModelAdmin.has_add_permission() broke backwards compatibility by
requiring obj argument
-+-
 Reporter:  Maxim Zemskov|Owner:  Maxim
 |  Zemskov
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:  contrib.admin,   | Triage Stage:  Ready for
  admin, inline  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"3c01fe30f3dd4dc1c8bb4fec816bd277d1ae5fa6" 3c01fe30]:
 {{{
 #!CommitTicketReference repository=""
 revision="3c01fe30f3dd4dc1c8bb4fec816bd277d1ae5fa6"
 Fixed #30097 -- Made 'obj' arg of InlineModelAdmin.has_add_permission()
 optional.

 Restored backwards compatibility after refs #27991.
 Regression in be6ca89396c031619947921c81b8795d816e3285.
 }}}

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


Re: [Django] #27991: Add 'obj' kwarg to InlineModelAdmin.has_add_permission()

2019-01-11 Thread Django
#27991: Add 'obj' kwarg to InlineModelAdmin.has_add_permission()
-+-
 Reporter:  Olivier  |Owner:  Vladimir
 Type:   |  Ivanov
  Cleanup/optimization   |   Status:  closed
Component:  contrib.admin|  Version:  1.10
 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:"3df13847d583f0e439d03dd85e4d8d2a36e6de73" 3df13847]:
 {{{
 #!CommitTicketReference repository=""
 revision="3df13847d583f0e439d03dd85e4d8d2a36e6de73"
 [2.1.x] Fixed #30097 -- Made 'obj' arg of
 InlineModelAdmin.has_add_permission() optional.

 Restored backwards compatibility after refs #27991.
 Regression in be6ca89396c031619947921c81b8795d816e3285.

 Backport of 3c01fe30f3dd4dc1c8bb4fec816bd277d1ae5fa6 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/071.d831904ce77ab33f9db97740eb86e9ae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27991: Add 'obj' kwarg to InlineModelAdmin.has_add_permission()

2019-01-11 Thread Django
#27991: Add 'obj' kwarg to InlineModelAdmin.has_add_permission()
-+-
 Reporter:  Olivier  |Owner:  Vladimir
 Type:   |  Ivanov
  Cleanup/optimization   |   Status:  closed
Component:  contrib.admin|  Version:  1.10
 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:"3c01fe30f3dd4dc1c8bb4fec816bd277d1ae5fa6" 3c01fe30]:
 {{{
 #!CommitTicketReference repository=""
 revision="3c01fe30f3dd4dc1c8bb4fec816bd277d1ae5fa6"
 Fixed #30097 -- Made 'obj' arg of InlineModelAdmin.has_add_permission()
 optional.

 Restored backwards compatibility after refs #27991.
 Regression in be6ca89396c031619947921c81b8795d816e3285.
 }}}

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


Re: [Django] #30097: InlineModelAdmin.has_add_permission() broke backwards compatibility by requiring obj argument

2019-01-11 Thread Django
#30097: InlineModelAdmin.has_add_permission() broke backwards compatibility by
requiring obj argument
-+-
 Reporter:  Maxim Zemskov|Owner:  Maxim
 |  Zemskov
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:  contrib.admin,   | Triage Stage:  Ready for
  admin, inline  |  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:"3df13847d583f0e439d03dd85e4d8d2a36e6de73" 3df13847]:
 {{{
 #!CommitTicketReference repository=""
 revision="3df13847d583f0e439d03dd85e4d8d2a36e6de73"
 [2.1.x] Fixed #30097 -- Made 'obj' arg of
 InlineModelAdmin.has_add_permission() optional.

 Restored backwards compatibility after refs #27991.
 Regression in be6ca89396c031619947921c81b8795d816e3285.

 Backport of 3c01fe30f3dd4dc1c8bb4fec816bd277d1ae5fa6 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/070.fec8de0dbc87768f80f64620183bad2d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28478: Make DiscoverRunner skip creating a test database if not needed

2019-01-11 Thread Django
#28478: Make DiscoverRunner skip creating a test database if not needed
--+
 Reporter:  Tim Graham|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Testing framework |  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):

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


Comment:

 A failure appeared after 41e73de39df31c4b13d65462bfeedde6924226d8:
 {{{
 ./tests/runtests.py --settings=test_postgres postgres_tests
 Testing against Django installed in '/home/tim/code/django/django' with up
 to 3 processes
 PostgreSQL 90515
 Creating test database for alias 'default'…
 Cloning test database for alias 'default'…
 Cloning test database for alias 'default'…
 Cloning test database for alias 'default'…
 System check identified no issues (0 silenced).
 ...
 ==
 ERROR: test_datetime_prepare_value
 (postgres_tests.test_ranges.TestFormField)
 --
 Traceback (most recent call last):
   File "/opt/python3.7.0/lib/python3.7/unittest/case.py", line 59, in
 testPartExecutor
 yield
   File "/opt/python3.7.0/lib/python3.7/unittest/case.py", line 615, in run
 testMethod()
   File "/home/tim/code/django/django/test/utils.py", line 370, in inner
 with self as context:
   File "/home/tim/code/django/django/test/utils.py", line 338, in
 __enter__
 return self.enable()
   File "/home/tim/code/django/django/test/utils.py", line 419, in enable
 self.disable()
   File "/home/tim/code/django/django/test/utils.py", line 437, in disable
 raise exc
   File "/home/tim/code/django/django/test/utils.py", line 415, in enable
 setting=key, value=new_value, enter=True,
   File "/home/tim/code/django/django/dispatch/dispatcher.py", line 175, in
 send
 for receiver in self._live_receivers(sender)
   File "/home/tim/code/django/django/dispatch/dispatcher.py", line 175, in
 
 for receiver in self._live_receivers(sender)
   File "/home/tim/code/django/django/test/signals.py", line 74, in
 update_connections_time_zone
 conn.ensure_timezone()
   File "/home/tim/code/django/django/db/backends/postgresql/base.py", line
 198, in ensure_timezone
 self.ensure_connection()
   File "/home/tim/code/django/django/db/backends/base/base.py", line 216,
 in ensure_connection
 self.connect()
   File "/home/tim/code/django/django/db/utils.py", line 89, in __exit__
 raise dj_exc_value.with_traceback(traceback) from exc_value
   File "/home/tim/code/django/django/db/backends/base/base.py", line 216,
 in ensure_connection
 self.connect()
   File "/home/tim/code/django/django/db/backends/base/base.py", line 194,
 in connect
 self.connection = self.get_new_connection(conn_params)
   File "/home/tim/code/django/django/db/backends/postgresql/base.py", line
 178, in get_new_connection
 connection = Database.connect(**conn_params)
   File "/home/tim/.virtualenvs/django37/lib/python3.7/site-
 packages/psycopg2/__init__.py", line 130, in connect
 conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
 django.db.utils.OperationalError: FATAL:  database "djangotests2_2" does
 not exist
 }}}
 Add `--parallel=1` and there's no 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/067.6d7d9e7c84c8531d29123492e820df0d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30099: Filter by Count annotated inside Subquery

2019-01-11 Thread Django
#30099: Filter by Count annotated inside Subquery
-+-
 Reporter:  MrFus10n |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  Subquery annotate| Triage Stage:
  Count filter   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by MrFus10n):

 * keywords:   => Subquery annotate Count filter


Old description:

> I want to get authors and annotate minimal count of books in category if
> it is greater than three.
>
> Book and Author models and are not connected with ForeignKey fields (this
> is, abstract and simplified, there is a reason):
>
> {{{
> Author(models.Model):
> name = models.CharField(max_length=250)
>
> Book(models.Model):
> author_name = models.CharField(max_length=250)
> book_category = models.CharField(max_length=250)
> }}}
>
> Here is simplest query I can get to reproduce:
>
> {{{
> (Author.objects
>  .annotate(min_valuable_count=Subquery(
> Book.objects
> .filter(author_name=OuterRef('name'))
> .annotate(cnt=Count('book_category'))
> .filter(cnt__gt=3)
> .order_by('cnt')
> .values('cnt')[:1],
> output_field=models.IntegerField()
> )))
> }}}
>
> And I get an error:
>
> {{{
> psycopg2.ProgrammingError: missing FROM-clause entry for table "U0"
> LINE 1: ... "core_author" GROUP BY "core_author"."id", "U0"."id" ...
>^
> }}}
>
> Here is SQL:
>
> {{{
> SELECT "core_author"."id", "core_author"."name", (
> SELECT COUNT(U0."book_category") AS "cnt"
> FROM "core_book" U0 WHERE U0."id" = ("core_author"."chat_id")
> GROUP BY U0."id" HAVING COUNT(U0."book_category") > 3
> ORDER BY "cnt" ASC  LIMIT 1)
> AS "min_valuable_count"
> FROM "core_author"
> GROUP BY "core_author"."id", "U0"."id"
> }}}
>
> If I remove line {{{.filter(author_name=OuterRef('name'))}}} or
> {{{.filter(cnt__gt=3)}}} query stops raising error.

New description:

 I want to get authors and annotate minimal count of books in category if
 it is greater than three.

 Book and Author models and are not connected with ForeignKey fields (this
 is abstract and simplified, there is a reason):

 {{{
 Author(models.Model):
 name = models.CharField(max_length=250)

 Book(models.Model):
 author_name = models.CharField(max_length=250)
 book_category = models.CharField(max_length=250)
 }}}

 Here is simplest query I can get to reproduce:

 {{{
 (Author.objects
  .annotate(min_valuable_count=Subquery(
 Book.objects
 .filter(author_name=OuterRef('name'))
 .annotate(cnt=Count('book_category'))
 .filter(cnt__gt=3)
 .order_by('cnt')
 .values('cnt')[:1],
 output_field=models.IntegerField()
 )))
 }}}

 And I get an error:

 {{{
 psycopg2.ProgrammingError: missing FROM-clause entry for table "U0"
 LINE 1: ... "core_author" GROUP BY "core_author"."id", "U0"."id" ...
^
 }}}

 Here is SQL:

 {{{
 SELECT "core_author"."id", "core_author"."name", (
 SELECT COUNT(U0."book_category") AS "cnt"
 FROM "core_book" U0 WHERE U0."id" = ("core_author"."chat_id")
 GROUP BY U0."id" HAVING COUNT(U0."book_category") > 3
 ORDER BY "cnt" ASC  LIMIT 1)
 AS "min_valuable_count"
 FROM "core_author"
 GROUP BY "core_author"."id", "U0"."id"
 }}}

 If I remove line {{{.filter(author_name=OuterRef('name'))}}} or
 {{{.filter(cnt__gt=3)}}} query stops raising error.

--

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


[Django] #30099: Filter by Count annotated inside Subquery

2019-01-11 Thread Django
#30099: Filter by Count annotated inside Subquery
-+-
   Reporter:  MrFus10n   |  Owner:  nobody
   Type:  Bug| Status:  new
  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  |
-+-
 I want to get authors and annotate minimal count of books in category if
 it is greater than three.

 Book and Author models and are not connected with ForeignKey fields (this
 is, abstract and simplified, there is a reason):

 {{{
 Author(models.Model):
 name = models.CharField(max_length=250)

 Book(models.Model):
 author_name = models.CharField(max_length=250)
 book_category = models.CharField(max_length=250)
 }}}

 Here is simplest query I can get to reproduce:

 {{{
 (Author.objects
  .annotate(min_valuable_count=Subquery(
 Book.objects
 .filter(author_name=OuterRef('name'))
 .annotate(cnt=Count('book_category'))
 .filter(cnt__gt=3)
 .order_by('cnt')
 .values('cnt')[:1],
 output_field=models.IntegerField()
 )))
 }}}

 And I get an error:

 {{{
 psycopg2.ProgrammingError: missing FROM-clause entry for table "U0"
 LINE 1: ... "core_author" GROUP BY "core_author"."id", "U0"."id" ...
^
 }}}

 Here is SQL:

 {{{
 SELECT "core_author"."id", "core_author"."name", (
 SELECT COUNT(U0."book_category") AS "cnt"
 FROM "core_book" U0 WHERE U0."id" = ("core_author"."chat_id")
 GROUP BY U0."id" HAVING COUNT(U0."book_category") > 3
 ORDER BY "cnt" ASC  LIMIT 1)
 AS "min_valuable_count"
 FROM "core_author"
 GROUP BY "core_author"."id", "U0"."id"
 }}}

 If I remove line {{{.filter(author_name=OuterRef('name'))}}} or
 {{{.filter(cnt__gt=3)}}} query stops raising error.

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


Re: [Django] #30097: InlineModelAdmin.has_add_permission() broke backwards compatibility by requiring obj argument (was: InlineModelAdmin.has_add_permission() requires obj argument)

2019-01-11 Thread Django
#30097: InlineModelAdmin.has_add_permission() broke backwards compatibility by
requiring obj argument
-+-
 Reporter:  Maxim Zemskov|Owner:  Maxim
 |  Zemskov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   Resolution:
 Keywords:  contrib.admin,   | Triage Stage:  Ready for
  admin, inline  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * cc: Jon, Dufresne (removed)
 * stage:  Accepted => Ready for checkin


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


Re: [Django] #20147: Provide an alternative to request.META for accessing HTTP headers

2019-01-11 Thread Django
#20147: Provide an alternative to request.META for accessing HTTP headers
---+---
 Reporter:  Luke Plant |Owner:  santiagobasulto
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+---
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1
 * stage:  Ready for checkin => 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/067.356b75c5fddb48d33dede849acc81a69%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30097: InlineModelAdmin.has_add_permission() requires obj argument

2019-01-11 Thread Django
#30097: InlineModelAdmin.has_add_permission() requires obj argument
-+-
 Reporter:  Maxim Zemskov|Owner:  Maxim
 |  Zemskov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   Resolution:
 Keywords:  contrib.admin,   | Triage Stage:  Accepted
  admin, inline  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Maxim Zemskov):

 * status:  new => assigned
 * owner:  nobody => Maxim Zemskov


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


Re: [Django] #23829: Make ping_google use https for the sitemap URL

2019-01-11 Thread Django
#23829: Make ping_google use https for the sitemap URL
-+-
 Reporter:  Julian Wachholz  |Owner:  Sanyam
 Type:   |  Khurana
  Cleanup/optimization   |   Status:  closed
Component:  contrib.sitemaps |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  sitemaps,| Triage Stage:  Accepted
  ping_google|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

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


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


Re: [Django] #23829: Make ping_google use https for the sitemap URL

2019-01-11 Thread Django
#23829: Make ping_google use https for the sitemap URL
-+-
 Reporter:  Julian Wachholz  |Owner:  Sanyam
 Type:   |  Khurana
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.sitemaps |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  sitemaps,| Triage Stage:  Accepted
  ping_google|
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:"76d31be2d04dd6e6bcb5cb39a29ea9ed3938d0f9" 76d31be]:
 {{{
 #!CommitTicketReference repository=""
 revision="76d31be2d04dd6e6bcb5cb39a29ea9ed3938d0f9"
 Refs #23829 -- Made ping_google command/function use https for the sitemap
 URL.
 }}}

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


Re: [Django] #30098: Permit using packages (directories) in custom django-admin commands.

2019-01-11 Thread Django
#30098: Permit using packages (directories) in custom django-admin commands.
-+-
 Reporter:  Andrey Volkov|Owner:  Andrey
 |  Volkov
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  2.1
  commands)  |
 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
-+-
Changes (by Andrey Volkov):

 * has_patch:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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.0b6558c3d3801a8a95581f1d2170%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30098: Permit using packages (directories) in custom django-admin commands.

2019-01-11 Thread Django
#30098: Permit using packages (directories) in custom django-admin commands.
-+-
 Reporter:  Andrey Volkov|Owner:  Andrey
 |  Volkov
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  2.1
  commands)  |
 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 Andrey Volkov):

 Patch is finished. Pull request is submitted.
 https://github.com/django/django/pull/10836

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


Re: [Django] #30095: System check error for tuples in model field choices

2019-01-11 Thread Django
#30095: System check error for tuples in model field choices
-+-
 Reporter:  Pedro Marcondes  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  choices tuple| Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Pedro Marcondes):

 Replying to [comment:1 Tim Graham]:
 > I think you could solve your issue and improve your code by using
 `NumericRange` in your choices instead of tuples. Now there may be other
 custom fields that want to use tuples for choice values, but perhaps we
 should address that if/when someone presents a use case.

 We tried to use 'NumericRange' but we got an error in serialization when
 trying to migrate. With further investigation we found that choices wasn't
 working(1.11.15~) with tuples even though it seemed to accept it as an
 option. Maybe django should support NumericRange serialization by default?
 Otherwise it's not possible to use the choices parameter out of the box.

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


Re: [Django] #23829: Make ping_google use https for the sitemap URL

2019-01-11 Thread Django
#23829: Make ping_google use https for the sitemap URL
-+-
 Reporter:  Julian Wachholz  |Owner:  Sanyam
 Type:   |  Khurana
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.sitemaps |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  sitemaps,| Triage Stage:  Accepted
  ping_google|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Adam (Chainz) Johnson):

 +1 to your proposal Tim. Well spotted.

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


Re: [Django] #30098: Permit using packages (directories) in custom django-admin commands.

2019-01-11 Thread Django
#30098: Permit using packages (directories) in custom django-admin commands.
-+-
 Reporter:  Andrey Volkov|Owner:  Andrey
 |  Volkov
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  2.1
  commands)  |
 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 Andrey Volkov):

 Replying to [comment:2 Tim Graham]:
 > At first glance, I'm not in favor of the extra complexity this would
 introduce. Django stores helper files for its own commands in the
 `management` directory (`django/core/managment`) which seems fine.

 Yeah, this can increase complexity, but this feature is not obligatory.
 Developers can write management commands the same way as before.

 Why I want this change, is because it solves and/or simplifies some
 problems (mine too). For example, we could have a library that assumes
 some filenames to be `data.json` and we want to use this library in the
 number of commands. With directories style it can be solved like this:
 {{{
 app_example/management/commands
 ├── first_command
 │   ├── data.json
 │   └── __init__.py
 └── second_command
 ├── data.json
 └── __init__.py
 }}}

 With files-only style it (with some changes to library behavior) should
 be:
 {{{
 app_example/management
 ├── commands
 │   ├── first_command.py
 │   └── second_command.py
 ├── first_command_data.json
 └── second_command_data.json
 }}}

 Last solution gives duplicated command names. That means if developer
 changes a command name, it should be changed at least twice (against one
 change in directory approach).

 Also, this style gives possibility for encapsulation. Django wouldn't know
 how the command is structured (is it file or directory) it will just use
 it as a regular module, that contains a `Command` class.

 Last point I want to mention here, is that it can help Django in the
 future. If additional functionality will be given to the management module
 (some features except commands), encapsulation will prevent storing random
 files (that refer only to commands) in management directory. And change,
 that enables directory-based commands, is extremely small, so that it
 affects only parsing the `app/management/commands` directory (it is
 literally removes only one condition).

 Sorry for such a long comment, but I really think that this feature will
 help developers both now and in the future.

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


Re: [Django] #23829: Make ping_google use https for the sitemap URL (was: Allow customizing the `ping_google` URL)

2019-01-11 Thread Django
#23829: Make ping_google use https for the sitemap URL
-+-
 Reporter:  Julian Wachholz  |Owner:  Sanyam
 Type:   |  Khurana
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.sitemaps |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  sitemaps,| Triage Stage:  Accepted
  ping_google|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 As I noted on the PR, the ticket reporter talks about "run ping_google
 from CLI without having contrib.sites installed." but you can't run a
 management command without it's app installed. Unless someone has a use
 case for it, I'm in favor of deferring the site domain changes for a
 separate ticket (if at all).

 [https://github.com/django/django/pull/10835 PR] for making the
 ping_google command and function use https for the sitemap URL. I think
 that's straightforward.

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


Re: [Django] #30098: Permit using packages (directories) in custom django-admin commands.

2019-01-11 Thread Django
#30098: Permit using packages (directories) in custom django-admin commands.
-+-
 Reporter:  Andrey Volkov|Owner:  Andrey
 |  Volkov
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  2.1
  commands)  |
 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):

 At first glance, I'm not in favor of the extra complexity this would
 introduce. Django stores helper files for its own commands in the
 `management` directory (`django/core/managment`) which seems fine.

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


Re: [Django] #30098: Permit using packages (directories) in custom django-admin commands.

2019-01-11 Thread Django
#30098: Permit using packages (directories) in custom django-admin commands.
-+-
 Reporter:  Andrey Volkov|Owner:  Andrey
 |  Volkov
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  2.1
  commands)  |
 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 Andrey Volkov):

 Now I am working on tests and 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/064.7a8c0ed16af34e35c822a48f918f8a0a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #30098: Permit using packages (directories) in custom django-admin commands.

2019-01-11 Thread Django
#30098: Permit using packages (directories) in custom django-admin commands.
-+-
   Reporter:  Andrey |  Owner:  Andrey Volkov
  Volkov |
   Type:  New| Status:  assigned
  feature|
  Component:  Core   |Version:  2.1
  (Management commands)  |
   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  |
-+-
 Current Django behavior is that only files are allowed for custom django-
 admin commands definition. It would be great if Django permitted
 directories (see example below).

 Current (required) style:
 {{{
 app_example/management/commands
 ├── first_command.py
 └── second_command.py
 }}}

 New style:
 {{{
 app_example/management/commands
 ├── first_command
 │   ├── __init__.py
 │   └── some_useful_data
 └── second_command
 └── __init__.py
 }}}

 Or combined style:
 {{{
 app_example/management/commands
 ├── first_command
 │   ├── __init__.py
 │   └── some_useful_data
 └── second_command.py
 }}}

 This feature allows developers to use additional files (some_useful_data
 is this case) in structured way, also providing encapsulation.

 The only code to be changed is in file
 `django/core/management/__init__.py` line 27:
 From `if not is_pkg and not name.startswith('_')]`
 To `if not name.startswith('_')]`

 After this change, function `find_commands` won't ignore packages
 (directories).

 Also, backward compatibility will be saved (because single files work in
 the same way).

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


Re: [Django] #30097: InlineModelAdmin.has_add_permission() requires obj argument

2019-01-11 Thread Django
#30097: InlineModelAdmin.has_add_permission() requires obj argument
-+-
 Reporter:  Maxim Zemskov|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  2.1
 Severity:  Release blocker  |   Resolution:
 Keywords:  contrib.admin,   | Triage Stage:  Accepted
  admin, inline  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * cc: Jon, Dufresne (added)
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 This looks related to #27991. The new test case on the PR looks right and
 fails without the patch, so pending review I'm going to accept this as a
 Release Blocker on v2.1.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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.1fab1fdf53b3935cac5e51ff4ca96eb7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13539: The delete confirmation page does not check for object-level permissions when building the related list

2019-01-11 Thread Django
#13539: The delete confirmation page does not check for object-level permissions
when building the related list
-+-
 Reporter:  Ion Scerbatiuc   |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:  delete object-level  | Triage Stage:  Accepted
  permissions|
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by selected-pixel-jameson):

 Nevermind. I had this setup wrong.
 Replying to [comment:20 selected-pixel-jameson]:
 > Is there no work around for this problem? It's pretty much preventing me
 from deleting anything in my application.

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


Re: [Django] #13539: The delete confirmation page does not check for object-level permissions when building the related list

2019-01-11 Thread Django
#13539: The delete confirmation page does not check for object-level permissions
when building the related list
-+-
 Reporter:  Ion Scerbatiuc   |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:  delete object-level  | Triage Stage:  Accepted
  permissions|
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by selected-pixel-jameson):

 Is there no work around for this problem? It's pretty much preventing me
 from deleting anything in my application.

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


Re: [Django] #27910: Allow using an Enum class in model Field choices

2019-01-11 Thread Django
#27910: Allow using an Enum class in model Field choices
-+-
 Reporter:  Marcel Hellwig   |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  enum model choices   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ryan Hiebert):

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


Re: [Django] #30097: InlineModelAdmin.has_add_permission() requires obj argument

2019-01-11 Thread Django
#30097: InlineModelAdmin.has_add_permission() requires obj argument
-+-
 Reporter:  Maxim Zemskov|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:  contrib.admin,   | Triage Stage:
  admin, inline  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Maxim Zemskov):

 * has_patch:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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.5962e2e5a0141cf51fb5b2948e6f318a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #30097: InlineModelAdmin.has_add_permission() requires obj argument

2019-01-11 Thread Django
#30097: InlineModelAdmin.has_add_permission() requires obj argument
-+-
   Reporter:  Maxim  |  Owner:  nobody
  Zemskov|
   Type:  Bug| Status:  new
  Component: |Version:  2.1
  contrib.admin  |   Keywords:  contrib.admin,
   Severity:  Normal |  admin, inline
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 InlineModelAdmin.has_add_permission() requires obj argument:
 {{{
 def has_add_permission(self, request, obj):
 if self.opts.auto_created:
 return self.has_view_permission(request, obj)
 return super().has_add_permission(request)
 }}}

 But implementation of InlineModelAdmin._has_add_permission() says obj will
 be required in django 3.0:

 {{{
 def _has_add_permission(self, request, obj):
 # RemovedInDjango30Warning: obj will be a required argument.
 args = get_func_args(self.has_add_permission)
 return self.has_add_permission(request, obj) if 'obj' in args else
 self.has_add_permission(request)
 }}}
 So, code will crush at **{{{self.has_add_permission(request)}}}** in
 return statement with {{{missing 1 required positional argument: 'obj'}}}.

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


Re: [Django] #30096: Use case of extra()

2019-01-11 Thread Django
#30096: Use case of extra()
-+-
 Reporter:  shambhavishinde  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Migrations   |  Version:  2.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  extra| Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

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


Comment:

 Hi. I’m afraid this isn’t a bug report as is.

 I'm guessing you’re making the case for `extra()`. The place to do that
 would be on Django Developers rather than here.
 (But please search the history before doing so as it had been dicussed at
 length in the past.)

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


Re: [Django] #30084: Setting DATABASES['default']['TEST']['engine'] to SQLite does not cause Django to use an in-memory database as expected

2019-01-11 Thread Django
#30084: Setting DATABASES['default']['TEST']['engine'] to SQLite does not cause
Django to use an in-memory database as expected
---+--
 Reporter:  mrts   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Testing framework  |  Version:  2.1
 Severity:  Normal |   Resolution:  invalid
 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 mrts):

 Alright, let's leave it as is then. Thanks for helping!

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


[Django] #30096: Use case of extra()

2019-01-11 Thread Django
#30096: Use case of extra()
+
   Reporter:  shambhavishinde   |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Migrations|Version:  2.1
   Severity:  Normal|   Keywords:  extra
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 extra() is being used by me in a project where I wish to order a queryset
 according to a specific order of ids.

 Eg. Order Food objects in the order of foreign key carb_ids = [2,3,5,1].

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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.1dc0c0804550698cc739db28c2f22fe0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.