Re: [Django] #32322: Incorrect wrapping of autocomplete cleaner on Chrome.

2021-01-05 Thread Django
#32322: Incorrect wrapping of autocomplete cleaner on Chrome.
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:  Ready for
  contrib.admin, widget  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
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/064.682926a6cd5ed377dcdcc46b2ac140ca%40djangoproject.com.


Re: [Django] #32322: Incorrect wrapping of autocomplete cleaner on Chrome. (was: Autocomplete widget options wrap issue in CSS)

2021-01-05 Thread Django
#32322: Incorrect wrapping of autocomplete cleaner on Chrome.
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:  Accepted
  contrib.admin, widget  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Mariusz Felisiak):

 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report, I was able to reproduce this issue but only on
 Chrome.

-- 
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.4a75f24fe58c3e38bb5cd961e3f4bdb1%40djangoproject.com.


Re: [Django] #32314: Allow autoreloading of `python -m pkg_other_than_django runserver`

2021-01-05 Thread Django
#32314: Allow autoreloading of `python -m pkg_other_than_django runserver`
-+-
 Reporter:  William Schwartz |Owner:  William
 Type:   |  Schwartz
  Cleanup/optimization   |   Status:  closed
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  runserver,   | Triage Stage:  Ready for
  autoreload, freezers   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

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


Comment:

 In [changeset:"ec6d2531c59466924b645f314ac33f54470d7ac3" ec6d253]:
 {{{
 #!CommitTicketReference repository=""
 revision="ec6d2531c59466924b645f314ac33f54470d7ac3"
 Fixed #32314 -- Fixed detection when started non-django modules with
 "python -m" in autoreloader.

 django.utils.autoreload.get_child_arguments() detected when Python was
 started with the `-m` option only for `django` module. This commit
 changes the logic to check __spec__, see
 https://docs.python.org/3/reference/import.html#main-spec

 Now packages can implement their own __main__ with the runserver
 command.
 }}}

-- 
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.ff1dbfa88465f0ff3447cb0e8249f0e1%40djangoproject.com.


Re: [Django] #32321: Add system checks for invalid model field names for functional indexes in Meta.indexes.

2021-01-05 Thread Django
#32321: Add system checks for invalid model field names for functional indexes 
in
Meta.indexes.
-+-
 Reporter:  Mariusz Felisiak |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => Someday/Maybe


Old description:

> The current system checks don't cover invalid models fields in functional
> indexes. This is not straightforward because resolving expressions with
> non-existent throws `FieldError`, so we cannot just collect columns from
> `Query._gen_cols()`.
>
> I attached tests.

New description:

 The current system checks don't cover invalid models fields in functional
 indexes. This is not straightforward because resolving expressions with
 non-existent throws `FieldError`, so we cannot just collect columns from
 `Query._gen_cols()`.


 Follow up to #26167.

 I attached tests.

--

Comment:

 Sorry Hasan, I should mark this ticket as "someday", it's a follow up to
 #26167. It will be valid after merging
 [https://github.com/django/django/pull/11929 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/065.756e64e6cef4b423711dc9ae158e2977%40djangoproject.com.


[Django] #32326: Proposing a more concrete example of 'Streaming large CSV files'

2021-01-05 Thread Django
#32326: Proposing a more concrete example of 'Streaming large CSV files'
-+-
   Reporter:  niauah |  Owner:  nobody
   Type: | Status:  new
  Cleanup/optimization   |
  Component: |Version:  3.1
  Documentation  |
   Severity:  Normal |   Keywords:  streamingresponse
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 In the current document, the 'large CSV' is demonstrated through a simple
 65536-element list, while the streaming feature is useful combined with a
 Python generator function. Here I propose a slightly modified example with
 a Python `yield` function.

-- 
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.55e7dba47d8e181d32c36b34b17f9775%40djangoproject.com.


Re: [Django] #25012: Migrations don't make foreign key type changes

2021-01-05 Thread Django
#25012: Migrations don't make foreign key type changes
-+
 Reporter:  Hedde van der Heide  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | 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):

 * Attachment "ticket_25012.zip" added.

 Test project

