Wrong ordering of many-to-many fields with explicit intermediary model in Django admin

2023-11-01 Thread Alan Evangelista
Hi, all. I was not sure if this question was better suited to the users or developers mailing list and posted in both. Feel free to delete one of them if you see fit. I have a Submission model with a many-to-many relationship with a Market model and explicitly defined a SubmissionMarket model

Django security releases issued: 4.2.7, 4.1.13, and 3.2.23

2023-11-01 Thread Mariusz Felisiak
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2023/nov/01/security-releases/ -- 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

Re: Potential bug with how Value works with Django ORM queries

2023-10-26 Thread Nitin Chaudhary
Hi David, Thanks for response. I understand it now. I was assuming that Value auto typecasts to the field that we are querying. This makes sense. Thank you for taking time to respond. Cheers Nitin On Thursday, October 26, 2023 at 3:52:17 AM UTC-4 David Sanders wrote: > Hi Nitin, > > Not sure

Re: Potential bug with how Value works with Django ORM queries

2023-10-26 Thread David Sanders
Hi Nitin, Not sure what db you're using but will explain assuming PG. In this particular example, Django uses the `->` operator which requires that we compare jsonb types. The `__in=("Program1", "Program2")` is converted to jsonb via `DatabaseOperations.adapt_json_value()` where as `Value()`

Re: Question about support dates

2023-10-25 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
As the maintainer of several Django-related packages and a contributor to many more, I see the policy as fair. Most maintainers have little capacity, and anything to reduce that burden is welcome. Third-party packages typically test with a matrix of Python versions against Django versions.

Potential bug with how Value works with Django ORM queries

2023-10-25 Thread Nitin Chaudhary
Hi I recently came across a very interesting scenario. I have a JSON Field which I want to query on. I was trying to do some performance optimizations and came across this If I query a non-JSON field like this: Study.objects.all().filter(study_id__in=[Value("Tes1"),Value("Test2")]) and

Question about support dates

2023-10-25 Thread Wim Feijen
Hi, The release notes of Django 5.0 state: "Third-party library support for older version of Django¶ Following the release of Django 5.0, we suggest that third-party app authors drop support for all versions of Django prior to 4.2. At that time, you should be able to run your package’s tests

Django 5.0 beta 1 released

2023-10-23 Thread Natalia Bidart
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2023/oct/23/django-50-beta-1-released/ -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this

Re: Fellow Reports - October 2023

2023-10-22 Thread Mariusz Felisiak
Week ending October 22 *Triaged:* https://code.djangoproject.com/ticket/34901 - Add async interface to contrib.sessions (accepted) https://code.djangoproject.com/ticket/34902 - django.test.client.Client.head request fails on AttributeError as_sync is missing (worksforme)

Re: Fellow Reports - October 2023

2023-10-22 Thread Mariusz Felisiak
Week ending October 15 *Triaged:* https://code.djangoproject.com/ticket/34894 - Query.change_aliases() has several significant bugs (needsinfo) https://code.djangoproject.com/ticket/34895 - Reverse migrations fail with mysql / mariadb with sql_safe_updates set to 1 (duplicate)

Re: Admin login view does not respect REDIRECT_LOGIN_URL

2023-10-17 Thread Maciek Olko
Hello, Please double check the setting name, it should be LOGIN_REDIRECT_URL https://docs.djangoproject.com/en/4.2/ref/settings/#login-redirect-url. Regards, Maciej wt., 17 paź 2023 o 05:35 Gagan Deep napisał(a): > Hello everyone, > > While working on my project, I found that the admin login

Re: Needed feedback on the approach to solve bulk_update silently truncating values for size limited fields

2023-10-17 Thread Akash Sen
Got it. Thank you for the response Mariusz and Simon. On Tuesday, October 17, 2023 at 11:43:00 AM UTC+5:30 Mariusz Felisiak wrote: > I wanted to propose these solution as a hotfix unless we get #31202 > or #29771 >

Re: Needed feedback on the approach to solve bulk_update silently truncating values for size limited fields

