Re: For discussion: JSON-aware views for error responses

2022-04-21 Thread Tobias Bengfort
+1 from me. On 14/04/2022 11.03, Ville Säävuori wrote: And to be clear, I understand we already have middleware APIs and various settings to handle this but my point is that I think handling this in Django core (even as an optional setting or middleware) would be most useful and right way to

Re: For discussion: JSON-aware views for error responses

2022-04-21 Thread Jacob Rief
I encountered this problem many times myself, so I'm +1 for this proposal. – Jacob -- 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

Re: Improvements to the startproject template

2022-04-21 Thread Ian Foote
I want to add that I think either proposed change here would be an improvement and that I'd prefer not to see this idea die because of bikeshedding over the best option. Regards, Ian On Thu, 21 Apr 2022 at 19:21, ome chukwuemeka wrote: > I think this is a good suggestion! > > On Thu, Apr 21,

Re: Stop QuerySet repr from executing queries

2022-04-21 Thread Ian Foote
I've been working on the Kolo debugging tool and as part of that I've also run into this issue. Generating unexpected queries when monitoring a django project was a nasty surprise. In Kolo's case I was also able to work around it with a monkeypatch, but not needing this would be a nice

Re: Improvements to the startproject template

2022-04-21 Thread 'Tobias McNulty' via Django developers (Contributions to Django itself)
Tim, Thanks for taking this on! Needless to say, I'm all in favor of including a default 'users' app. Adding one (as has long been recommended by the docs) is a task best automated. I've definitely had the "no the other folder" conversation more than enough times myself. Personally I think I

Re: Stop QuerySet repr from executing queries

2022-04-21 Thread 'Kevin Weaver' via Django developers (Contributions to Django itself)
I know this thread is more than a year old, but I was just bitten by this as well. We use the Elastic APM Python agent which, like Sentry, calls `repr()` on local variables that it sends as part of stack traces. We use Django REST Framework

Re: Improvements to the startproject template

2022-04-21 Thread ome chukwuemeka
I think this is a good suggestion! On Thu, Apr 21, 2022, 7:08 PM Albert wrote: > It is possible to do in current version of Django with two lines of code: > > mkdir my_project > > django-admin startproject config my_project > > I have been working for many companies that use Django and I have

Re: Improvements to the startproject template

2022-04-21 Thread Hazho Human
Great one, my all support for this On Tuesday, 19 April 2022 at 04:02:02 UTC+8 pyt...@ian.feete.org wrote: > Hi Tim, > > This feels like a good idea to me. > > Regards, > Ian > > On Mon, 18 Apr 2022 at 18:17, Tim Allen wrote: > >> Greetings, friends! >> >> I've issued a PR that makes two

For discussion: JSON-aware views for error responses

2022-04-21 Thread Ville Säävuori
Hello Django devs! I'm a long time Django user and nowadays work with sites where Django is mostly or only an API for the front end. I'm assuming this is not an exotic use case in 2022. One pain point I continue to come across over and over again is that Django by default only speaks

Re: Improvements to the startproject template

2022-04-21 Thread Albert
It is possible to do in current version of Django with two lines of code:mkdir my_projectdjango-admin startproject config my_projectI have been working for many companies that use Django and I have seen that each ot them has their own structure of project. And usually project is created once

Re: Improvements to the startproject template

2022-04-21 Thread Sandro Covo
As there are different preferences and some see the change as worse than the default and there is already a way to change the template for startproject, wouldn't it be easier to provide different templates and list them in the documentation, so that they can be used with the --template

Re: Improvements to the startproject template

2022-04-21 Thread Adrian Torres Justo
I personally dislike Adam's suggestion and feel like it makes it worse than the current default, but to each their own. I do prefer the proposed solution of the config directory, I am working on two django projects in parallel and one follows the proposed config scheme and the other doesn't