-- 
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.63c344fd0def826ed0366d145660a33c%40djangoproject.com.


Re: [Django] #25012: Migrations don't make foreign key type changes

2021-01-05 Thread Django
#25012: Migrations don't make foreign key type changes
-+
 Reporter:  Hedde van der Heide  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | 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):

 * owner:  Simon Charette => (none)
 * status:  assigned => new


Comment:

 I managed to reproduce but I think the issue is specific to `sqlmigrate`
 when dealing with cross-app relationships and due to how related models
 are lazily built. When using the `migrate` command everything seems to
 work fine.

 The `alter_field` method relies on `_related_non_m2m_objects` to determine
 which models points back at the field being altered but since `sqlmigrate`
 only loads the minimal plan it might not render some back referencing
 models and thus `_related_non_m2m_objects` won't return them. Unless
 someone can reproduce the same issue by solely using `migrate` I think
 this issue should be closed as fixed since
 
[https://github.com/django/django/blob/415f50298f97fb17f841a9df38d995ccf347dfcc/tests/migrations/test_operations.py#L1434-L1494
 we already tests for it] and a new one could be opened for `sqlmigrate`
 misbehaviour.

 I attached a test project I used to reproduce the `sqlmigrate` issue and
 confirm `migrate` works fine. Notice that `sqlmigrate app_one 0002`
 doesn't mention `app_two_baz_foos` at all unless
 `app_one.0002_auto_20210105_2317` is changed to depend on
 `app_two.0001_initial` which forces the rendering of the
 `app_two.Baz.Baz_Foo` model. I suspect the issue can also be reproduced
 using a `ForeignKey` across apps.

-- 
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.ebefe69449eb3f31c20cab05739287af%40djangoproject.com.


Re: [Django] #32325: cannot assing 1 models.id must be "model name" instance

2021-01-05 Thread Django
#32325: cannot assing 1 models.id must be "model name" instance
---+--
 Reporter:  slobadsky  |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Uncategorized  |  Version:  3.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
---+--
Changes (by Tim Graham):

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


Comment:

 Please see TicketClosingReasons/UseSupportChannels for ways to get help.

-- 
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.1d53d497ddbb0d01325cc13cd851caac%40djangoproject.com.


[Django] #32325: cannot assing 1 models.id must be "model name" instance

2021-01-05 Thread Django
#32325: cannot assing 1 models.id must be "model name" instance
-+
   Reporter:  slobadsky  |  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  |
-+
 hi i am very new to Django and trying to insert the datas into a table and
 i get "Cannot assign "1": "Indexation.loc_id" must be a "Locataire"
 instance." i do not know what and where i made a mistake?

 views.py

 def nouvelle_indexation(request):
 context={}
 i=Indexation()
 ts = str(time.time())
 
context['locataire_names']=Locataire.objects.all().values('loc_id','loc_name').filter(loc_active=1).order_by('loc_name')
 if request.POST.get('date_prelev') and
 request.POST.get('foreign_loc_id') and request.POST.get('o_index') and
 request.POST.get('n_index'):
 i.date_index_prelev= request.POST.get('date_prelev')
 i.old_index= request.POST.get('o_index')
 i.new_index =request.POST.get('n_index')
 i.indexation_unique_ref=str(uuid.uuid5(uuid.NAMESPACE_DNS,ts)).replace("-",
 "")
 i.loc_id=int(request.POST.get('foreign_loc_id'))
 print(i.loc_id)
 #i.save()
 context={
 'message':'L\'indexation a bien été ajouté.',
 }
 return render(request,'nouvelle-indexation.html',context)

 models.py

 class Locataire(models.Model):
 loc_id=models.AutoField(primary_key = True)
 loc_name= models.CharField(max_length=100)
 loc_loyer= models.DecimalField(max_digits=5, decimal_places=2,
 null=True)
 loc_charge= models.DecimalField(max_digits=5, decimal_places=2,
 null=True)
 loc_active= models.BooleanField(default=1)
 loc_unique_ref=models.CharField(max_length=100,editable=False)
 loc_time = models.DateTimeField(default=timezone.now)

 def __str__(self):
 return "%s" % (self.loc_name)

 class Charge(models.Model):
 year_id=models.AutoField(primary_key = True)
 charge_year= models.IntegerField(unique=True)
 ord_men= models.DecimalField(max_digits=4, decimal_places=2)
 eau_mcube= models.DecimalField(max_digits=4, decimal_places=2)
 charge_unique_ref=models.CharField(max_length=100,editable=False,
 null=True)
 def __str__(self):
 return "%s" % (self.charge_year)


 class Indexation(models.Model):
 index_id=models.AutoField(primary_key = True)
 date_index_prelev= models.DateField()
 old_index= models.IntegerField()
 new_index=models.IntegerField()
 indexation_unique_ref=models.CharField(max_length=100,editable=False,null=True)
 loc_id=models.ForeignKey(Locataire, blank=True, null=True,
 on_delete=models.SET_NULL, default=None)
 charge_id=models.ForeignKey(Charge, blank=True, null=True,
 on_delete=models.SET_NULL, default=None)
 def __str__(self):
 return "%s" % (self.date_index_prelev)

