Re: django3.2---bug win10

2021-04-25 Thread Jason
that's not a bug.  Look at the two inputs in your terminal.  First one 
starts with a `>`, looks like you copied it verbatim.

`>>>` is convention for terminal prompt

On Sunday, April 25, 2021 at 10:37:59 AM UTC-4 cqwuxi...@gmail.com wrote:

>
> [image: QQ截图20210425220126.png][image: QQ截图20210425220229.png]

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/28499ffb-86ee-448b-9dba-6ab363a909ddn%40googlegroups.com.


Connect Django authentication to windows ldap/windows active directory

2021-04-25 Thread Swelan Auguste
I'm trying to connect my Django applications to ldap/windows active
directory.

Can anyone help me.

Thankfully,

Swelan R. Auguste (Mr.)
KingShip
Technical - Information Officer
758-729-5289
https://KingShip.business.site/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKj-cefDXk2M0gbWF9Om7A8epk554waXCEoDFRP6BgFJzt0Cpw%40mail.gmail.com.


Racing condition with pre_delete

2021-04-25 Thread Sebastian Haase
I often run into a bug when the client triggers multiple http requests 
resulting each in a delete.
My objects have a „sibling index“ field, where I use pre_delete to update 
all siblings „above“ to lower their index by 1 (using update with an 
F-expression).
Any idea why this would not work reliably? I use Postgres as db-backend.
Thx, Sebastian.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fb39c2d8-a89d-4e4e-986a-081805b96d1fn%40googlegroups.com.


Re: Validate group of fields

2021-04-25 Thread Derek
The docs cover this use case:

https://docs.djangoproject.com/en/3.2/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other

On Saturday, 24 April 2021 at 19:57:50 UTC+2 robert...@gmail.com wrote:

>
>
> Hello guys!
>
> I've 3 fields, but I need validate it as a group, Ej:
>
> adults = forms.IntegerField(initial=0)
> kids = forms.IntegerField(initial=0)
> students = forms.IntegerField(initial=0)
>
> The Idea is to validate it as a group, not sure if that makes sense or if 
> I need custom validation for that fields
>
> Thanks,
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9f3c6f53-7afc-428c-80be-86d06a7f02c1n%40googlegroups.com.


Re: How to save a result of multiplication

2021-04-25 Thread Derek
I think you have used the wrong name - "saveit" instead of "save" - also 
have a look at the example in the docs:
https://docs.djangoproject.com/en/3.2/topics/db/models/#overriding-predefined-model-methods
and see which parameters are needed for it.

On Saturday, 24 April 2021 at 20:50:15 UTC+2 encinas...@gmail.com wrote:

> Hi everyone i build a web application in Django 3.1.7 and i try to do the 
> next opeation(multiplication).
>
> in my models a have:
> class Articles(models.Model):
>  quantity = models.PositiveIntegerField()
> cost_buy = models.DecimalField(max_digits=10, decimal_places=2)
> total_todo = models.DecimalField(max_digits=10, decimal_places=3)
>
> @property
> def total_valores(self):
>  return (self.cost_buy*self.quantity)
>
> def saveit(self):
> self.total_todo = self.total_valores
> super (Articles, self).save()
> __
>
> so, I was tried with this functions , but it's doesn't save anything
>
> would you give me some recomendations.
>
> Thank you very much in advance and I remain at your service regards 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fb9b6d0f-18b6-4771-b812-a0644cb03806n%40googlegroups.com.