Re: Request for closing #25139 -- ModelFormSet: allow swapping unique values

2019-08-15 Thread PARTH PATIL
Yup sounds right. 

On Thursday, August 15, 2019 at 3:13:23 PM UTC+5:30, Carlton Gibson wrote:
>
> Hi Parth. 
>
> Thanks for looking at this. I think you're right that there's no (suitably 
> obvious at least to me) simple way of solving this. I guess that's why it's 
> sat there for 4 years. 
>
> What would it take: fetching the set of to_be_unique values and comparing 
> it to the set of values submitted and then assigning both within a 
> transaction... — meh, possible but I'm not sure it'd be clean, or something 
> we'd want to bundle in even if we had the solution available, vs, putting 
> it in a third-party package...
>
> Anyhow, I'll bump it to Someday/Maybe for now. If someone pops up with a 
> solution we can look at that then. 
>
> Kind Regards,
>
> Carlton
>
>
> On Sunday, 11 August 2019 09:20:49 UTC+2, PARTH PATIL wrote:
>>
>> Hey can someone please have look at this ticket, I feel the requested 
>> feature is not really feasible to implement, also it's not applicable in 
>> the general case.
>>
>> I don't think so this is feasible, this will require n(n-1)/2 comparisons 
>> to determine whether any two of the models are swapped.
>> This looks easy in the above case but won't be a good idea for a general 
>> case.
>>
>> Correct me if I'm wrong or if anyone has a better approach for 
>> implementation of this feature. I would like to work on it.
>>
>> But as of now, I feel this ticket should be closed
>>
>>
>> Here is a link to the ticket 
>> 
>>
>

-- 
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 an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/7892adb1-908c-4cb3-b059-ba8454982f26%40googlegroups.com.


Re: Request for closing #25139 -- ModelFormSet: allow swapping unique values

2019-08-15 Thread Carlton Gibson
Hi Parth. 

Thanks for looking at this. I think you're right that there's no (suitably 
obvious at least to me) simple way of solving this. I guess that's why it's 
sat there for 4 years. 

What would it take: fetching the set of to_be_unique values and comparing 
it to the set of values submitted and then assigning both within a 
transaction... — meh, possible but I'm not sure it'd be clean, or something 
we'd want to bundle in even if we had the solution available, vs, putting 
it in a third-party package...

Anyhow, I'll bump it to Someday/Maybe for now. If someone pops up with a 
solution we can look at that then. 

Kind Regards,

Carlton


On Sunday, 11 August 2019 09:20:49 UTC+2, PARTH PATIL wrote:
>
> Hey can someone please have look at this ticket, I feel the requested 
> feature is not really feasible to implement, also it's not applicable in 
> the general case.
>
> I don't think so this is feasible, this will require n(n-1)/2 comparisons 
> to determine whether any two of the models are swapped.
> This looks easy in the above case but won't be a good idea for a general 
> case.
>
> Correct me if I'm wrong or if anyone has a better approach for 
> implementation of this feature. I would like to work on it.
>
> But as of now, I feel this ticket should be closed
>
>
> Here is a link to the ticket 
>

-- 
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 an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b0cce1d6-0f9d-44be-8c2f-a37a9f3755ed%40googlegroups.com.


Request for closing #25139 -- ModelFormSet: allow swapping unique values

2019-08-11 Thread PARTH PATIL
Hey can someone please have look at this ticket, I feel the requested 
feature is not really feasible to implement, also it's not applicable in 
the general case.

I don't think so this is feasible, this will require n(n-1)/2 comparisons 
to determine whether any two of the models are swapped.
This looks easy in the above case but won't be a good idea for a general 
case.

Correct me if I'm wrong or if anyone has a better approach for 
implementation of this feature. I would like to work on it.

But as of now, I feel this ticket should be closed


Here is a link to the ticket 

-- 
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 an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/61c73eca-c618-4c11-b5e6-6feaf407e8e6%40googlegroups.com.