Re: Yaml serializer output

2021-12-27 Thread Sergey Fursov
Please, disregard the part about failing tests, I had an old version locally without this commit applied https://github.com/django/django/commit/a57c783dd4e6dc73847081221827a1902eede88b Anyway, I think it might be confusing (at least it is confusing to me) that by default yaml serializer produce

Passing an integer-only key to KeyTransform

2021-12-27 Thread Niccolò Mineo
On a Django 3.2 installation, I am trying to pass a stringified integer-only zip code as the key_name argument to KeyTransform: >>> stats_qs = stats.annotate(municipality_stats=KeyTransform("66049", "data")).values("municipality_stats") As highlighted above, it fails to work. The reason, as yo

Re: Passing an integer-only key to KeyTransform

2021-12-27 Thread Mariusz Felisiak
Hi, Integers (and strings that can be cast to integers) on the first-level are always interpreted as index transforms in arrays (as documented ) because you can store a JSON array in the JSONField. Unfortun

Re: Passing an integer-only key to KeyTransform

2021-12-27 Thread Niccolò Mineo
I ended up using the JSONB_EXTRACT_PATH function (I am using Postgres), although it's a pity not to be able to use KeyTransform in this situation. Il giorno lunedì 27 dicembre 2021 alle 10:59:22 UTC+1 Mariusz Felisiak ha scritto: > Hi, > > Integers (and strings that can be cast to integers) on

Separate between words in Django commands and methods

2021-12-27 Thread אורי
Hi, Please check this new ticket I created today: https://code.djangoproject.com/ticket/33387 I think Django commands should separate words by underscores, like function names and variables names in Python, according to PEP 8. This is also relevant to *TestCase* methods such as *setUp* and *tear

Re: Regarding help for web development career

2021-12-27 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking to work wi