2023-10-17 Thread Mariusz Felisiak
I wanted to propose these solution as a hotfix unless we get #31202 or #29771 done. As we are going to upgrade the bulk_update in near future, resolving the bug for now seems reasonable to me.

Re: Needed feedback on the approach to solve bulk_update silently truncating values for size limited fields

2023-10-16 Thread Akash Sen
The argument of having new specialized bulk_update_cast method is more logical than the earlier two approaches. But the best approach should be drop using Case / When which will eventually come with #31202 or #29771

Admin login view does not respect REDIRECT_LOGIN_URL

2023-10-16 Thread Gagan Deep
Hello everyone, While working on my project, I found that the admin login view does not respect the REDIRECT_LOGIN_URL . This could be design decision that I am overlooking

Re: Needed feedback on the approach to solve bulk_update silently truncating values for size limited fields

2023-10-16 Thread charettes
Hello Akash, Another approach that isn't mentioned here but alluded to in the ticket is to actually move bulk_update away from using Case / When which is the root of the issue here. We know that using Case / When is slow

Needed feedback on the approach to solve bulk_update silently truncating values for size limited fields

2023-10-16 Thread Akash Sen
Ticket#33647 : bulk_update silently truncating values for size limited fields *Approach 1:* As mentioned by Simon in this comment we can introduce a new argument maybe named generic in the

Re: HELP needed in a Reactjs Django project

2023-10-14 Thread Dinesh Subramaniyam
I have done like this where there is input in front end and data is passed to django admin panel you have to make first crossorigin in django and then make api structure in django and then pass it in reactjs call api from axios I have code of it I will send you after some time understand it simple

Re: HELP needed in a Reactjs Django project

2023-10-13 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi! I think you've found the wrong mailing list for this post. This mailing list is for discussing the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are

Re: HELP needed in a Reactjs Django project

2023-10-13 Thread Plamedi klj
Bien Le ven. 13 oct. 2023 à 14:14, Tejas Vaij a écrit : > I am trying to upload a blob from a service-worker in react-js to a django > server but for some reason it is not getting uploaded. I have tried a lot > of things but nothing seems to be working. Can anyone please help me know > what is

HELP needed in a Reactjs Django project

2023-10-13 Thread Tejas Vaij
I am trying to upload a blob from a service-worker in react-js to a django server but for some reason it is not getting uploaded. I have tried a lot of things but nothing seems to be working. Can anyone please help me know what is going wrong with my code. Here is the stackoverflow link where

Re: Pertaining the 4.2.6 release's "recreate indexes" footnote

2023-10-12 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I’ve created a PR with a suggested improvement: https://github.com/django/django/pull/17359 . On Thu, Oct 12, 2023, at 5:09 AM, Mariusz Felisiak wrote: > > Thoughts on this? > > Documentation improvements are always welcome, you can send your proposition > via GitHub PR. > > Best, > Mariusz >

Re: Pertaining the 4.2.6 release's "recreate indexes" footnote

2023-10-11 Thread Mariusz Felisiak
> Thoughts on this? Documentation improvements are always welcome, you can send your proposition via GitHub PR. 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

Re: Pertaining the 4.2.6 release's "recreate indexes" footnote

2023-10-11 Thread Michael
Pardon, @Mariusz, I didn't mean to specify "non-text fields" - I had re-worded that sentence before posting. On Wednesday, October 11, 2023 at 2:29:58 AM UTC-4 Mariusz Felisiak wrote: > My immediate thought is that any indexes on non-text fields, created with > these versions, will be useless

Re: Pertaining the 4.2.6 release's "recreate indexes" footnote

2023-10-11 Thread Mariusz Felisiak
My immediate thought is that any indexes on non-text fields, created with these versions, will be useless in ORM-based queries. If that's the case, this seems like a much bigger deal than the footnote would imply. I'm puzzled. Why you assumed that all non-string based fields are affected?

Re: Pertaining the 4.2.6 release's "recreate indexes" footnote

2023-10-10 Thread אורי
Hi, I also think a more specific documentation as to how to fix this issue is required. I usually upgrade Django about 6 months after the initial major release, which is this month. But because of this issue I decided to wait 2 more months. Thanks, Uri. אורי u...@speedy.net On Wed, Oct 11,

