Re: [Django] #27595: Database converters are not run for related fields referencing related fields

2018-10-20 Thread Django
#27595: Database converters are not run for related fields referencing related
fields
-+-
 Reporter:  oyooyo   |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (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 Simon Charette):

 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/10541

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


[Django] #29872: ConnectionAbortedError from Chrome cancelled preload

2018-10-20 Thread Django
#29872: ConnectionAbortedError from Chrome cancelled preload
-+-
   Reporter:  hingston   |  Owner:  nobody
   Type:  Bug| Status:  new
  Component: |Version:  2.1
  Uncategorized  |   Keywords:
   Severity:  Normal |  ConnectionAbortedError Preload
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+-
 Using the following code in a
 [https://developers.google.com/web/updates/2017/02/navigation-preload
 service worker to preload]:
 {{{
 addEventListener('activate', event => {
   event.waitUntil(async function() {
 // Feature-detect
 if (self.registration.navigationPreload) {
   // Enable navigation preloads!
   await self.registration.navigationPreload.enable();
 }
   }());
 });
 }}}

 Gives the following error when the page is cached by the service worker
 and you F5 it attempts to preload and then cancels when the service worker
 boots up:


 {{{
 "C:\Program Files\JetBrains\PyCharm 2018.2.4\bin\runnerw.exe"
 C:\Users\Will\AppData\Local\Programs\Python\Python37-32\python.exe
 C:/Users/Will/PycharmProjects/lolnames.gg/manage.py runserver 8000
 Performing system checks...

 System check identified no issues (0 silenced).
 October 21, 2018 - 12:21:51
 Django version 2.1.2, using settings 'lolnamesgg.settings'
 Starting development server at http://127.0.0.1:8000/
 Quit the server with CTRL-BREAK.
 [21/Oct/2018 12:21:56] "GET /en/ HTTP/1.1" 200 11402
 Traceback (most recent call last):
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 138, in run
 self.finish_response()
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 180, in finish_response
 self.write(data)
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 274, in write
 self.send_headers()
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 332, in send_headers
 self.send_preamble()
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 255, in send_preamble
 ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 453, in _write
 result = self.stdout.write(data)
   File
 "C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py",
 line 796, in write
 self._sock.sendall(b)
 ConnectionAbortedError: [WinError 10053] An established connection was
 aborted by the software in your host machine
 [21/Oct/2018 12:21:56] "GET /en/ HTTP/1.1" 500 59
 
 Exception happened during processing of request from ('127.0.0.1', 51128)
 Traceback (most recent call last):
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 138, in run
 self.finish_response()
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 180, in finish_response
 self.write(data)
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 274, in write
 self.send_headers()
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 332, in send_headers
 self.send_preamble()
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 255, in send_preamble
 ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 453, in _write
 result = self.stdout.write(data)
   File
 "C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py",
 line 796, in write
 self._sock.sendall(b)
 ConnectionAbortedError: [WinError 10053] An established connection was
 aborted by the software in your host machine

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 141, in run
 self.handle_error()
   File "C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\site-
 packages\django\core\servers\basehttp.py", line 86, in handle_error
 super().handle_error()
   File
 
"C:\Users\Will\AppData\Local\Programs\Python\Python37-32\lib\wsgiref\handlers.py",
 line 368, in handle_error
 

Re: [Django] #29871: Resetting primary key for a derived object does not work

2018-10-20 Thread Django
#29871: Resetting primary key for a derived object does not work
-+-
 Reporter:  Victor Porton|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 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
-+-
Changes (by Simon Charette):

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


Comment:

 I agree with Tim here.

 It feels like what you're after is `self.pk = None` as it will be alias
 for `self.item_ptr` for `Derived` instances and `self.uid` for `Item`
 instances.

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


Re: [Django] #29869: UUIDField.to_python() should convert int values

2018-10-20 Thread Django
#29869: UUIDField.to_python() should convert int values
-+-
 Reporter:  thenewguy|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 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:

 Accepting on the basis that I could see it being useful when migrating a
 project from sequence based to uuid primary keys.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.c7f003ed45c3de1385aa737af89059ec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29324: Change Settings to raise ImproperlyConfigured on SECRET_KEY; not initialization

2018-10-20 Thread Django
#29324: Change Settings to raise ImproperlyConfigured on SECRET_KEY; not
initialization
--+
 Reporter:  Jon Dufresne  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (Other)  |  Version:  2.1
 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


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


Re: [Django] #29864: Add links from the cache framework topic guide to the low level API

2018-10-20 Thread Django
#29864: Add links from the cache framework topic guide to the low level API
-+-
 Reporter:  Thomas Güttler   |Owner:
 Type:   |  Prabakaran Kumaresshan
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  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:  1|UI/UX:  0
-+-

Comment (by Tim Graham):

 I'm not sure. I guess I accepted the ticket prematurely. We could possibly
 do something like this:

 {{{ #!diff
 diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt
 index 2ffad67686..bf6cfc2ddf 100644
 --- a/docs/topics/cache.txt
 +++ b/docs/topics/cache.txt
 @@ -788,9 +788,16 @@ Accessing the cache
  Basic usage
  ---

 -The basic interface is ``set(key, value, timeout)`` and ``get(key)``::
 +.. currentmodule:: django.core.caches
 +
 +The basic interface is:
 +
 +.. method:: cache.set(key, value, timeout)

  >>> cache.set('my_key', 'hello, world!', 30)
 +
 +.. method:: cache.get(key)
 +
  >>> cache.get('my_key')
  'hello, world!'
 }}}
 or create a separate reference document if it's useful. Maybe the ticket
 reporter can elaborate as "the first cache.get() and cache.set()
 occurrences" seem to be in the "low-level cache API" section.

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


Re: [Django] #29870: Add DurationField introspection for Oracle and PostgreSQL (was: Add DurationField introspection for Oracle and PostgreSQL databases.)

2018-10-20 Thread Django
#29870: Add DurationField introspection for Oracle and PostgreSQL
-+-
 Reporter:  felixxm  |Owner:  felixxm
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 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
-+-
Changes (by Tim Graham):

 * stage:  Unreviewed => 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/065.4dee277949b3cadd521fb59c5462af66%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29871: Resetting primary key for a derived object does not work

2018-10-20 Thread Django
#29871: Resetting primary key for a derived object does not work
-+-
 Reporter:  Victor Porton|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 I'm not sure if this is a bug. The test passes after adding `self.item_ptr
 = None` to `Item.reset()`. Is that the behavior you're looking for?

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


Re: [Django] #29869: UUIDField.to_python() should convert int values

2018-10-20 Thread Django
#29869: UUIDField.to_python() should convert int values
-+-
 Reporter:  thenewguy|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by thenewguy):

 uuid.UUID(int=value) worked for me but I haven't tested any cases yet

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


Re: [Django] #29869: UUIDField.to_python() should convert int values (was: UUIDField to_python should convert int values)

2018-10-20 Thread Django
#29869: UUIDField.to_python() should convert int values
-+-
 Reporter:  thenewguy|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * component:  Uncategorized => Database layer (models, ORM)
 * type:  Uncategorized => Cleanup/optimization


Comment:

 How would the conversion work?

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


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

2018-10-20 Thread Django
#29721: Migrations are not applied atomically
+--
 Reporter:  Gavin Wahl  |Owner:  Sanyam Khurana
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  2.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  1   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by Simon Charette):

 * needs_tests:  0 => 1
 * stage:  Ready for checkin => Accepted


Comment:

 Removing the RFC status as a test for backends supporting transactional
 DDL can probably be 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/067.d70e22518a69bb15c9b1629b4ad3a25d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2018-10-20 Thread Django
#29721: Migrations are not applied atomically
+-
 Reporter:  Gavin Wahl  |Owner:  Sanyam Khurana
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  2.1
 Severity:  Normal  |   Resolution:
 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
+-
Changes (by Simon Charette):

 * has_patch:  0 => 1
 * stage:  Accepted => Ready for checkin


Comment:

 Given the difficulty of adding a test that isn't highly implementation
 specific and how the new implementation is technically more correct I
 consider this patch RFC.

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


Re: [Django] #13871: contrib.admin:list_editable - ForeignKey performance is O(m*n)

2018-10-20 Thread Django
#13871: contrib.admin:list_editable - ForeignKey performance is O(m*n)
-+-
 Reporter:  chadc|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  list_editable,   | Triage Stage:  Accepted
  admin, ForeignKey, admin   |
  efficiency |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin):

 Using "autocomplete_fields" brings complexity down from O(m * n) to O(n).
 It still makes n database queries, but these queries return only 1 row
 instead of m.

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


Re: [Django] #29868: Database constraint checks are not retained on sqlite

2018-10-20 Thread Django
#29868: Database constraint checks are not retained on sqlite
-+-
 Reporter:  Scott Stevens|Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  check constraint | Triage Stage:  Accepted
  sqlite |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/10539

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


Re: [Django] #29871: Resetting primary key for a derived object does not work

2018-10-20 Thread Django
#29871: Resetting primary key for a derived object does not work
-+-
 Reporter:  Victor Porton|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Victor Porton):

 * Attachment "bug.tar.gz" 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/065.e52250819989cac85a1f734b1bde39a0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29871: Resetting primary key for a derived object does not work

2018-10-20 Thread Django
#29871: Resetting primary key for a derived object does not work
-+-
   Reporter:  Victor |  Owner:  nobody
  Porton |
   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  |
-+-
 In the attached example code setting the primary key to `None` does not
 work (so that the existing object is overwritten on `save()`).

 The most important code fragments of the bug example:

 {{{
 from django.db import models

 class Item(models.Model):
 # uid = models.UUIDField(primary_key=True, default=uuid.uuid4,
 editable=False)
 uid = models.AutoField(primary_key=True, editable=False)

 f = models.BooleanField(default=False)

 def reset(self):
 self.uid = None
 self.f = False

 class Derived(Item):
 pass
 }}}

 {{{
 class SaveTestCase(TestCase):
 def setUp(self):
 self.derived = Derived.objects.create(f=True)  # create the first
 object
 item = Item.objects.get(pk=self.derived.pk)
 obj1 = item.derived
 obj1.reset()
 obj1.save()  # the first object is overwritten

 def test_f_true(self):
 obj = Item.objects.get(pk=self.derived.pk)
 self.assertTrue(obj.f)
 }}}

 Django 2.1.2

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.e70d967ab3e00e08c69fb8d8b611f91a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29868: Database constraint checks are not retained on sqlite (was: Database Check Constraints Not Retained (Only Last Is Stored))

2018-10-20 Thread Django
#29868: Database constraint checks are not retained on sqlite
-+-
 Reporter:  Scott Stevens|Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  check constraint | Triage Stage:  Accepted
  sqlite |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * keywords:  check constraint => check constraint sqlite


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


Re: [Django] #29868: Database Check Constraints Not Retained (Only Last Is Stored)

2018-10-20 Thread Django
#29868: Database Check Constraints Not Retained (Only Last Is Stored)
-+-
 Reporter:  Scott Stevens|Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  check constraint | 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):

 * status:  new => assigned
 * owner:  nobody => Simon Charette
 * stage:  Unreviewed => Accepted


Comment:

 Thank you for your extra details. I confirmed the issue only affects
 SQLite and is due to how we have to remake the table on this backend.
 Currently working on a patch.

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


Re: [Django] #27595: Database converters are not run for related fields referencing related fields

2018-10-20 Thread Django
#27595: Database converters are not run for related fields referencing related
fields
-+-
 Reporter:  oyooyo   |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 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 Simon Charette):

 A minimal reproduction test as of 084573c7156530047bec2c19e732423fa9d0ec13
 is

 {{{
 diff --git a/tests/model_fields/test_uuid.py
 b/tests/model_fields/test_uuid.py
 index bc1c8d5bc0..6b6af3ea7e 100644
 --- a/tests/model_fields/test_uuid.py
 +++ b/tests/model_fields/test_uuid.py
 @@ -170,8 +170,12 @@ class TestAsPrimaryKey(TestCase):
  self.assertEqual(r.uuid_fk, u2)

  def test_two_level_foreign_keys(self):
 +gc = UUIDGrandchild()
  # exercises ForeignKey.get_db_prep_value()
 -UUIDGrandchild().save()
 +gc.save()
 +gc.refresh_from_db()
 +self.assertIsInstance(gc.uuidchild_ptr_id, uuid.UUID)
 }}}

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


Re: [Django] #29864: Add links from the cache framework topic guide to the low level API

2018-10-20 Thread Django
#29864: Add links from the cache framework topic guide to the low level API
-+-
 Reporter:  Thomas Güttler   |Owner:
 Type:   |  Prabakaran Kumaresshan
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  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:  1|UI/UX:  0
-+-

Comment (by Prabakaran Kumaresshan):

 I'm just wondering where does the low level document for get and set
 methods are available, there isn't any document on cache other than the
 topic on cache. Or is it the documentation of respective backends ?

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


Re: [Django] #12990: Add JSONField model field

2018-10-20 Thread Django
#12990: Add JSONField model field
-+-
 Reporter:  paltman  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 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 felixxm):

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


Re: [Django] #29864: Add links from the cache framework topic guide to the low level API

2018-10-20 Thread Django
#29864: Add links from the cache framework topic guide to the low level API
-+-
 Reporter:  Thomas Güttler   |Owner:
 Type:   |  Prabakaran Kumaresshan
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  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:  1|UI/UX:  0
-+-
Changes (by Prabakaran Kumaresshan):

 * owner:  (none) => Prabakaran Kumaresshan
 * status:  new => assigned


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.bf32c89463b642272ff8c9be05fa1853%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29868: Database Check Constraints Not Retained (Only Last Is Stored)

2018-10-20 Thread Django
#29868: Database Check Constraints Not Retained (Only Last Is Stored)
-+-
 Reporter:  Scott Stevens|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  check constraint | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Scott Stevens):

 Here's my `models.py` (everything else is a default `django-admin
 startproject djangoproject .` followed by `./manage.py startapp example`,
 with `'example'` added to `INSTALLED_APPS`):


 {{{

 from django.db import models
 from django.db.models import Q
 from django.core.validators import MinValueValidator


 CHOICES = [
 (0, 'A'),
 (1, 'B'),
 (2, 'C'),
 ]


 class ExampleModel(models.Model):
 # Auto PK
 # No constraint generated by MinValueValidator, so I add my own.
 counter =
 models.PositiveIntegerField(validators=[MinValueValidator(1)])
 dropdown = models.PositiveSmallIntegerField(choices=CHOICES)

 class Meta:
 constraints = [
 models.CheckConstraint(
 check=Q(counter__gt=0), name="counter_bounds"),

 models.CheckConstraint(
 check=Q(dropdown__in=[choice[0] for choice in CHOICES]),
 name="dropdown_choices"),
 ]

 }}}

 Here's the result of `./manage.py sqlmigrate example 0001`:

 {{{

 BEGIN;
 --
 -- Create model ExampleModel
 --
 CREATE TABLE "example_examplemodel" ("id" integer NOT NULL PRIMARY KEY
 AUTOINCREMENT, "counter" integer unsigned NOT NULL CHECK ("counter" >= 0),
 "dropdown" smallint unsigned NOT NULL CHECK ("dropdown" >= 0));
 --
 -- Create constraint counter_bounds on model examplemodel
 --
 ALTER TABLE "example_examplemodel" RENAME TO "example_examplemodel__old";
 CREATE TABLE "example_examplemodel" ("id" integer NOT NULL PRIMARY KEY
 AUTOINCREMENT, "counter" integer unsigned NOT NULL CHECK ("counter" >= 0),
 "dropdown" smallint unsigned NOT NULL CHECK ("dropdown" >= 0), CONSTRAINT
 "counter_bounds" CHECK ("counter" > 0));
 INSERT INTO "example_examplemodel" ("id", "counter", "dropdown") SELECT
 "id", "counter", "dropdown" FROM "example_examplemodel__old";
 DROP TABLE "example_examplemodel__old";
 --
 -- Create constraint dropdown_choices on model examplemodel
 --
 ALTER TABLE "example_examplemodel" RENAME TO "example_examplemodel__old";
 CREATE TABLE "example_examplemodel" ("id" integer NOT NULL PRIMARY KEY
 AUTOINCREMENT, "counter" integer unsigned NOT NULL CHECK ("counter" >= 0),
 "dropdown" smallint unsigned NOT NULL CHECK ("dropdown" >= 0), CONSTRAINT
 "dropdown_choices" CHECK ("dropdown" IN (0, 1, 2)));
 INSERT INTO "example_examplemodel" ("id", "counter", "dropdown") SELECT
 "id", "counter", "dropdown" FROM "example_examplemodel__old";
 DROP TABLE "example_examplemodel__old";
 COMMIT;

 }}}

 I can then (using the shell) save an object `ExampleModel(counter=0,
 dropdown=2)`, but not `ExampleModel(counter=1, dropdown=3)`.

 Notably, all constraints are included when I am altering fields on the
 table after the initial migration, so it seems that adding constraints
 simply doesn't keep track of previous constraints to include on the
 `CREATE TABLE` query.

 This example was reproduced with commit
 19126339f307e589f99259ab0176c4367a8055f0.

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


Re: [Django] #29865: Add XOR for use in Q Queries

2018-10-20 Thread Django
#29865: Add XOR for use in Q Queries
-+-
 Reporter:  Griffith Rees|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  xor  | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Marten Kenbeek):

 To be clear, you're talking about logical `XOR`, and not bitwise `XOR`?

 You linked to PostgreSQL's bitwise `XOR` operator, `#`. At the moment it
 does not have a logical `XOR` operator. The only
 [https://www.postgresql.org/docs/current/static/functions-logical.html
 logical operators] it supports are `AND`, `OR` and `NOT`.

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


Re: [Django] #29865: Add XOR for use in Q Queries

2018-10-20 Thread Django
#29865: Add XOR for use in Q Queries
-+-
 Reporter:  Griffith Rees|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  xor  | 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 felixxm):

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


Re: [Django] #29865: Add XOR for use in Q Queries

2018-10-20 Thread Django
#29865: Add XOR for use in Q Queries
-+-
 Reporter:  Griffith Rees|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  xor  | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by felixxm):

 `XOR` is not officially supported on Oracle (see
 [https://docs.oracle.com/database/121/SQLRF/functions002.htm#SQLRF51178
 doc]) you pointed to the old MySQL 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/063.7edef6e4c2300865c15441a12465f4f0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29712: Add warning in makemessages command if the localecode with `l` flag is not correct

2018-10-20 Thread Django
#29712: Add warning in makemessages command if the localecode with `l` flag is 
not
correct
-+-
 Reporter:  Sanyam Khurana   |Owner:  Vishvajit
 Type:   |  Pathak
  Cleanup/optimization   |   Status:  assigned
Component:   |  Version:  master
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Vishvajit Pathak):

 Hi Sanyam,

 Yes, I am working on this ticket but your help would be very appreciated.

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