-- 
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/052.2ccb0567da46d8480593907d514a025f%40djangoproject.com.


Re: [Django] #26391: JSONField empty_values

2021-01-05 Thread Django
#26391: JSONField empty_values
-+-
 Reporter:  sim1234  |Owner:  (none)
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  contrib.postgres |  Version:  1.9
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  JSON JSONField   | Triage Stage:
  postgres forms |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 That's discussed in #27697.

-- 
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.8424258113a1d6d48a6beef60cd3a3ca%40djangoproject.com.


Re: [Django] #25012: Migrations don't make foreign key type changes

2021-01-05 Thread Django
#25012: Migrations don't make foreign key type changes
-+-
 Reporter:  Hedde van der Heide  |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | 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):

 * owner:  nobody => Simon Charette
 * status:  new => assigned


Comment:

 I had a look at the field alteration logic and it seems to come from the
 fact m2m relationships are excluded from this block

 
https://github.com/django/django/blob/415f50298f97fb17f841a9df38d995ccf347dfcc/django/db/backends/base/schema.py#L793-L808

 I've assigned it to myself as it's likely something we want to get fix
 before the final 3.2 release which introduces warnings about `AutoField`.

-- 
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.77702562c596af53446f33f5182afaf6%40djangoproject.com.


Re: [Django] #32321: Add system checks for invalid model field names for functional indexes in Meta.indexes.

2021-01-05 Thread Django
#32321: Add system checks for invalid model field names for functional indexes 
in
Meta.indexes.
-+-
 Reporter:  Mariusz Felisiak |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.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
-+-

Comment (by Hasan Ramezani):

 Mariusz,
 When I try to run the
 