Pertaining the 4.2.6 release's "recreate indexes" footnote

2023-10-10 Thread Michael
The release notes on https://docs.djangoproject.com/en/dev/releases/4.2.6/ contain: > You may need to recreate indexes propagated to the database with Django 4.2 - 4.2.5 as they contain unnecessary ::text casting that is avoided as of this release. This doesn't give much context or give any

Re: Link to alternative Python resource

2023-10-10 Thread Amogh
It seems plausible to me. I'll try to look into other places where it has been repeated and try to make a PR. On Monday, 9 October 2023 at 20:58:15 UTC+5:30 Adam Johnson wrote: > I think it would be better to remove the link from the contribution guide, > since it’s quite advanced. The

Re: Link to alternative Python resource

2023-10-09 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I think it would be better to remove the link from the contribution guide, since it’s quite advanced. The recommendation for the tutorial and “you should have a good understanding of Python itself” seem sufficient to me. I noticed we have other “Dive Into Python” links throughout the docs.

Fellow Reports - October 2023

2023-10-09 Thread Mariusz Felisiak
Week ending October 8 *Triaged:* https://code.djangoproject.com/ticket/34885 - Not removing original (non-hashed) files after processing (duplicate) https://code.djangoproject.com/ticket/34886 - Sample use of lazy in delayed translations is not valid in Django 4.1 and 4.2. (accepted)

Re: Update returning

2023-10-08 Thread Tom Carrick
I think it's okay to return something else based on a parameter. This is already done for e.g. values_list(flat=True) and values_list(named=True). While the bool addresses the obvious footgun I think it also loses a lot of flexibility. If you have a field modified by a pre-update trigger or a

Re: Update returning

2023-10-07 Thread aivars.kalv...@gmail.com
Hi! I considered making `returning: bool` a flag that we are returning data. That would make it `Foo.objects.update(x=1, y=2, returning=True)` and avoid some footguns. Or even a new function (`update_returning`?) because I have mixed feelings about different return types based on parameters.

Re: Update returning

