Re: select_related() for fetching individual fields

2018-01-29 Thread Adam Johnson
> > -- listing explicitly the fields in defer/only clauses is not smart, as > the queries have to be updated every time the current or related model > change Not with the snippet I shared -- I want to have efficient SQL In my experience, it's rarely the case that only()/defer() make a noticeab

Re: Behavior of ModelAdmin.fieldsets with 'classes': ('collapse',) when fieldset name is None.

2018-01-29 Thread Adam Johnson
> > * If you agree that it needs to be fixed, just showing the (Show) link, > would suffice? +1 from me, seems like the straightforward solution On 28 January 2018 at 22:45, Douglas Miranda wrote: > Hello, I don't know if this was debated before, but I think the behavior > of Collapsed fieldse

Re: Bug in utils.encoding producing invalid JSON for request body

2018-01-29 Thread Adam Johnson
Sorry, replying on ticket. On 29 January 2018 at 16:53, Nick Sarbicki wrote: > There's been a longer discussion on the ticket about this. The point you > raise I agree with. I also think _encode_data should be left alone. > > I still think this should be in framework instead of having to subclas

Re: Bug in utils.encoding producing invalid JSON for request body

2018-01-29 Thread Nick Sarbicki
There's been a longer discussion on the ticket about this. The point you raise I agree with. I also think _encode_data should be left alone. I still think this should be in framework instead of having to subclass RequestFactory. Passing in a dict as data should not give invalid JSON. Instead it w

Re: Bug in utils.encoding producing invalid JSON for request body

2018-01-29 Thread Adam Johnson
> > the JSON it produces (it does try) > I wouldn't say it "tries", it just calls str on any object that is passed in, which for a simple dict with strings in, looks close to JSON. force_bytes definitely shouldn't be trying to JSON-coerce things. Thus I don't think it's a bug. Bugs are when behav

Re: DJANGO ET BASE DE DONNEES

2018-01-29 Thread Claude Paroz
Bonjour Alphonse, Cette liste de discussion n'utilise que l'anglais et est dédiée au développement de Django lui-même. La liste francophone se trouve ici : https://lists.afpy.org/mailman/listinfo/django Cordialement. Claude Le lundi 29 janvier 2018 14:52:27 UTC+1, Alphonse Aka a écrit : > > Sa

Bug in utils.encoding producing invalid JSON for request body

2018-01-29 Thread Nick Sarbicki
I've just posted a ticket for this here: https://code.djangoproject.com/ticket/29082#ticket The general point is that when I'm using RequestFactory and making a post request with a JSON body, I'd expect to be able to pass in a dict for this - but I can't as the JSON it produces (it does try) is

DJANGO ET BASE DE DONNEES

2018-01-29 Thread Alphonse Aka
Salut les membres de Django Developpers , je me nomme Alphonse Aka , je vis en côte d'ivoire , je suis un développeur en python-Django et je me suis inscrit aujourd'hui sur votre site pour devenir membre de Django Developpers et bénéficier aussi de votre conseils et aussi de votre aid

Missing one-to-one relation between MultiValueField fields and MultiWidget widgets

2018-01-29 Thread Vlastimil Zíma
Hi, I've been playing around with a field and widget for phone number having two, prefix and subscriber, inputs. I've noticed some HTML attributes, such as maxlength, which the widgets normally have, get lost in the MultiValueField/MultiWidget interface. The MultiValueField contains two parts

Re: select_related() for fetching individual fields

2018-01-29 Thread Дилян Палаузов
Hello Adam, my use case is: -- because on post_save signal the F object is serialized, all fields have to be fetched in advance, otherwise the serializer does a separate SQL for each uncached field -- listing explicitly the fields in defer/only clauses is not smart, as the queries have to be u

Re: Add slicing notation to F expressions

2018-01-29 Thread askpriyansh
Hello ! I went through the conversation. Does the ticket #29049 looks to add this feature, building over the work done in PR #9583 ? Regards Priyansh -- You received this message because you are subscribed to the Google Groups "Django developers