[https://code.djangoproject.com/timeline?from=2021-01-05T00%3A49%3A56-06%3A00&precision=second
 tests] that you added to the ticket, I get

 `ValueError('Index.fields must be a list or tuple.')`

 it means currently, `models.Index` doesn't support `models.F('height') /
 (models.F('weight__abs') + models.Value(5))` and
 `Lower('missing_field').desc()`  as index `fields`.

 Should we add support for these kinds of  fields to `models.Index`?

-- 
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.bcaafce6c501b154a059c368d0ea523d%40djangoproject.com.


Re: [Django] #30949: Use functools.cached_property instead of django.utils.functional.cached_property.

2021-01-05 Thread Django
#30949: Use functools.cached_property instead of
django.utils.functional.cached_property.
-+-
 Reporter:  Thomas Grainger  |Owner:  David
 Type:   |  Smith
  Cleanup/optimization   |   Status:  assigned
Component:  Utilities|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by David Smith):

 We're nearing the point where Python 3.8 will become the minimum supported
 version. I've therefore started to look at this ticket as I think
 "someday" has now arrived, and hopefully we can make a decision one way or
 the other with this.

 The first thing I've done is to look at the performance of the two
 functions and have put together a script
 [https://gist.github.com/smithdc1/873688e563c66a0dd253602aab6fc3e2 here].
 Running it with isolated CPUs is giving repeatable results that show very
 little (if anything) between the two functions. This benchmark was run
 with Python 3.9.

 There were previous comments about the impact of the `RLock` mechanism,
 this is only used the first time when the
 
[https://github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Lib/functools.py#L964
 value is set]. I suspect this is why I'm seeing little performance
 difference between the two. (Hopefully, I've understood the context of
 these comments correctly)

 If no one has any objections at this stage, I'll prepare a patch in due
 course.


 {{{
 python bench_cached_property.py
 .
 Django Cache: Mean +- std dev: 1.07 us +- 0.05 us
 .
 Python Cache: Mean +- std dev: 1.08 us +- 0.05 us
 }}}

-- 
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.5ab43d5ba0696a5e667b1b33276fd63c%40djangoproject.com.


Re: [Django] #32314: Allow autoreloading of `python -m pkg_other_than_django runserver`

2021-01-05 Thread Django
#32314: Allow autoreloading of `python -m pkg_other_than_django runserver`
-+-
 Reporter:  William Schwartz |Owner:  William
 Type:   |  Schwartz
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  runserver,   | Triage Stage:  Ready for
  autoreload, freezers   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


Comment:

 [https://github.com/django/django/pull/13837 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/068.231806c4b798cd854aee2f6270f24057%40djangoproject.com.


Re: [Django] #32324: Adding more blocks to the contrib.admin site.

2021-01-05 Thread Django
#32324: Adding more blocks to the contrib.admin site.
-+-
 Reporter:  Muskan Vaswan|Owner:  Muskan
 Type:   |  Vaswan
  Cleanup/optimization   |   Status:  closed
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  admin customize  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-
Changes (by Mariusz Felisiak):

 * resolution:  invalid => needsinfo


Comment:

 Ticket described as ''"adding more blocks"'' cannot be accepted, it's too
 generic. You need to describe a concrete issue and use case. Maybe you
 should [https://docs.djangoproject.com/en/3.1/ref/contrib/admin/#set-up-
 your-projects-admin-template-directories "Set up your projects admin
 template directories"] for your use case.

  > Another example is if the user wants to change the add_url for a
 particular model having more blocks would be very helpful.

 I don't think that templates are appropriate place for such logic.

-- 
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.aeaff72827cc6055650e67dfd9a92d28%40djangoproject.com.


Re: [Django] #25012: Migrations don't make foreign key type changes

2021-01-05 Thread Django
#25012: Migrations don't make foreign key type changes
-+
 Reporter:  Hedde van der Heide  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by Rowan Seymour):

 Having experimented a bit more - it seems changing a primary key to
 `BigAutoField` does change any foreign keys to `BIGINT` when the migration
 is applied - ''except'' in implicit M2M through models. Those remain as
 `INT` and have to be fixed manually.

-- 
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.de3d3db17f4070495e10ebcf67ff6cbf%40djangoproject.com.


Re: [Django] #26391: JSONField empty_values

2021-01-05 Thread Django
#26391: JSONField empty_values
-+-
 Reporter:  sim1234  |Owner:  (none)
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  contrib.postgres |  Version:  1.9
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  JSON JSONField   | Triage Stage:
  postgres forms |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Matt Hegarty):

 * Attachment "invalid_empty_json_field.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/065.c9e76d3a321631f05a3bd467e4707abc%40djangoproject.com.


Re: [Django] #26391: JSONField empty_values

2021-01-05 Thread Django
#26391: JSONField empty_values
-+-
 Reporter:  sim1234  |Owner:  (none)
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  contrib.postgres |  Version:  1.9
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  JSON JSONField   | Triage Stage:
  postgres forms |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Matt Hegarty):

 Can we re-open this as a bug?  The default behaviour of JSONFields in the
 admin console is to fail when you try to save (see attached).
 Also raised on [https://stackoverflow.com/a/56271722/39296 SO]

 The workaround is:
 {{{
 # forms.py
 class ValidEmptyJSONField(forms.JSONField):
 empty_values = [None, "", [], ()]

 from django.db.models import JSONField

 class ValidEmptyJSONField(JSONField):
 """
 Overridden to permit valid empty JSON.
 """
 empty_values = [None, "", [], ()]

 def formfield(self, **kwargs):
 from app import forms
 return super().formfield(**{"form_class":
 forms.ValidEmptyJSONField, **kwargs})
 }}}

-- 
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.fedd0519caec8de5432660d3f272ad5d%40djangoproject.com.


Re: [Django] #32324: Adding more blocks to the contrib.admin site.

2021-01-05 Thread Django
#32324: Adding more blocks to the contrib.admin site.
-+-
 Reporter:  Muskan Vaswan|Owner:  Muskan
 Type:   |  Vaswan
  Cleanup/optimization   |   Status:  closed
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  admin customize  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-

Comment (by Muskan Vaswan):

 That was an example... Also adding the entire header inside a block
 improves flexibility as it allows the user to change the entire topbar in
 one go rather changing singular elements. Not to mention currently if the
 user wants to make an entirely new topbar... ideally making the old one
 disappear entirely they would have to override and extend two files, that
 is, base_site.html for (branding block) and base.html (for the user_tools
 block) both and it still doesn't entirely dissapear. Which could simply be
 accomplished by adding a block for the entire header and the user could
 simply extend the base.html and `{% block header %}{% endblock %}`.
 Another example is if the user wants to change the add_url for a
 particular model having more blocks would be very helpful.
 Replying to [comment:2 Mariusz Felisiak]:
 > > For example, the user can overwrite the entire navbar if the header
 was put inside {% block header %} simply by extending the template.
 >
 > The navigation sidebar is already in a separate block `nav-sidebar` and
 use a separate template, so it's easy to customize, see
 [https://code.djangoproject.com/ticket/31856?cnum_edit=1#comment:1
 comment]. Also, `header` already contains blocks for each element so I
 don't see how adding another `block` around existing blocks can increase
 flexibility.

-- 
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.c72d430deec5806a5d574f2cea5877cb%40djangoproject.com.


Re: [Django] #32324: Adding more blocks to the contrib.admin site. (was: Adding more blocks to the contrib.admin site)

2021-01-05 Thread Django
#32324: Adding more blocks to the contrib.admin site.
-+-
 Reporter:  Muskan Vaswan|Owner:  Muskan
 Type:   |  Vaswan
  Cleanup/optimization   |   Status:  closed
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  admin customize  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-
Changes (by Mariusz Felisiak):

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


Comment:

 > For example, the user can overwrite the entire navbar if the header was
 put inside {% block header %} simply by extending the template.

 The navigation sidebar is already in a separate block `nav-sidebar` and
 use a separate template, so it's easy to customize, see
 [https://code.djangoproject.com/ticket/31856?cnum_edit=1#comment:1
 comment]. Also, `header` already contains blocks for each element so I
 don't see how adding another `block` around existing blocks can increase
 flexibility.

-- 
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.dd7d508f266acdbf6c58dde9b3681478%40djangoproject.com.


Re: [Django] #32324: Adding more blocks to the contrib.admin site

2021-01-05 Thread Django
#32324: Adding more blocks to the contrib.admin site
-+-
 Reporter:  Muskan Vaswan|Owner:  Muskan
 Type:   |  Vaswan
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  admin customize  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-
Changes (by Muskan Vaswan):

 * owner:  nobody => Muskan Vaswan
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.d419cc311de82c25d04fb0601cdf8893%40djangoproject.com.


[Django] #32324: Adding more blocks to the contrib.admin site

2021-01-05 Thread Django
#32324: Adding more blocks to the contrib.admin site
-+-
   Reporter:  Muskan |  Owner:  nobody
  Vaswan |
   Type: | Status:  new
  Cleanup/optimization   |
  Component: |Version:  3.1
  contrib.admin  |
   Severity:  Normal |   Keywords:  admin customize
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  1  |
-+-
 The Django admin template can be overridden and extended by the user.
 However, flexibility to customize the admin page can be increased by
 putting larger chunks of code inside a `{% block  ... %}... {% endblock
 %}`. This will be useful as it will allow the user to completely rewrite
 an entire segment of the page without having to override smaller elements
 or the entire template.

 For example, the user can overwrite the entire navbar if the header was
 put inside `{% block header %}` simply by extending the template.

 Refer to this conversation [https://groups.google.com/g/django-
 developers/c/Q8I-0-2Sn4M] (point 2) for the full discussion

-- 
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/055.dd6318d5324306dc609874a7e301c0fb%40djangoproject.com.


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Viktor Grabov):

 * stage:  Ready for checkin => Unreviewed


-- 
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.ebe3a81a004935e6e40f02c267449f97%40djangoproject.com.


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:  Ready for
  contrib.admin, widget  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Viktor Grabov):

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


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Viktor Grabov):

 * owner:  Viktor Grabov => Viktor Grabov
 * 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/064.7480d31aefe0751f78761e9054549934%40djangoproject.com.


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Viktor Grabov:

Old description:

> There is a problem with autocomplete widget in admin please see attached
> screenshot
> [[Image(issue.png)]]
>
> I am submitting ​PR GH-13846  with my proposed fix.
>
> Screenshot after fix
> [[Image(Fixed.png)]]

New description:

 There is a problem with autocomplete widget in admin please see attached
 screenshot
 [[Image(issue.png)]]

 I am submitting ​PR [https://github.com/django/django/pull/13846]  with my
 proposed fix.

 Screenshot after fix
 [[Image(Fixed.png)]]

--

-- 
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.e0ad8496050dbace24b0f7686ed450bf%40djangoproject.com.


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Viktor Grabov):

 * Attachment "Fixed.png" added.

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


Re: [Django] #32323: Lazy object id fetch on object initialization.

2021-01-05 Thread Django
#32323: Lazy object id fetch on object initialization.
-+-
 Reporter:  Bartłomiej Nowak |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  bulk_create, fetch   | Triage Stage:
  id, lazy id fetch, |  Unreviewed
  can_return_ids_from_bulk_insert|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * type:  New feature => Bug
 * resolution:   => duplicate


Comment:

 Duplicate of #29497, fixed in 10f8b82d195caa3745ba37d9424893763f89653e.

-- 
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.04d7062fe674cea7ca250a06ce72561b%40djangoproject.com.


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Viktor Grabov):

 * Attachment "Fixed.png" added.

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


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Viktor Grabov):

 * Attachment "Fixed.2.png" added.

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


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Viktor Grabov:

Old description:

> There is a problem with autocomplete widget in admin please see attached
> screenshot
> [[Image(issue.png)]]

New description:

 There is a problem with autocomplete widget in admin please see attached
 screenshot
 [[Image(issue.png)]]

 I am submitting ​PR GH-13846  with my proposed fix.

 Screenshot after fix
 [[Image(Fixed.png)]]

--

-- 
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.ba82770b2ec39a77cc2ddb4fb879b1aa%40djangoproject.com.


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Viktor Grabov):

 * Attachment "Fixed.png" added.

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


[Django] #32323: Lazy object id fetch on object initialization.

2021-01-05 Thread Django
#32323: Lazy object id fetch on object initialization.
-+-
   Reporter: |  Owner:  nobody
  Bartłomiej Nowak   |
   Type:  New| Status:  new
  feature|
  Component:  Database   |Version:  2.2
  layer (models, ORM)|   Keywords:  bulk_create, fetch
   Severity:  Normal |  id, lazy id fetch,
   Triage Stage: |  can_return_ids_from_bulk_insert
  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Let's assume I am using the Postgres database, so the flag
 **can_return_ids_from_bulk_insert** is True.

 I would like to do this:
 {{{
 class ModelA:
   pass

 class ModelB:
   a = models.ForeginKey(ModelA)

 a_to_create = []
 b_to_create = []
 for _ in some_data:
 a = ModelA(...)
 a_to_create.append(a)
 b_to_create.append(
   ModelB(a=a, ...)
  )

 ModelA.objects.bulk_create(a_to_create)
 # all objects in the a_to_create list have now ids, becouse of
 can_return_ids_from_bulk_insert flag. a_to_create[0].id will return int.
 ModelA.objects.bulk_create(b_to_create)
 }}}

 But when I initialize ModelB(a=a), Django immediately fetches id from
 object **a**, which is None in this line, and using this latter, instead
 of fetching it (id) from the provided object, when it's going to create.
 Why do not fetch this id lazy?

 Because of this situation, I have to do an additional loop for every
 additional model.


 Thank you

-- 
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/052.23b1da0eb2a764e4146bdb9e7afaad49%40djangoproject.com.


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Viktor Grabov:

Old description:

> There is a problem with autocomplete widget in admin please see attached
> screenshot

New description:

 There is a problem with autocomplete widget in admin please see attached
 screenshot
 [[Image(issue.png)]]

--

-- 
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.6bc1be5c26e506b8df29b24e64d73ead%40djangoproject.com.


Re: [Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
 Reporter:  Viktor Grabov|Owner:  Viktor
 |  Grabov
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  Autocomplete,| Triage Stage:
  contrib.admin, widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Viktor Grabov):

 * Attachment "issue.png" added.

 Issue screenshot

-- 
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.89dcf2bf75dbb8a09fcbdc5ad9de225f%40djangoproject.com.


[Django] #32322: Autocomplete widget options wrap issue in CSS

2021-01-05 Thread Django
#32322: Autocomplete widget options wrap issue in CSS
-+-
   Reporter:  Viktor |  Owner:  Viktor Grabov
  Grabov |
   Type:  Bug| Status:  assigned
  Component: |Version:  master
  contrib.admin  |   Keywords:  Autocomplete,
   Severity:  Normal |  contrib.admin, widget
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 There is a problem with autocomplete widget in admin please see attached
 screenshot

-- 
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.63db4d0783a6686c1fc86318b1c21698%40djangoproject.com.


Re: [Django] #32231: It should be possible to pass None as params for Model.objects.raw

2021-01-05 Thread Django
#32231: It should be possible to pass None as params for Model.objects.raw
-+-
 Reporter:  Alexander Lyabah |Owner:  Alexander
 |  Lyabah
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  raw, psycopg2,   | Triage Stage:  Ready for
  execute, orm, db   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

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


Comment:

 In [changeset:"415f50298f97fb17f841a9df38d995ccf347dfcc" 415f5029]:
 {{{
 #!CommitTicketReference repository=""
 revision="415f50298f97fb17f841a9df38d995ccf347dfcc"
 Fixed #32231 -- Allowed passing None params to QuerySet.raw().
 }}}

-- 
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.98de1aad5a2de1ef7dd8beadcaa45ede%40djangoproject.com.


Re: [Django] #32231: It should be possible to pass None as params for Model.objects.raw

2021-01-05 Thread Django
#32231: It should be possible to pass None as params for Model.objects.raw
-+-
 Reporter:  Alexander Lyabah |Owner:  Alexander
 |  Lyabah
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  raw, psycopg2,   | Triage Stage:  Ready for
  execute, orm, db   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"aa3d36063174cc1e16a1e5150b6b47609dd1e79a" aa3d3606]:
 {{{
 #!CommitTicketReference repository=""
 revision="aa3d36063174cc1e16a1e5150b6b47609dd1e79a"
 Refs #32231 -- Added tests for QuerySet.raw() with an escaped % symbol.
 }}}

-- 
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.ac0a78021627d18a7ac2daa07329498f%40djangoproject.com.


Re: [Django] #28011: Correct Field.hidden docs regarding what fields are hidden

2021-01-05 Thread Django
#28011: Correct Field.hidden docs regarding what fields are hidden
---+
 Reporter:  Tim Graham |Owner:  (none)
 Type:  Bug|   Status:  new
Component:  Documentation  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Modestas Jakuska):

 * owner:  Modestas Jakuska => (none)
 * status:  assigned => new


-- 
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.19a510935bea660f1062466b642f26d7%40djangoproject.com.


Re: [Django] #32231: It should be possible to pass None as params for Model.objects.raw

2021-01-05 Thread Django
#32231: It should be possible to pass None as params for Model.objects.raw
-+-
 Reporter:  Alexander Lyabah |Owner:  Alexander
 |  Lyabah
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  raw, psycopg2,   | Triage Stage:  Ready for
  execute, orm, db   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin
 * needs_docs:  1 => 0


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

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