Re: [Looking for feedback] Make Admin raw_id_fields the default choice for FKs, or project-wide configurable

2019-01-18 Thread Carlton Gibson
> On 18 Jan 2019, at 17:20, Santiago Basulto wrote: > > Seems like everybody agrees that for large sites, it's necessary. Hang on, slow down.  Personally, I’m not sure it’s too onerous as-is. I’ve not yet seen exactly why subclassing ModelAdmin in one’s project isn’t good enough. It really

Re: What do you think about unify templates feature?

2019-01-18 Thread Jani Tiainen
Hi, You said that this doesn't require any change in Django at all. So this doesn't need to be in Django at all, it can survive as its own and that way it should be. So make your enhancement as reusable app and release it to public. Get people to use it. Fix the bugs that appears. Write a good

Re: Add support for filter arguments in queryset.exists() and queryset.count()

2019-01-18 Thread Maciek Olko
Dear Sjoerd, dear all, My thoughts: * on one hand it feels natural to simplify calls and keep things simple, from this perspective +1; * on the other I can imagine new Django user that gets confused by inconsistency in code snippets or StackOverflow: you can now filter not only using filter() or

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
I reply beetween lines, El vie., 18 ene. 2019 a las 21:25, Jani Tiainen () escribió: > Hi, > > Lets try this again. > > Your system could be nice if it really helps rendering speed. > Yes we get several miliseconds per request. > > But does it require changes in Django core itself, or is it

Add support for filter arguments in queryset.exists() and queryset.count()

2019-01-18 Thread Sjoerd Job Postmus
Dear all, This is probably a feature that has been proposed before, but I could not find a discussion on it, so I proposed it on the tracker, and Tim also couldn't find a discussion. (ticket: https://code.djangoproject.com/ticket/30118 ) I would like to propose being able to write

Re: What do you think about unify templates feature?

2019-01-18 Thread Jani Tiainen
Hi, Lets try this again. Your system could be nice if it really helps rendering speed. But does it require changes in Django core itself, or is it completely standalone package that doesn't require changing Django itself to operate? If it requires changes in Django itself, it would be useful to

Re: bulk_update: add **exclude** arg

2019-01-18 Thread Tom Forbes
Hey Mohammad, Thanks for your suggestion. I considered this while implementing bulk update but I decided against it. In my opinion you should be very explicit about the fields you wish to update, due to the way that bulk update works it can generate very large and expensive queries if a lot of

bulk_update: add **exclude** arg

2019-01-18 Thread Mohammad Etemaddar
Dear Django developers, Thank you very much for great work and team-work on our beloved Django. I suddenly saw the new great feature *bulk_update *for models and so updated to the dev branch. As other similar situations like forms, we have exclude argument for *lazy programmers.* *Thank you,*

Re: [Looking for feedback] Make Admin raw_id_fields the default choice for FKs, or project-wide configurable

2019-01-18 Thread Santiago Basulto
@Harro, it does work if the field is not part of the admin. It doesn't add the way to link it directly, but it does resolve the problem of prefetching a list and building the large select field. Here's an quick example: https://i.imgur.com/uNRPCK6.png (the Country field is a FK and doesn't

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
Sorry, I reply beetween lines El vie., 18 ene. 2019 16:32, J. Pablo Martín Cobos escribió: > Hi another time, > > I am tring to reply every people in this email: > > Josh > > I was not using django.template.loaders.cached.Loader, but the result are > very similar i.e: > > App Template Num

Re: [Looking for feedback] Make Admin raw_id_fields the default choice for FKs, or project-wide configurable

2019-01-18 Thread Collin Anderson
> > One problem with any of the alternatives (besides making it readonly by default) is that it requires the other model to be registered in the admin > Off-hand I don't follow you here. Can you explain. I stand corrected. raw_id_fields doesn't actually require the other model to be registered.

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
Hi another time, I am tring to reply every people in this email: Josh I was not using django.template.loaders.cached.Loader, but the result are very similar i.e: App Template Num templates rendered before unify Num templates rendered after unify AVG Time render template before unify (ms) AVG

Re: What do you think about unify templates feature?

2019-01-18 Thread Jani Tiainen
Hi. Does this require changes to django internals or can it work as an external package? Also you should release it as a package so people can start using it, also preferably releasing it with BSD license like Django itself is. Otherwise there are very little chances that your solution would

Re: [Looking for feedback] Make Admin raw_id_fields the default choice for FKs, or project-wide configurable

2019-01-18 Thread Harro
The problem is that you can't just use it everywhere, like mentioned earlier it only works if the other side of the relation is also available in the admin (which might not be the case, or only for some of the fields.) I would say add it to the good old djangosnippets

Re: What do you think about unify templates feature?

2019-01-18 Thread Pavlos Georgiadis
Hi, I guess the reason you wrote to this list about your unify command, is because you don't mind contributing it to the django project. So maybe you could show the code of this command, so people can understand what improvements it can offer. I am not sure I understood anything so far. Are you

Re: [Looking for feedback] Make Admin raw_id_fields the default choice for FKs, or project-wide configurable

2019-01-18 Thread Josh Smeaton
If we were happy with that particular implementation, then I'd prefer adding it as an official subclass thats importable for users rather than just dumping the code to the docs. But I guess the issue is a slippery slope - how many subclasses do we add for various ModelAdmin use cases. It's

Re: What do you think about unify templates feature?

2019-01-18 Thread Josh Smeaton
Are you using https://docs.djangoproject.com/en/2.1/ref/templates/api/#django.template.loaders.cached.Loader in your tests? And you should find a way to test rendering from the command line, which will allow you to get much better timing information. On Friday, 18 January 2019 20:40:29

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
I answer between lines El vie., 18 ene. 2019 a las 5:03, shiva kumar (< kannamshivakumar...@gmail.com>) escribió: > Could you please explain about it. I hadn't understood ur idea. > 1. Currently: with you render a view, this render a template. But usually, this template extends of

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
I answer between lines El jue., 17 ene. 2019 a las 18:42, Maciek Olko () escribió: > Did you try to measure the difference in time of rendering standard and > your way? > > Yes. I have several examples: App Template Num templates rendered before unify Num templates rendered after unify Time