Re: [Django] #32206: Incorrect migration generated if field has been renamed when it has verbose_name set

2020-11-18 Thread Django
#32206: Incorrect migration generated if field has been renamed when it has
verbose_name set
-+-
 Reporter:  Peter Inglesby   |Owner:  Hasan
 Type:   |  Ramezani
  Cleanup/optimization   |   Status:  assigned
Component:  Migrations   |  Version:  3.1
 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 Mariusz Felisiak):

 * type:  Bug => Cleanup/optimization


Comment:

 Replying to [comment:3 Simon Charette]:
 > It feels like it's more of an optimization than a bug though as this
 behaviour is due to the initial design decision that the migration
 framework should not hold an allow list of attributes that affect database
 state or not. The same ''problem'' is present when altering `validators`
 for example.

 Yes it's not a bug, maybe a cleanup, but I'm not sure about changing the
 current behavior. There are multiple attributes that don't affect database
 state, see
 
[https://github.com/django/django/blob/9f72b0970db4be76d14bd7be5a21582d2cc484bc/django/db/backends/base/schema.py#L1061-L1088
 BaseDatabaseSchemaEditor._field_should_be_altered()], but we cannot
 guarantee this for 3rd-party backends. I would close this as wontfix and
 keep the current flow, so if you want to rename a field and change its
 non-database attributes you need to do this in two steps:
 - rename field (`RenameField`),
 - change attributes (`AlterField`, which is a noop operation for such
 attributes, see #25253 and #31826).

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.bbef5b3d8edaca36fb9c83d4d90e921b%40djangoproject.com.


Re: [Django] #32202: django-admin runserver and get_child_arguments() crashes on Windows and Python < 3.8.

2020-11-18 Thread Django
#32202: django-admin runserver and get_child_arguments() crashes on Windows and
Python < 3.8.
-+-
 Reporter:  andrey-zotov |Owner:  Carlton
 |  Gibson
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  3.1
  commands)  |
 Severity:  Release blocker  |   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 Mariusz Felisiak):

 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.9d281580113380e1312e74ac8ab27953%40djangoproject.com.


Re: [Django] #32200: Aggregating when grouping on an ExpressionWrapper omits the expression from the group by

2020-11-18 Thread Django
#32200: Aggregating when grouping on an ExpressionWrapper omits the expression 
from
the group by
-+-
 Reporter:  Gordon Wrigley   |Owner:  Hasan
 |  Ramezani
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1
 * needs_docs:  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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.18a5d31294040981001758e6b2b328d2%40djangoproject.com.


Re: [Django] #32201: remove obsolete isort:skip's

2020-11-18 Thread Django
#32201: remove obsolete isort:skip's
-+-
 Reporter:  Tim Graham   |Owner:  Seamus
 Type:   |  Quinn
  Cleanup/optimization   |   Status:  closed
Component:  Core (Other) |  Version:  master
 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:  1|UI/UX:  0
-+-
Changes (by GitHub ):

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


