Fellow Reports - May 2022

2022-05-09 Thread Mariusz Felisiak

Week ending May 8, 2022

*Triaged:*
https://code.djangoproject.com/ticket/33673 - PostgreSQL removes 
constraints when removing columns. (needsinfo)
https://code.djangoproject.com/ticket/33665 - Add support for Postgres 
multirange (duplicate)
https://code.djangoproject.com/ticket/26318 - Unexpected / duplicated 
queries on nested Prefetch queryset with repeated model (duplicate)
https://code.djangoproject.com/ticket/33675 - Drop support for 
PostgreSQL 10 and PostGIS 2.4. (created)
https://code.djangoproject.com/ticket/33676 - Translation of some 
languages confused about apostrophe. (duplicate)
https://code.djangoproject.com/ticket/33677 - Django test does not 
migrate parallel db's if --keepdb --parallel option is used. (invalid)
https://code.djangoproject.com/ticket/33678 - order_by crash when 
sorting by a foreign key referencing a Model with an ordering that 
includes expressions (duplicate)
https://code.djangoproject.com/ticket/33680 - Documentation example of 
customising model instance loading has a bug (accepted)
https://code.djangoproject.com/ticket/33681 - Cache OPTIONS are not 
passed to the Redis client. (accepted)
https://code.djangoproject.com/ticket/33679 - "empty" suffix gets added 
to last (original) admin inline form row for readonly views (accepted)


*Reviewed/committed:*
https://github.com/django/django/pull/15647 - Removed 'tests' path 
prefix in a couple tests.
https://github.com/django/django/pull/15629 - Fixed #33413 -- Made 
migrations propage collations to related fields.
https://github.com/django/django/pull/15652 - Fixed #33667 -- Used 
--header-branding-color for branding headers in admin.
https://github.com/django/django/pull/15635 - Fixed #29854 -- Made 
_all_related_fields() return deterministically ordered fields.
https://github.com/django/django/pull/15645 - Fixed #33658 -- Doc'd 
ModelChoiceField.blank attribute.
https://github.com/django/django/pull/15654 - Refs #30581 -- Added 
Q.flatten()
https://github.com/django/django/pull/15658 - Refs #33646 -- Reduced 
sync_to_async hops on async QuerySet iteration.
https://github.com/django/django/pull/15659 - Refs #30581 -- Added 
Q.check() hook.
https://github.com/django/django/pull/15650 - Fixed #25105 -- Checked 
deferred constraints before updating rows on PostgreSQL.
https://github.com/django/django/pull/15664 - Fixed #33680 -- Corrected 
example of customizing model loading in docs.
https://github.com/django/django/pull/15661 - Fixed #33679 -- Fixed the 
last inline's id in admin for users without add permissions.


*Reviewed:*
https://github.com/django/django/pull/15656 - Refs #32339 -- 
Restructured outputting HTML form docs.


*Authored:*
https://github.com/django/django/pull/15637 - Refs #33646 -- Made 
QuerySet.raw() async-compatible.
https://github.com/django/django/pull/15653 - Fixed 
CoveringIndexTests.test_covering_partial_index() when 
DEFAULT_INDEX_TABLESPACE is set.
https://github.com/django/django/pull/15655 - Fixed #33675 -- Dropped 
support for PostgreSQL 10 and PostGIS 2.4.
https://github.com/django/django/pull/15660 - Refs #30581 -- Moved 
CheckConstraint tests for conditional expressions to 
migrations.test_operations.


Best,
Mariusz

--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6279c0a4-2e50-0a34-5fae-ed231db20ae6%40gmail.com.


Custom template directory name in apps

2022-05-09 Thread Wouter Roos
*Feature*:
Configure name of the templates directory in which the app directory 
template loader looks for matching template names. Possibly from the 
template settings.


*Current situation: *
Currently the directory name ('templates') is hardcoded in the app 
directory loader (*template/loaders/app_directories.py*) as a fixed value 
in a method, thus adjusting it requires a custom class that overrides the 
method. As django templates default to a configurable file loader (
django.template.loaders.filesystem.Loader), I always thought it was odd 
that the same did not apply to the app directory template loader.

*Why I think it's beneficial*
Django can support multiple template backends. This can be useful when 
supporting multiple template situations. I myself like to differentiate my 
normal front-page templates from my e-mail templates. However, I've run 
into the issue on three different projects where I could not place a mail 
template folder in my application folders unless I wrote a custom loader.
I think allowing a loader to have the template folder name as input can 
allow cleaner code.

*What I propose*
Essence: Rewrite the app directory template loader to allow the template 
folder name as input as defined in the ticket created 
.
Example template settings:

"OPTIONS": { 
"loaders": [ ("django.template.loaders.app_directories.Loader", 
"mail_templates") ],
}, 

Optional: Rewrite DjangoTemplates to allow *dir_name* as input to define 
the directory name for template folders in the applications.

*Sources*
Ticket: https://code.djangoproject.com/ticket/33688
Github PR: https://github.com/django/django/pull/15676


Let me know if you think this is a good idea. I'd love to hear  your 
opinions :D

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f6ab3666-05a7-4839-8c14-a0f23dcc7f63n%40googlegroups.com.


Re: Custom template directory name in apps

2022-05-09 Thread Mariusz Felisiak
Hi,

Thanks for the proposition. I'm not sure why the new option is better 
than using subdirectories in *"templates"  *e.g. *"templates/mail/".*

Best,
Mariusz

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/fb7408c2-aa2d-4dfb-a624-a042a68e5b55n%40googlegroups.com.