2023-10-07 Thread Tom Carrick
Hi Aivars, Since we spoke yesterday I've been thinking about this... I don't really see the value in returning a QuerySet. There are only a limited number of options that make sense at this point, and even those are tough to justify. Like what would happen if you do `Foo.objects.update(x=1,

Re: Fellow Reports - September 2023

2023-10-06 Thread Mariusz Felisiak
Week ending October 1, 2023 *Triaged:* https://code.djangoproject.com/ticket/34866 - Cannot inspect migrations that replace squashed migrations with sqlmigrate (needsinfo) https://code.djangoproject.com/ticket/34871 - Validation of UniqueConstraint with Case() crashes. (accepted)

Link to alternative Python resource

2023-10-04 Thread Amogh
Hey there, I was going through Writing your first patch for Django , there is a link to Dive Into Python , and apart from the table of contents, it seems that the resource is pretty

Django security releases issued: 4.2.6, 4.1.12, and 3.2.22

2023-10-04 Thread Natalia Bidart
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2023/oct/04/security-releases/ -- 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

Re: Update returning

2023-10-03 Thread Plamedi klj
Bien Le lun. 25 sept. 2023 à 17:44, Aivars Kalvāns a écrit : > Hi! > > I want to implement these changes and I have a PR in the ticket > https://code.djangoproject.com/ticket/32406 > At the moment I have a new `update_returning` method but I can easily > replace it with ` (updates=None, *,

Re: Looking for a code that separates fields while applying migrations

2023-10-02 Thread Akash Sen
This one worked : SQL: https://github.com/django/django/blob/f4e72e6523e6968d9628dfbff914ab57dbf19e6b/django/db/models/fields/__init__.py#L142 . Thank you Adam. On Monday, October 2, 2023 at 3:44:34 PM UTC+5:30 Adam Johnson wrote: > See alte_field in the schema editor: >

Re: Looking for a code that separates fields while applying migrations

2023-10-02 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
See alte_field in the schema editor: https://github.com/django/django/blob/f4e72e6523e6968d9628dfbff914ab57dbf19e6b/django/db/backends/base/schema.py#L811 It steps through what has changed in the field and generates SQL for the database relevant changes, queueing up statements with

Looking for a code that separates fields while applying migrations

2023-09-30 Thread Akash Sen
Hello everyone, There are certain attributes in a field, after changing these the migration generated willbe applied to database, (for example take foreignkey) like null=True or db_default=1. As they have something to do with the database column. There are some other attributes after changing

Re: (Circa end of 2021) Localization issues with input type=date?

2023-09-29 Thread natali...@gmail.com
On Thursday, November 10, 2022 at 5:40:45 AM UTC-3 Jacob Rief wrote: How about ditching the JS based datepicker altogether and replace it against the built-in datepicker offered by modern browsers? This would also help users of mobile devices because they already have good internal

Fellow Reports - September 2023

2023-09-25 Thread Mariusz Felisiak
Week ending September 10, 2023 Released Django 4.2.5, 4.1.11, and 3.2.21. Prepared https://code.djangoproject.com/wiki/Version5.1Roadmap. *Triaged:* https://code.djangoproject.com/ticket/10808 - Multiple inheritance (model-based) broken for __init__ of common fields in diamond inheritance

Re: Update returning

2023-09-25 Thread Aivars Kalvāns
Hi! I want to implement these changes and I have a PR in the ticket https://code.djangoproject.com/ticket/32406 At the moment I have a new `update_returning` method but I can easily replace it with ` (updates=None, *, returning:bool=None, **kwargs)` if you decide to add functionality to the

Re: Django in Portuguese

2023-09-19 Thread אורי
Hi, I created the following issue: https://code.djangoproject.com/ticket/34854 Thanks, Uri. אורי u...@speedy.net ‪On Tue, Sep 19, 2023 at 9:57 PM ‫אורי‬‎ wrote:‬ > Django Developers, > > I need to translate my website (Django) to Portuguese (Europe/Portugal > version). I translated the site

Django in Portuguese

2023-09-19 Thread אורי
Django Developers, I need to translate my website (Django) to Portuguese (Europe/Portugal version). I translated the site and I was surprised to see that a specific error message was in English (from FileExtensionValidator). I checked and found out that there are many untranslated strings in

Re: Proposal: Clarify individual members page

2023-09-19 Thread Andrew Mshar
Small typo in my previous post. Clearly I meant I'll open the PR next year... Better late than never, here is the PR with changes from my previous draft based on everyone's input: https://github.com/django/djangoproject.com/pull/1406 Thanks again for all the feedback. On Friday, November

Django 5.0 alpha 1 released

2023-09-18 Thread Natalia Bidart
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2023/sep/18/django-50-alpha-1-released/ This is my first alpha release, so let me know if you see something odd! Cheers, Natalia. -- You received this message because you are subscribed to the Google

Status of 5.0 release blockers.

2023-09-11 Thread Mariusz Felisiak
Details are available on the Django forum: https://forum.djangoproject.com/t/status-of-5-0-alpha-release/23805 -- 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

RE: Allow applications to register links in the admin interface

2023-09-07 Thread Matthew Pava
I reviewed some of the history of this ticket. I tend to agree with the criticisms of adding something akin to an AdminURL to the Django admin. However, the idea of custom views to apps in the admin is an idea that I find appealing. The history of this ticket features a comment from Tim Graham

Re: Allow applications to register links in the admin interface

2023-09-07 Thread Mariusz Felisiak
I'm also -1. Django Admin is not a universal tool for building an app and adding a new option is always controversial (we already have many of them). There is a way to achieve the same by providing

Re: Allow applications to register links in the admin interface

2023-09-06 Thread Shlomo
You have some great points that I definitely overlooked in the initial implementation. I don't think that overloading the template is a great solution since there are still some features that registered links will add that cannot be done with a simple template override. - It is easier to

Re: Deprecate CICharField, CIEmailField, CITextField

2023-09-06 Thread 'Johannes Maron' via Django developers (Contributions to Django itself)
Hi again, We started creating a 3rd party django-citext package, to ensure future support of PotsgreSQL's CITEXT extension under a corporate funding. You can find the project here: https://github.com/voiio/django-citext While doing so, I noticed a couple of small things, where I'd love some

Django security releases issued: 4.2.5, 4.1.11, and 3.2.21

2023-09-04 Thread Mariusz Felisiak
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2023/sep/04/security-releases/ -- 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

Re: Fellow Reports - August 2023

2023-09-03 Thread Mariusz Felisiak
Week ending September 3, 2023 *Triaged:* https://code.djangoproject.com/ticket/34802 - django.contrib.admin.actions.delete_selected() should return number of rows deleted via ModelAdmin.delete_queryset() (wontfix) https://code.djangoproject.com/ticket/34804 - legacy_algorithm = 'sha1'

Re: Fellow Reports - August 2023

2023-08-28 Thread Mariusz Felisiak
Week ending August 27, 2023 *Triaged:* https://code.djangoproject.com/ticket/34787 - The 'runserver' command doesn't work when run from an installed script on Windows (needsinfo) https://code.djangoproject.com/ticket/34788 - Correct NUMBER_GROUPING in Japan. (accepted)

Re: Digest for django-developers@googlegroups.com - 1 update in 1 topic

2023-08-28 Thread Asif Saif Uddin
I just want to share my 2 cents... Oracle is highly used in government and big Corporations in my country and banks and many critical places. So while the number of django user of oracle might be low, the prospect of introducing python and django to a legacy project is invaluable. I personally

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-27 Thread David Sanders
I posted a thread a while back about the latest version of Oracle 23c which appears to add support for a few things that would fix some of the workarounds we have in the ORM (eg boolean expressions). I know dropping 19c is a long way off but at least the future is looking brighter  On Wed, 9 Aug

Re: Feature request: making gettext more robust

2023-08-25 Thread Wim Feijen
Hi Gergely, What helps for me is Django rosetta, https://django-rosetta.readthedocs.io/ . It makes filtering on untranslated or fuzzy translations very easy. Best regards, Wim PS Sorry for the late response. Op zaterdag 17 juni 2023 om 16:01:04 UTC+2 schreef Shai Berger: > Hi Gergely, > > On

Re: Fellow Reports - August 2023

2023-08-21 Thread Mariusz Felisiak
Week ending August 20, 2023 I spent the whole week on a tiny Italian island ️  , so didn't work much   戀  ☀️. *Triaged:* https://code.djangoproject.com/ticket/34780 - Tests don't pass on Python 3.11.4. (invalid) https://code.djangoproject.com/ticket/34782 - Explicit support for

Re: Fellow Reports - August 2023

2023-08-20 Thread Mariusz Felisiak
Week ending August 13, 2023 *Triaged:*https://code.djangoproject.com/ticket/22055 - 404 page does not display stack trace when Resolver404 is raised from a view (wontfix) https://code.djangoproject.com/ticket/34766 - utils.text: slugify misses "l" when converting "ł" (duplicate)

Re: Adding "reason" to django.shortcuts.redirect

2023-08-17 Thread Skrattoune
It is already implemented in my projects. So far, my main use cases are for the testing of views or their debugging. When several reasons can lead to a redirect to the same address or view, it allows me to ensure that the redirect is because of the reason I'm expecting. I think it's a good

Re: Sync and Async versions of the same function: guidelines for contributors

2023-08-16 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I think some duplication will always be required, unfortunately. Bridging the two paradigms is necessarily costly as it involve communicating between threads. IMO duplication is worth it to avoid performance regressions for sync code, and to make async code worth using. I am doubtful there is a

Re: How to get started with contributions

2023-08-15 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

Re: Password reset link is not displayed by default

2023-08-14 Thread Marty
Hi, ah, I see. Okay, thanks for info and link. Marty On Monday, July 24, 2023 at 2:00:44 PM UTC+2 Adam Johnson wrote: > Hi! > > You've found the wrong mailing list for this post. This mailing list is > for discussing the development of Django itself, not for support using > Django. This

Hi, I'm new to the django community

2023-08-13 Thread QUVONCHBEK Bobojonov
hi, I'm new to the django community and I had 1 suggestion. Django admin panel needs a new modern design. -- 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

How to get started with contributions

2023-08-12 Thread nikita bansal
Respected Sir/Mam, I trust this message finds you well. I'm Nikita Bansal, an undergrad pursuing AI and Data Science at Maharaja Agresen Institute of Technology, Delhi, India. My solid grasp of HTML, CSS, JavaScript, Bootstrap, and C/C++ was showcased when I emerged as a top contributor

Fwd: Django dynamic multiple databases

2023-08-12 Thread pankaj palmate
-- Forwarded message - From: pankaj palmate Date: Sat, 12 Aug, 2023, 20:12 Subject: Django dynamic multiple databases To: I want to creating saas based application containing one super admin and rest will be customers where each customer will have their own database .want

Re: Disabling dark / light mode UI toggle

2023-08-10 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
IMO that’s not an argument for bloating the interface further. If we could go back in time perhaps we’d not make many of the same decisions. I’d say the way forwards is to write a blog post documenting this template override technique, and if there are signs that others find it useful, we could

Re: Disabling dark / light mode UI toggle

2023-08-10 Thread Niccolò Mineo
Django currently allows removing the view site link, which I'd call a niche feature. Considering also the recent theming improvements in Django, allowing to hide the color theme toggle shouldn't be more niche than said view site link removal feature. Il giorno mercoledì 9 agosto 2023 alle

Re: Disabling dark / light mode UI toggle

2023-08-09 Thread Carlton Gibson
Quite likely not, but such a niche feature isn’t worth the extra API surface area, I’d likely think. On Wednesday, 9 August 2023, Niccolò Mineo wrote: > Yes, not pretty, though, right? > > Il giorno martedì 8 agosto 2023 alle 07:33:12 UTC+2 Adam Johnson ha > scritto: > >> You should be able to

Re: Disabling dark / light mode UI toggle

2023-08-09 Thread Niccolò Mineo
Yes, not pretty, though, right? Il giorno martedì 8 agosto 2023 alle 07:33:12 UTC+2 Adam Johnson ha scritto: > You should be able to disable the button by creating an empty > admin/color_theme_toggle.html template in your project. > > On Mon, Aug 7, 2023 at 10:28 PM Niccolò Mineo wrote: > >> *

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-09 Thread 'Lily Foote' via Django developers (Contributions to Django itself)
I've had to deal with adding Oracle support to the features I've worked on recently and with Mariusz's pointer to the right bit of the wiki (https://code.djangoproject.com/wiki/OracleTestSetup) I was able to get a working local development setup. I think once you have this local dev setup,

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-09 Thread Carlton Gibson
Thanks for raising this Paolo. It's good to discuss, even if we maintain the status quo. I think this will come to a head when Mariusz steps away. It's been him that's kept it going the last few years, and I'm not at all sure that we have another currently active contributor that's an Oracle

Fellow Reports - August 2023

2023-08-08 Thread Mariusz Felisiak
Week ending August 6, 2023 *Triaged:* https://code.djangoproject.com/ticket/34756 - Docs build failure when using Sphinx 7.1.1 (accepted) https://code.djangoproject.com/ticket/34754 - CheckConstraint with isnull lookup on JSONField transform None into null jsonb value (accepted)

Re: Disabling dark / light mode UI toggle

2023-08-07 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
You should be able to disable the button by creating an empty admin/color_theme_toggle.html template in your project. On Mon, Aug 7, 2023 at 10:28 PM Niccolò Mineo wrote: > * I haven't found a convenient way, that is. > > Il giorno lunedì 7 agosto 2023 alle 23:26:11 UTC+2 Niccolò Mineo ha >

Re: Disabling dark / light mode UI toggle

2023-08-07 Thread Niccolò Mineo
* I haven't found a convenient way, that is. Il giorno lunedì 7 agosto 2023 alle 23:26:11 UTC+2 Niccolò Mineo ha scritto: > There is a specific situation in which I wouldn't want the user to be able > to toggle between dark and light mode for the admin theme, and that is if I > heavily

Re: Adding "reason" to django.shortcuts.redirect

2023-08-07 Thread 'Lily Foote' via Django developers (Contributions to Django itself)
> it's backwards incompatible and so we cannot make the change. Any URL with a > “reason” URL parameter would no longer be resolvable. I think if we decided this feature was sufficiently worthwhile, we could find a way to overcome the backward compatibility problem (a deprecation cycle, with

Disabling dark / light mode UI toggle

2023-08-07 Thread Niccolò Mineo
There is a specific situation in which I wouldn't want the user to be able to toggle between dark and light mode for the admin theme, and that is if I heavily customized it. I haven't found a way to disable that specific toggle, so I suggest that an *AdminSite.ui_toggle* (or the like) boolean

Re: Sync and Async versions of the same function: guidelines for contributors

2023-08-07 Thread Mariusz Felisiak
I also understand that the heavy lifting in async_to_sync and sync_to_async wrapper has been implemented and the hard work like thread affinity is managed by these wrapper. Switching between sync and async context is not

Re: Sync and Async versions of the same function: guidelines for contributors

2023-08-07 Thread Olivier Tabone
Hi Jon, Thank you for your input. Le samedi 5 août 2023 à 19:43:57 UTC+2, Jon Janzen a écrit : There are a few key things missing from core django before that's possible. Some of which are laid out in that forum thread I linked above, others are listed directly in the DEP like the ORM being

Re: Sync and Async versions of the same function: guidelines for contributors

2023-08-07 Thread Olivier Tabone
Le lundi 7 août 2023 à 14:43:26 UTC+2, Lufafa Joshua a écrit : Hi there, Just a quick assumption, code duplication could be the reason why the follow parameter and the _handle_redirects method was not implemented on the AsyncClient as per the ticket #34757, if my assumption is wrong, no

Re: Adding "reason" to django.shortcuts.redirect

2023-08-07 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
This sounds reasonable, but unfortunately, it's backwards incompatible and so we cannot make the change. Any URL with a “reason” URL parameter would no longer be resolvable. You can make a project-specific shortcut function that allows providing the reason parameter. Since it’s two lines long,

Adding "reason" to django.shortcuts.redirect

2023-08-07 Thread Skrattoune
Hi, I've recently discovered the possibility to add a `reason` to a redirect. It's extremely useful for testing or debugging when a redirect to a same page can have different causes. I'm proposing to add this functionality to `django.shortcuts.redirect` : def redirect(to, *args, reason=None,

Re: Sync and Async versions of the same function: guidelines for contributors

2023-08-07 Thread Lufafa Joshua
Hi there, Just a quick assumption, code duplication could be the reason why the follow parameter and the _handle_redirects method was not implemented on the AsyncClient as per the ticket #34757, if my assumption is wrong, no big deal. Kind regards. On Sat, Aug 5, 2023 at 8:45 PM Jon Janzen

Re: Feature Request: Allow Serialize Foreign Keys as Ids

2023-08-06 Thread Ryan
Thanks. Would this just be for myself or would it be considered to merge into Django core? On Sat, Aug 5, 2023 at 9:22 PM Curtis Maloney wrote: > On Sat, 5 Aug 2023, at 06:47, Ryan Gartin wrote: > > You are correct state_id is not a field on the model, state is, and using “ > state” in the

Re: Feature Request: Allow Serialize Foreign Keys as Ids

2023-08-05 Thread Curtis Maloney
On Sat, 5 Aug 2023, at 06:47, Ryan Gartin wrote: > You are correct state_id is not a field on the model, state is, and using > “state” in the field lists works. > > I would like to propose that if ‘state_id’ is a valid property on the > queryset (and in the database) that is should be

Re: Sync and Async versions of the same function: guidelines for contributors

2023-08-05 Thread Jon Janzen
Hey there, > Not that much with a 50 lines function. that could easily become a maintenance burden. > what do you think about code duplication of async function ? (please point me to existing threads if the discussion already occurred) I flagged this problem in

Sync and Async versions of the same function: guidelines for contributors

2023-08-05 Thread Olivier Tabone
Hi all, While working on async related tickets (eg #34717, and more recently #34757) I noticed code duplication between sync and async version of same functions: some examples: (no personal offense ❤️) - acheck_password / check_password in base_user.py

Re: Feature Request: Allow Serialize Foreign Keys as Ids

2023-08-05 Thread Vansh NaiK
How toh hack account On Saturday, 5 August 2023 at 02:17:12 UTC+5:30 Ryan Gartin wrote: > You are correct state_id is not a field on the model, state is, and using “ > state” in the field lists works. > > I would like to propose that if ‘state_id’ is a valid property on the > queryset (and in

Re: Feature Request: Allow Serialize Foreign Keys as Ids

2023-08-04 Thread Ryan Gartin
You are correct state_id is not a field on the model, state is, and using “ state” in the field lists works. I would like to propose that if ‘state_id’ is a valid property on the queryset (and in the database) that is should be serialized. It is my preference that a serialized JSON property

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-04 Thread Paolo Melchiorre
Hi Mariusz, On Thu, Aug 3, 2023 at 8:47 PM Mariusz Felisiak wrote: > I'm quite surprised that you've started a new thread for something that was > already discussed, you could always add a comment to the existing thread e.g. >

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-04 Thread Carsten Fuchs
Hello, when I got started with Django more than 10 years ago, I had inherited a legacy project with an Oracle database for porting from PHP to Python. It might also have worked out well if Oracle support had been a 3rd party package, but I can say for sure that Oracle being a core feature of

Re: Feature Request: Allow Serialize Foreign Keys as Ids

2023-08-03 Thread Curtis Maloney
Hi Mike, On Fri, 4 Aug 2023, at 06:03, Ryan Gartin wrote: > I came across this issue calling the following and FK fields with _id are > ignored: > serialize('json', , fields=['title', 'state_id']). I think the problem you've run into here is "state_id" is not a Field on your model; it's

Feature Request: Allow Serialize Foreign Keys as Ids

2023-08-03 Thread Ryan Gartin
I came across this issue calling the following and FK fields with _id are ignored: serialize('json', , fields=['title', 'state_id']). State is a ForeignKey on my queryset. I can perform fields=['title', 'state'] and I get serialization correctly of {'state': int}. However, if I specify

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-03 Thread Mariusz Felisiak
Hi Paolo, I'm quite surprised that you've started a new thread for something that was already discussed, you could always add a comment to the existing thread e.g. https://groups.google.com/g/django-developers/c/dg8BUVHKOo4/m/5uFVmdWCAwAJ > I wanted to share the frustration of seeing yet

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-03 Thread Tom Carrick
I don't have a strong opinion in either direction here. I would like to point out that every database we support is a maintenance burden, however. It's an exaggeration that Oracle alone causes problems but other backends don't. For example when I was working on collations, I ran into issues with

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-03 Thread Jörg Breitbart
+1 from my side for removing oracle support from django itself. If very low usage + high maintenance burden does not qualify for feature removal, idk what does - maybe not being supportive at all. Oh wait... In the end such low usage numbers are prolly better served by a 3rd party package.

Re: Proposing the removal of Oracle from the Django supported backend databases

2023-08-03 Thread Christopher Jones
On Thu, Aug 3, 2023 at 6:26 PM Paolo Melchiorre wrote: > Hi all, > I wanted to share the frustration of seeing yet another great new ORM > feature blocked due to Oracle compatibility: > https://github.com/django/django/pull/16417 > > In the past, I too have had to put a lot of effort trying to

Proposing the removal of Oracle from the Django supported backend databases

2023-08-03 Thread Paolo Melchiorre
Hi all, I wanted to share the frustration of seeing yet another great new ORM feature blocked due to Oracle compatibility: https://github.com/django/django/pull/16417 In the past, I too have had to put a lot of effort trying to make a PR compatible with Oracle, making the overall contributing

Django bugfix release: 4.2.4

2023-08-01 Thread Natalia Bidart
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2023/aug/01/bugfix-release/ -- 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

<    1   2   3   4   5   6   7   8   9   10   >