Comment:

 In [changeset:"9f72b0970db4be76d14bd7be5a21582d2cc484bc" 9f72b09]:
 {{{
 #!CommitTicketReference repository=""
 revision="9f72b0970db4be76d14bd7be5a21582d2cc484bc"
 Fixed #32201 -- Removed obsolete isort:skip's.

 Obsolete as of isort 5.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.22bc27ad8322fc10668a2c88dc627630%40djangoproject.com.


Re: [Django] #32191: Not RFC 6265 compliant cookies in contrib.messages.

2020-11-18 Thread Django
#32191: Not RFC 6265 compliant cookies in contrib.messages.
--+---
 Reporter:  Nico Giefing  |Owner:  Craig Smith
 Type:  Bug   |   Status:  assigned
Component:  contrib.messages  |  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:  Cookie malformed  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+---

Comment (by Collin Anderson):

 Hi All,

 I figure I should probably give some historical context about cookie
 quoting for the record. It mostly matches the analysis so far on the
 ticket:

 When I refactored `request.COOKIE` (`parse_cookie()`) back in 2016, I was
 surprised that the cookie RFCs don't accurately describe how browsers
 work. I had to test browers myself to figure stuff out. The RFCs gave no
 guidance as to how to encode cookies, so there's really no official
 standard for how to encode/decode, and in that respect leaving it up to
 the application itself to do the encoding could make sense from a Django
 perspective. I did also notice that using % url quoting was what a lot of
 frameworks were using for encoding, so that is becoming more and more of
 an ad-hoc standard, despite not being in the RFC. (Percent encoding makes
 it really easy to encode/decode in Javascript.).

 In 2016 I decided not to touch this encoding issue because I wanted to
 minimize backwards-compatible issues, so I kept using Python's
 `http.cookies._unquote()` (slash encoding) for backwards compatibility.
 (Again, browsers don't automatically unquote anything in cookies, so it's
 not a browser-compatibility thing)

 I think long-term it would be great to stop encoding cookies using
 `http.cookies. _quote()`, as I think it's really just a python-specific
 way of quoting cookies, and as this issue states, it ends up creating
 invalid cookies. (invalid according the RFC at least. Browsers don't care
 and they work fine with many of what the RFC considers invalid
 characters.)

 Part of me thinks it would be nice if Django continued to handle cookie
 encoding automatically and switch to % encoding, but I think that's going
 to lead to double encoding/decoding in some cases with the current api.
 Maybe we could have a response.set_cookie('name', 'value',
 encode=True/False) to control whether Django applies % encoding or not?
 We'd probably also need to have request.cookies.get('name',
 decode=True/False).

 Anyway, I think the safest and most minimal thing to do is to modify the
 messages framework to % url quote cookies as PR 13690 suggests. I don't
 have a clear picture for a more general framework-wide fix, but I at least
 wanted to write my story down somewhere in case it's helpful.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.d30a070066311823a248e06f4677a551%40djangoproject.com.


Re: [Django] #32201: remove obsolete isort:skip's

2020-11-18 Thread Django
#32201: remove obsolete isort:skip's
-+-
 Reporter:  Tim Graham   |Owner:  Seamus
 Type:   |  Quinn
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Other) |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


Comment:

 [https://github.com/django/django/pull/13687 PR]

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

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


Re: [Django] #32206: Incorrect migration generated if field has been renamed when it has verbose_name set

2020-11-18 Thread Django
#32206: Incorrect migration generated if field has been renamed when it has
verbose_name set
+--
 Reporter:  Peter Inglesby  |Owner:  Hasan Ramezani
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  3.1
 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 Hasan Ramezani):

 * owner:  nobody => Hasan Ramezani
 * status:  new => assigned
 * has_patch:  0 => 1


Comment:

 Thanks, Simon for the proposed solution to fix the problem.
 I just thought maybe we can remove `verbose_name` from `old_field_dec` and
 `field_dec` and then compare them.
 I don't know this is the right approach or 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.cb46d9dd98cc1a5851a69b1f9a87dfdc%40djangoproject.com.


Re: [Django] #32206: Incorrect migration generated if field has been renamed when it has verbose_name set

2020-11-18 Thread Django
#32206: Incorrect migration generated if field has been renamed when it has
verbose_name set
+
 Reporter:  Peter Inglesby  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  3.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by Simon Charette):

 It feels like it's more of an optimization than a bug though as this
 behaviour is due to the initial design decision that the migration
 framework should not hold an allow list of attributes that affect database
 state or not. The same ''problem'' is present when altering `validators`
 for example.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.6a1b7322c1730684bb167f8314bc4a2a%40djangoproject.com.


Re: [Django] #31309: Django admin site needs X-UA-Compatible meta tag to prevent IE rendering the page poorly in compatibility mode.

2020-11-18 Thread Django
#31309: Django admin site needs X-UA-Compatible meta tag to prevent IE rendering
the page poorly in compatibility mode.
---+--
 Reporter:  Petter Strandmark  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  contrib.admin  |  Version:  3.0
 Severity:  Normal |   Resolution:  needsinfo
 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 Carsten Fuchs):

 * cc: Carsten Fuchs (added)


Comment:

 To my understanding, the IE can be set, per policy, to render all intranet
 pages in "compatibility mode" (IE7?), which seems to cause problems with
 modern CSS.
 In my tests,
 {{{
 
 }}}
 fixes the problem.
 https://stackoverflow.com/questions/6771258/what-does-meta-http-equiv-x
 -ua-compatible-content-ie-edge-do has a lot of information about this.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.06708dd1e42f4f5208a73836129731cb%40djangoproject.com.


