Take two on fixing ticket-1688. See take one: #1.
This makes it possible to translate permission names, both for built-in and custom permissions, while still storing the names in the database.
Two steps…
Hi @smithdc1,
As discussed, created a PR which will tackle the project from the other end.
Started with changing request.META to request.meta in the first commit. (changed request.GET to request.query_params in few places, will…
The main docs for TemplatesSetting: https://docs.djangoproject.com/en/dev/ref/forms/renderers/#templatessetting
A small optimization I spotted whilst working on django-browser-reload - stop fetching cwd() for every template dir (one per app dir, etc.).
Since this function is run on every file change, it's worth keeping it fast.
Cache get_response’s coroutine status. Afaiu get_response is never expected to change.
Repeating the check on every is unnecessary work - about 1 microsecond each time, on my machine's Python 3.10:
In [2]: async def foo():...
As per question on this post: https://forum.djangoproject.com/t/custom-password-hashing/11020 . The docs didn't make clear how Django picks a hasher to use.
Similar to #15185 , use improvements to Python function signatures where possible. Much of the x = options['x'] pattern has been around since Python 2.
.items() rather than copy the keys into a tuple. This avoids refetching the values (twice).MinimumLengthValidator and NumericPasswordValidator.Thanks to Nick Pope for spotting the bug in Code Review of https://github.com/django/django/pull/15173 .
Prior to this commit there were four(-ish) ways sitting around for running the tools:
This is a…
Field.db_check() should return None or a SQL string. Returning [] happened to work because it’s falsey.
This helps introspection, and it follows the comment in BaseForm.__init__ not to avoid changing base_fields.
Thanks to Silvio Gutierrez and Baptiste Melon for investigating.
It was bumped to 1.3.7 in 2514e044a7fce58176c4e79eec298f3d8f70e89b.