Re: [Django] #32206: Incorrect migration generated if field has been renamed when it has verbose_name set

2020-11-18 Thread Django
#32206: Incorrect migration generated if field has been renamed when it has
verbose_name set
+
 Reporter:  Peter Inglesby  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  3.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by Simon Charette):

 Detection of field renames happens in the auto-detector's
 `generate_renamed_fields` method

 
https://github.com/django/django/blob/4a412c2e659f9295973434c65b785b03acee7251/django/db/migrations/autodetector.py#L837-L841

 I guess it could be adjusted to ignore `verbose_name` when comparing
 fields like we do with `db_column` by storing `old_field_verbose_name =
 old_field.verbose_name` and setting `verbose_name=old_field_verbose_name`
 in the comparison against `field_dec[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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0cf8c00e9d5e900b46cecb9a925e4881%40djangoproject.com.


Re: [Django] #32207: Slug field is accepting whitespace when entered through Django shell.

2020-11-18 Thread Django
#32207: Slug field is accepting whitespace when entered through Django shell.
-+-
 Reporter:  Harshvardhan Anand   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  slug; prepopulated;  | Triage Stage:
  error reporting; sqlite|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz):

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


Comment:

 This is expected behavior. The `SlugField` functionality is implemented
 though validation, which is activated by the forms infrastructure or by
 manually calling `full_clean()` on some model. If you set a value and
 save, you are on your own, there are no database-level checks. You can see
 the exact same behaviour for other fields like `URLField`.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/076.5e616c9eae8e6c6c36571f5ad2b07f50%40djangoproject.com.


Re: [Django] #32207: Slug field is accepting whitespace when entered through Django shell.

2020-11-18 Thread Django
#32207: Slug field is accepting whitespace when entered through Django shell.
-+-
 Reporter:  Harshvardhan Anand   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  slug; prepopulated;  | Triage Stage:
  error reporting; sqlite|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Harshvardhan Anand):

 * Attachment "db.png" 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/076.d4f75aefe721bd310082e71c52dac18a%40djangoproject.com.


[Django] #32207: Slug field is accepting whitespace when entered through Django shell.

2020-11-18 Thread Django
#32207: Slug field is accepting whitespace when entered through Django shell.
-+-
   Reporter: |  Owner:  nobody
  Harshvardhan Anand |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  3.1
  layer (models, ORM)|   Keywords:  slug; prepopulated;
   Severity:  Normal |  error reporting; sqlite
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I am using **Django 3.1.3** with **Python 3.7.6**.

 1. Slug field is **accepting whitespaces** when updated from Django shell.
 2. Slug field is **not prepopulated** if data(like title) is entered from
 Django shell.

 But if slug is entered with whitespaces from admin panel then it will
 raise error. And similarly if we create data(e.g. - title) from admin
 panel slug field is prepopulated.

 [https://bit.ly/2Km19CX  I have also created a video(saved in google
 drive) explaining the issue.]

 **In the image below, you can see the slug field with whitespaces -**

 [[Image(https://bit.ly/35FB7Te)]]

 **The model I have defined in models.py is**

 {{{
 class Post(models.Model):
 STATUS_CHOICES = (
 ('draft', 'Draft'),
 ('published', 'Published')
 )

 title = models.CharField(max_length=250)
 slug = models.SlugField(max_length=250, unique_for_date='publish')
 author = models.ForeignKey(User, on_delete=models.CASCADE,
 related_name='blog_post')
 body = models.TextField()
 publish = models.DateTimeField(default=timezone.now)
 created = models.DateTimeField(auto_now_add=True)
 updated = models.DateTimeField(auto_now=True)
 status = models.CharField(max_length=10, choices=STATUS_CHOICES,
 default='draft')

 class Meta:
 ordering = ('-publish',)

 def __str__(self):
 return self.title
 }}}


 **Modified admin panel -**

 {{{
 @admin.register(Post)
 class PostAdmin(admin.ModelAdmin):
 list_display = ('title', 'slug', 'author', 'publish', 'status')
 list_filter = ('status', 'created', 'publish', 'author')
 search_fields = ('title', 'body')
 prepopulated_fields = {'slug':('title',)}
 raw_id_fields = ('author',)
 date_hierarchy = 'publish'
 ordering = ('status', 'publish')
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.5dc7243aeca6d2cabdba78207af0b416%40djangoproject.com.


Re: [Django] #32204: Quick Filter for the Admin Sidebar

2020-11-18 Thread Django
#32204: Quick Filter for the Admin Sidebar
-+--
 Reporter:  Maxim Milovanov  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+--

Comment (by Maxim Milovanov):

 This is a rough prototype of the feature
 [https://gist.github.com/MilovanovM/84ffbbec02391c1ba1771a3a6aee5797]

 Replying to [comment:1 Carlton Gibson]:
 > Hey Maxim. I think a prototype here would involve overriding the the app
 list template and adding an extra JS file, yes? Can I ask you to put a
 demo of that somewhere (GitHub say) and approach the DevelopersMailingList
 to canvas opinions? (It's not something I want to just make a decision on
 without consultation here.) Thanks.

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

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


Re: [Django] #10227: Support a related_default on OneToOne fields

2020-11-18 Thread Django
#10227: Support a related_default on OneToOne fields
-+-
 Reporter:  rvdrijst |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  onetoone related | Triage Stage:  Accepted
  expection null |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Peter Thomassen):

 * cc: Peter Thomassen (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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.f9493b80c83dcb6e29970bb479c8040f%40djangoproject.com.


Re: [Django] #31639: F() and OuterRef() objects do not error when referencing transforms.

2020-11-18 Thread Django
#31639: F() and OuterRef() objects do not error when referencing transforms.
-+-
 Reporter:  Baptiste Mispelon|Owner:  Srinivas
 |  Reddy Thatiparthy
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (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 Ian Foote):

 * has_patch:  0 => 1


Comment:

 While fixing #25534, I've implemented support for transforms in
 expressions, fixing this too. https://github.com/django/django/pull/13685

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.03ee6ad13219366988435ce266b2dfdd%40djangoproject.com.


Re: [Django] #25534: Allow using lookups in aggregates.

2020-11-18 Thread Django
#25534: Allow using lookups in aggregates.
-+-
 Reporter:  Raúl Pedro Santos|Owner:  Ian Foote
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (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 Ian Foote):

 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.2710fefa9cddac4e076601e47fc82a0b%40djangoproject.com.


Re: [Django] #32206: Incorrect migration generated if field has been renamed when it has verbose_name set (was: Django cannot detect that a field has been renamed if it has verbose_name set)

2020-11-18 Thread Django
#32206: Incorrect migration generated if field has been renamed when it has
verbose_name set
+
 Reporter:  Peter Inglesby  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  3.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by Carlton Gibson):

 * type:  Uncategorized => Bug
 * component:  Uncategorized => Migrations
 * stage:  Unreviewed => Accepted


Comment:

 Hi Peter. Nice example. Yes, that does seem curious. I can confirm the
 behavior. Didn't look into why it happens as 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.20c7a94f5fda89159f4789d3df83c5e2%40djangoproject.com.


Re: [Django] #32205: ORM migrations after squash, command sqlmigrate will be error

2020-11-18 Thread Django
#32205: ORM migrations after squash, command sqlmigrate will be error
-+-
 Reporter:  老广 |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |   Resolution:
 Severity:  Normal   |  worksforme
 Keywords:  sqlmigrate   | 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:   => worksforme


Comment:

 Hi. Thanks for the report. — I can't reproduce this from the given info.

 Steps taken:

 * Create new venv with Django 2.2.17
 * Create new project with simple model.
 * Add fields, creating new migrations.
 * Squash migrations
 * Update to Django 3.1.3.
 * Adjust model, create new migration (from squashed migration).

 All worked as expected.

 It's not clear what's going on in your case. If you can reduce it to a
 minimal example showing an issue in Django we can look again. Sorry.
 Thanks.

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

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


Re: [Django] #32204: Quick Filter for the Admin Sidebar

2020-11-18 Thread Django
#32204: Quick Filter for the Admin Sidebar
-+--
 Reporter:  Maxim Milovanov  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+--
Changes (by Carlton Gibson):

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


Comment:

 Hey Maxim. I think a prototype here would involve overriding the the app
 list template and adding an extra JS file, yes? Can I ask you to put a
 demo of that somewhere (GitHub say) and approach the DevelopersMailingList
 to canvas opinions? (It's not something I want to just make a decision on
 without consultation here.) Thanks.

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

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


[Django] #32206: Django cannot detect that a field has been renamed if it has verbose_name set

2020-11-18 Thread Django
#32206: Django cannot detect that a field has been renamed if it has 
verbose_name
set
--+
   Reporter:  Peter Inglesby  |  Owner:  nobody
   Type:  Uncategorized   | Status:  new
  Component:  Uncategorized   |Version:  3.1
   Severity:  Normal  |   Keywords:
   Triage Stage:  Unreviewed  |  Has patch:  0
Needs documentation:  0   |Needs tests:  0
Patch needs improvement:  0   |  Easy pickings:  0
  UI/UX:  0   |
--+
 If you start with following model:


 {{{
 class Thing(models.Model):
 name = models.CharField(max_length=100, default="xxx",
 verbose_name="name")
 }}}

 and change it to:


 {{{
 class Thing(models.Model):
 label = models.CharField(max_length=100, default="xxx",
 verbose_name="name")
 }}}

 Django asks:


 {{{
 Did you rename thing.name to thing.label (a CharField)? [y/N] y
 }}}

 and if you say yes, it creates a migration with:


 {{{
 operations = [
 migrations.RenameField(
 model_name='thing',
 old_name='name',
 new_name='label',
 ),
 ]
 }}}

 But if you change it to:


 {{{
 class thing(models.model):
 label = models.CharField(max_length=100, default="xxx",
 verbose_name="label")
 }}}


 if creates a migration with:


 {{{
 operations = [
 migrations.RemoveField(
 model_name='thing',
 name='name',
 ),
 migrations.AddField(
 model_name='thing',
 name='label',
 field=models.CharField(default='xxx', max_length=100,
 verbose_name='label'),
 ),
 ]
 }}}


 If you were to run this migration without thinking, you would risk losing
 data.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.628302696650fa6967d8cdf9ca553b95%40djangoproject.com.


Re: [Django] #32203: Error with values with JSON path lookup in Sqlite when value is numeric.

2020-11-18 Thread Django
#32203: Error with values with JSON path lookup in Sqlite when value is numeric.
-+-
 Reporter:  Gordon Wrigley   |Owner:  sage
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * severity:  Normal => Release blocker


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0bec1134e52513a87f36443578081b41%40djangoproject.com.


Re: [Django] #32205: ORM migrations after squash, command sqlmigrate will be error

2020-11-18 Thread Django
#32205: ORM migrations after squash, command sqlmigrate will be error
-+-
 Reporter:  老广 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  sqlmigrate   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by 老广):

 * type:  Uncategorized => Bug


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

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


[Django] #32205: ORM migrations after squash, command sqlmigrate will be error

2020-11-18 Thread Django
#32205: ORM migrations after squash, command sqlmigrate will be error
-+-
   Reporter:  老广   |  Owner:  nobody
   Type: | Status:  new
  Uncategorized  |
  Component:  Database   |Version:  3.1
  layer (models, ORM)|
   Severity:  Normal |   Keywords:  sqlmigrate
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 After upgrade django 2.2 to 3.1, If migrations was squashed, then
 sqlmigrate cause error. If back to 2.2, error lost.

 The migrate file error refer is in squash file.


 **Error stack**

 {{{
   File "/Users/guang/vm/py/py36/lib/python3.6/site-
 packages/django/core/management/commands/sqlmigrate.py", line 37, in
 handle
 loader = MigrationLoader(connection, replace_migrations=False)
   File "/Users/guang/vm/py/py36/lib/python3.6/site-
 packages/django/db/migrations/loader.py", line 53, in __init__
 self.build_graph()
   File "/Users/guang/vm/py/py36/lib/python3.6/site-
 packages/django/db/migrations/loader.py", line 255, in build_graph
 self.graph.validate_consistency()
   File "/Users/guang/vm/py/py36/lib/python3.6/site-
 packages/django/db/migrations/graph.py", line 195, in validate_consistency
 [n.raise_error() for n in self.node_map.values() if isinstance(n,
 DummyNode)]
   File "/Users/guang/vm/py/py36/lib/python3.6/site-
 packages/django/db/migrations/graph.py", line 195, in 
 [n.raise_error() for n in self.node_map.values() if isinstance(n,
 DummyNode)]
   File "/Users/guang/vm/py/py36/lib/python3.6/site-
 packages/django/db/migrations/graph.py", line 58, in raise_error
 raise NodeNotFoundError(self.error_message, self.key,
 origin=self.origin)
 django.db.migrations.exceptions.NodeNotFoundError: Migration
 assets.0020_auto_20180816_1652 dependencies reference nonexistent parent
 node ('assets', '0019_auto_20180816_1320')
 }}}


 **Migrations**

 source code:
 
https://github.com/jumpserver/jumpserver/blob/master/apps/assets/migrations/0020_auto_20180816_1652.py

 {{{
 # Generated by Django 2.0.7 on 2018-08-16 08:52

 from django.db import migrations, models


 class Migration(migrations.Migration):

 dependencies = [
 ('assets', '0019_auto_20180816_1320'),
 ]

 operations = [
 migrations.AlterField(
 model_name='adminuser',
 name='org_id',
 field=models.CharField(blank=True, db_index=True, default='',
 max_length=36, verbose_name='Organization'),
 ),
 }}}


 The squash migrations:

 source code:
 
https://github.com/jumpserver/jumpserver/blob/master/apps/assets/migrations/0010_auto_20180307_1749_squashed_0019_auto_20180816_1320.py

 {{{
 class Migration(migrations.Migration):

 replaces = [('assets', '0010_auto_20180307_1749'), ('assets',
 '0011_auto_20180326_0957'), ('assets', '0012_auto_20180404_1302'),
 ('assets', '0013_auto_20180411_1135'), ('assets',
 '0014_auto_20180427_1245'), ('assets', '0015_auto_20180510_1235'),
 ('assets', '0016_auto_20180511_1203'), ('assets',
 '0017_auto_20180702_1415'), ('assets', '0018_auto_20180807_1116'),
 ('assets', '0019_auto_20180816_1320')]

 dependencies = [
 ('assets', '0009_auto_20180307_1212'),
 ]

 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.8e271a8f85933df95b402f93f23a0a3e%40djangoproject.com.


Re: [Django] #32202: django-admin runserver and get_child_arguments() crashes on Windows and Python < 3.8.

2020-11-18 Thread Django
#32202: django-admin runserver and get_child_arguments() crashes on Windows and
Python < 3.8.
-+-
 Reporter:  andrey-zotov |Owner:  Carlton
 |  Gibson
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  3.1
  commands)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/13693 PR]

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

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


Re: [Django] #32203: Error with values with JSON path lookup in Sqlite when value is numeric.

2020-11-18 Thread Django
#32203: Error with values with JSON path lookup in Sqlite when value is numeric.
-+-
 Reporter:  Gordon Wrigley   |Owner:  sage
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  3.1
  (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
-+-

Comment (by Gordon Wrigley):

 I should add that I see this on both Windows and Linux

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.4678061c7644ca5e33c8ab9c921562af%40djangoproject.com.


Re: [Django] #32204: Quick Filter for the Admin Sidebar

2020-11-18 Thread Django
#32204: Quick Filter for the Admin Sidebar
-+--
 Reporter:  Maxim Milovanov  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+--
Changes (by Maxim Milovanov):

 * Attachment "quick_filter_img.png" added.

 Quick Filter

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.686131f2060d7eaf8cf893b685bbef6d%40djangoproject.com.


Re: [Django] #32204: Quick Filter for the Admin Sidebar

2020-11-18 Thread Django
#32204: Quick Filter for the Admin Sidebar
-+--
 Reporter:  Maxim Milovanov  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+--
Changes (by Maxim Milovanov):

 * Attachment "quick_filter.m4v" added.

 Prototype of the "Quick Filter"

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.71f273feb457b3bb8221fd35699b2b62%40djangoproject.com.


[Django] #32204: Quick Filter for the Admin Sidebar

2020-11-18 Thread Django
#32204: Quick Filter for the Admin Sidebar
---+
   Reporter:  Maxim Milovanov  |  Owner:  nobody
   Type:  New feature  | Status:  new
  Component:  contrib.admin|Version:  3.1
   Severity:  Normal   |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  1|
---+
 It would be great to have an ability to filter the admin sections out in
 the sidebar, espesially when there is a lot of them.
 In general, it's just a textbox at the top of the sidebar. When a user
 starts typing, the sections list are being filtered out dynamically.
 See a prototype on the video attached.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.c08aedae5e6cb7d55ee8fcc5c9a78e27%40djangoproject.com.