Re: Django Video Conferencing-Reg

2020-04-06 Thread carlos
https://djangopackages.org/

On Mon, Apr 6, 2020 at 9:28 PM Sai Pavan Kumar  wrote:

> Hi All,
>Can any one suggest me for django based video conferencing package.
>
> --
> *Regards,*
>
> *SaiPavan Thirupathi*
>
> --
> 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/CAFJPbobo8ynEQ%2BiLj%3DVW_XStcvWECe0r4O6yo0faVb%3DTUATnDQ%40mail.gmail.com
> 
> .
>


-- 
att.
Carlos Rocha

-- 
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/CAM-7rO00zNcd4Jw9qj%2BKr%2BrovYGKZ8%3DGr4ad1xRttkzQcoW99g%40mail.gmail.com.


Django Video Conferencing-Reg

2020-04-06 Thread Sai Pavan Kumar
Hi All,
   Can any one suggest me for django based video conferencing package.

-- 
*Regards,*

*SaiPavan Thirupathi*

-- 
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/CAFJPbobo8ynEQ%2BiLj%3DVW_XStcvWECe0r4O6yo0faVb%3DTUATnDQ%40mail.gmail.com.


Re: Web/Mobile Push Notifications For Django

2020-04-06 Thread VenkataSivaRamiReddy
I hope this one help to you.
https://github.com/jazzband/django-push-notifications/blob/master/README.rst

One you done, please le me know

On Tue, Apr 7, 2020, 01:57 Kayode Oladipo  wrote:

> Hello everyone,
>
> I currently have a need to add push notifications to a website powered by
> Django.
> How would I go about this?
>
> I'll appreciate any help.
>
> 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/CA%2BARzD9%3DfsgtkJk5QONaMX1tzf%3DXtTJTGf%2Babu7%2BiaSDGshqpQ%40mail.gmail.com
> 
> .
>

-- 
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/CAGiJVX3Pd%2Bcd%3DMTcdMRkvc9XGAHKdpev21ARqjjxDgy1VGXOkw%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-06 Thread VenkataSivaRamiReddy
Hi,

I am interested on this project, I hope I am the right person to you and i
hope you get back to me soon.thank you sir

On Sun, Mar 29, 2020, 23:26 Lax Nayak  wrote:

> I am looking for a django developer who has expertise in building
> enterprise grade solutions.
>
>
> --
> 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/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
> 
> .
>

-- 
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/CAGiJVX1j3feRh3s-H5LX3YrY2GOX%2BxkSmS_s%2Bzmi6x%2BvpoXFnw%40mail.gmail.com.


Re: ""Save" method throws duplicate key value violates unique constraint

2020-04-06 Thread VenkataSivaRamiReddy
Use in place of one to one model field place foreign key field

On Tue, Apr 7, 2020, 05:15 Menaga Gopal  wrote:

>
>
>
>
> Hello,
>
> I have 2 tables:
>
> 1) CustomUser table
>  - Id
>  - Email
>  - Name
>
> 2) UserProperties table
>  - id
>  - user (foreign key with one to one relationship)
>  - address
>  - payment_details
>
>
>   -  have mapped one to one relationship for the field "user" in the
> UserProperties table as below.
>
> user = models.OneToOneField(CustomUser, on_delete= models.CASCADE)
>
>   - Below is my view.py. When I try to save the user profile, the data is
> saved for the very first time (ie., when there is no such record for the
> user in the Userproperties table. However when I try to update the same
> user profile I get Integrity error.
>
> IntegrityError at /users/profile
>
> duplicate key value violates unique constraint 
> "users_userproperties_user_id_key"
> DETAIL:  Key (user_id)=(4) already exists.
>
>
>
> @login_required
> def profile(request):
> if request.method == 'POST':
> profile_form = UserProfileForm(request.POST)
> if profile_form.is_valid():
> profile = profile_form.save(commit=False)
> profile.user = request.user
> profile.save()
> messages.success(request, f'Your Profile has been updated.')
> return redirect('profile')
> else:
> profile_form = UserProfileForm()
> return render(request,'profile.html',{'profile_form': profile_form})
>
> I am new to django, please help me solve this issue.
>
>
> Thanks in advance.
>
>
>
> --
> 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/580f2a57-eda2-49f9-b42c-b9885ffd82f8%40googlegroups.com
> 
> .
>

-- 
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/CAGiJVX0JbkDzk_M1fMgRntmw7%2Bkz%3D2X_%3D4Ts%2BgNm46oqoduooA%40mail.gmail.com.


Re: Singup Users

2020-04-06 Thread Lutalo Bbosa joseph
U can read about the @login_required decorator in django and for
redirecting its about handling the actions in the form with the url

On Tue, Apr 7, 2020, 4:09 AM hajar Benjat  wrote:

> hello django users how are you ?
>
> I have two questions !!
>
> how can I make users who sign up in my application to not log in without
> admin permission ,
>
> now the user can sign up and log in directly and I don't want that happen
> in my application without admin permission , I hope you guys can advice me.
>
> second question is ; the user when he click on logout he is redirected to
> login again as administrator , I know u have faced it before , I hope you
> can give me some ideas about this to make the user back to my login form
> not the admin one.
>
> thanks in advance ,
>
>
>
>
> --
> 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/c6580d60-d64d-4a7f-84b0-327c387df8f1%40googlegroups.com
> 
> .
>

-- 
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/CAMz%3Dh%3DRPKMVDBKf30zmb7GxxR3kG9S5Qv4ZaH164TLp8MGqpWg%40mail.gmail.com.


Singup Users

2020-04-06 Thread hajar Benjat
hello django users how are you ?

I have two questions !!

how can I make users who sign up in my application to not log in without 
admin permission , 

now the user can sign up and log in directly and I don't want that happen 
in my application without admin permission , I hope you guys can advice me.

second question is ; the user when he click on logout he is redirected to 
login again as administrator , I know u have faced it before , I hope you 
can give me some ideas about this to make the user back to my login form 
not the admin one.

thanks in advance , 




-- 
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/c6580d60-d64d-4a7f-84b0-327c387df8f1%40googlegroups.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-06 Thread Ammar M. Adam
Ok, I'll do the jop
Just pm me in WhatsApp : +249905599319
On 29 Mar 2020 7:57 pm, "Lax Nayak"  wrote:

> I am looking for a django developer who has expertise in building
> enterprise grade solutions.
>
>
> --
> 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/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
> 
> .
>

-- 
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/CAHs1H7tJCMNBE2QK7A08FM%3D0u%3DDOs-L8Xd7Le16HfHCS0t6h8w%40mail.gmail.com.


""Save" method throws duplicate key value violates unique constraint

2020-04-06 Thread Menaga Gopal




Hello,

I have 2 tables:

1) CustomUser table
 - Id 
 - Email
 - Name

2) UserProperties table
 - id
 - user (foreign key with one to one relationship)
 - address
 - payment_details


  -  have mapped one to one relationship for the field "user" in the 
UserProperties table as below.

user = models.OneToOneField(CustomUser, on_delete= models.CASCADE)

  - Below is my view.py. When I try to save the user profile, the data is 
saved for the very first time (ie., when there is no such record for the 
user in the Userproperties table. However when I try to update the same 
user profile I get Integrity error.

IntegrityError at /users/profile

duplicate key value violates unique constraint 
"users_userproperties_user_id_key"
DETAIL:  Key (user_id)=(4) already exists.



@login_required
def profile(request):
if request.method == 'POST':
profile_form = UserProfileForm(request.POST)
if profile_form.is_valid():
profile = profile_form.save(commit=False) 
profile.user = request.user
profile.save()
messages.success(request, f'Your Profile has been updated.')
return redirect('profile')
else:
profile_form = UserProfileForm()
return render(request,'profile.html',{'profile_form': profile_form})

I am new to django, please help me solve this issue.


Thanks in advance.



-- 
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/580f2a57-eda2-49f9-b42c-b9885ffd82f8%40googlegroups.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-06 Thread Motaz Hejaze
Where is the post owner ???

Why you make a request and did not answer the people who show interest ??

Why you dont say the status of this post ..

On Mon, 6 Apr 2020, 11:31 pm Julio Henrique Oliveira, 
wrote:

> Hi,
>
> I'd like to know more about this job. I am available.
>
> Best Regards
> --
>
> *Júlio Henrique de OliveiraItapeva - SP*
>
>
> Em dom., 29 de mar. de 2020 às 14:57, Lax Nayak 
> escreveu:
>
>> I am looking for a django developer who has expertise in building
>> enterprise grade solutions.
>>
>>
>> --
>> 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/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
>> 
>> .
>>
> --
> 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/CAAhYsTyT0XH%2BAv-s4%2Bhk0JwhbG%2B3U0MjDcUxazYxP%3DPe3SwynQ%40mail.gmail.com
> 
> .
>

-- 
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/CAHV4E-cZiRaAd6Tt1Zb5ewhVan27CoZ7MX1pHPoOeOhD6ZN1cQ%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-06 Thread Julio Henrique Oliveira
Hi,

I'd like to know more about this job. I am available.

Best Regards
--

*Júlio Henrique de OliveiraItapeva - SP*


Em dom., 29 de mar. de 2020 às 14:57, Lax Nayak 
escreveu:

> I am looking for a django developer who has expertise in building
> enterprise grade solutions.
>
>
> --
> 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/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
> 
> .
>

-- 
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/CAAhYsTyT0XH%2BAv-s4%2Bhk0JwhbG%2B3U0MjDcUxazYxP%3DPe3SwynQ%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-06 Thread FLAVIEN HERI
Hi lax I'm so interested having I termediate experience python and in
djando application , leaflet libraries, Java script and html

On Mon, Apr 6, 2020, 9:48 PM developer panther 
wrote:

> Hi lax ,
>
> I am interested ,
> yes i have expertise in building enterprise grade solutions
> have worked on multiple django projects like ERP solutions,Hrms, Etask
> ,Ticketing tools ,
> twitter sentiment analysis tool with django, Video streaming platform with
> premium features ,PMS,
> stock management system,food delivery app like swiggy,digital health
> system,
> if you interested in my profile do let me know
>
>
> do visit my linked in profile
> https://www.linkedin.com/in/abhisek-singh-952738b8/
>
> thanks and regards
> Abhisek
>
> On Sun, Mar 29, 2020 at 11:27 PM Lax Nayak  wrote:
>
>> I am looking for a django developer who has expertise in building
>> enterprise grade solutions.
>>
>>
>> --
>> 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/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
>> 
>> .
>>
> --
> 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/CADtqY_A6RzPyyOhTdKh3YCOq4x_4Q29eB1G2qi-FD5SdsTq6zA%40mail.gmail.com
> 
> .
>

-- 
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/CAG3GEnyUciBO2cQUyXg6PFLGp1JXVbdEHO0NAAgLegScapa0%2Bg%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-06 Thread developer panther
Hi lax ,

I am interested ,
yes i have expertise in building enterprise grade solutions
have worked on multiple django projects like ERP solutions,Hrms, Etask
,Ticketing tools ,
twitter sentiment analysis tool with django, Video streaming platform with
premium features ,PMS,
stock management system,food delivery app like swiggy,digital health system,
if you interested in my profile do let me know


do visit my linked in profile
https://www.linkedin.com/in/abhisek-singh-952738b8/

thanks and regards
Abhisek

On Sun, Mar 29, 2020 at 11:27 PM Lax Nayak  wrote:

> I am looking for a django developer who has expertise in building
> enterprise grade solutions.
>
>
> --
> 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/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
> 
> .
>

-- 
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/CADtqY_A6RzPyyOhTdKh3YCOq4x_4Q29eB1G2qi-FD5SdsTq6zA%40mail.gmail.com.


Web/Mobile Push Notifications For Django

2020-04-06 Thread Kayode Oladipo
Hello everyone,

I currently have a need to add push notifications to a website powered by
Django.
How would I go about this?

I'll appreciate any help.

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/CA%2BARzD9%3DfsgtkJk5QONaMX1tzf%3DXtTJTGf%2Babu7%2BiaSDGshqpQ%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-06 Thread Chuck
 Yes, I am interested too, I had created a blog site using Django, please refer 
it on the GitHub site here:ychuckt8/cy_django_site_2

| 
| 
| 
|  |  |

 |

 |
| 
|  | 
ychuckt8/cy_django_site_2

CY Blog using Django. Contribute to ychuckt8/cy_django_site_2 development by 
creating an account on GitHub.
 |

 |

 |






Thanks,Chuck
On Monday, April 6, 2020, 11:16:51 AM PDT, Appu Yadav 
 wrote:  
 
 yes i am interested
On Tue, Mar 31, 2020 at 8:28 PM chander shekhar  wrote:

Yes sir I am also interested,I am quite new to it,But curious to learn a lot 
from you guys
On Tue, Mar 31, 2020, 8:16 PM Saswat Ray  wrote:

Hi,Interested.
Thanks,Saswat
https://www.linkedin.com/in/saswat-ray-27313316/
https://www.quora.com/profile/Saswat-Ray



On Tue, Mar 31, 2020 at 7:10 PM Juan J. Moreno Piña 
 wrote:

available now, I'm located remoteJuan
Teaching to learn 
Trading to survive
*M.Sc. Juan J. Moreno*
En Venezuela (Maracaibo)
Skype:studiom2j
Tel (Italy): +39 02320628565






El lun., 30 de mar. de 2020 a la(s) 07:56, Satish Pal (satishpal...@gmail.com) 
escribió:

Hi 

I have total of 2 years of experience and I am interested to join your team.
please check my Linkedin profile 
https://www.linkedin.com/in/satish-kumar-2230b3158/

Thanks in Advance.
On Mon, Mar 30, 2020 at 8:51 AM Phako Perez <13.phak...@gmail.com> wrote:

Hi,
I’m also interested to join your team, have 3+ years working with python 
Currently I’m teaching python to a group in order them to improve theirs career 
Thanks in advance 

Sent from my iPhone

On 29 Mar 2020, at 20:48, chinna  wrote:



Hi,
I am Premkumar having 3 years of experience in web and rest api development 
using python and Django. I would like to join your team
On Sun, Mar 29, 2020 at 11:26 PM Lax Nayak  wrote:

I am looking for a django developer who has expertise in building enterprise 
grade solutions. 



-- 
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/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com.



-- 
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/CAG%3DmdoCaGy%3DTWh0CY04_TBo8uG__4UWnd8sfWYLOZ8fapfZ%3DCA%40mail.gmail.com.



-- 
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/5C30197E-FCE7-4BE8-B169-4E9E74F4EBF3%40gmail.com.



-- 
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/CALzNJXmFb3cSFpEmYs2yB502x%2BB9DtNkDT_L2hqxvmvTPx08jA%40mail.gmail.com.



-- 
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/CAMf5KvxLjfvMEPJZ6j3PTruMpho34FOW3HaLOECfbkGQFV%2B6zA%40mail.gmail.com.



-- 
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/CAEhPkLFtrnrw39q6jP5R536BzbivfbE8KTOHjjyaJzbdSUG1WA%40mail.gmail.com.



-- 
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/CAAmOWVwzWwf6bHedvCBw7bnSBy77rM%2BdMT7D72jZszLDTnBLGw%40mail.gmail.com.



-- 
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/CAF_eevcuoySCdbWW0GZhaj_-gc%2B_4ss6paQhV4eMc%2B2DY6mKZw%40mail.gmail.com.
  

-- 
You received this 

Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-06 Thread Rishabh Dahale
Hi. I'm also interested.
I'm new to django but curious to learn a lot from u guys.

Thanks,
Rishabh

On Mon, 6 Apr 2020 at 23:47, Appu Yadav  wrote:

> yes i am interested
>
> On Tue, Mar 31, 2020 at 8:28 PM chander shekhar 
> wrote:
>
>> Yes sir I am also interested,
>> I am quite new to it,
>> But curious to learn a lot from you guys
>>
>> On Tue, Mar 31, 2020, 8:16 PM Saswat Ray  wrote:
>>
>>> Hi,
>>> Interested.
>>>
>>> *Thanks*,
>>> *Saswat*
>>>
>>> https://www.linkedin.com/in/saswat-ray-27313316/
>>> https://www.quora.com/profile/Saswat-Ray
>>>
>>>
>>>
>>> On Tue, Mar 31, 2020 at 7:10 PM Juan J. Moreno Piña <
>>> prof.juanj.mor...@gmail.com> wrote:
>>>
 available now, I'm located remote
 Juan

 *Teaching to learn *
 *Trading to survive*
 *M.Sc. Juan J. Moreno*
 En Venezuela (Maracaibo)
 Skype:studiom2j
 Tel (Italy): +39 02320628565






 El lun., 30 de mar. de 2020 a la(s) 07:56, Satish Pal (
 satishpal...@gmail.com) escribió:

> Hi
>
> I have total of 2 years of experience and I am interested to join your
> team.
> please check my Linkedin profile
> https://www.linkedin.com/in/satish-kumar-2230b3158/
>
> Thanks in Advance.
>
> On Mon, Mar 30, 2020 at 8:51 AM Phako Perez <13.phak...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I’m also interested to join your team, have 3+ years working with
>> python
>> Currently I’m teaching python to a group in order them to improve
>> theirs career
>>
>> Thanks in advance
>>
>> Sent from my iPhone
>>
>> On 29 Mar 2020, at 20:48, chinna 
>> wrote:
>>
>> 
>> Hi,
>>
>> I am Premkumar having 3 years of experience in web and rest api
>> development using python and Django. I would like to join your team
>>
>> On Sun, Mar 29, 2020 at 11:26 PM Lax Nayak 
>> wrote:
>>
>>> I am looking for a django developer who has expertise in building
>>> enterprise grade solutions.
>>>
>>>
>>> --
>>> 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/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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/CAG%3DmdoCaGy%3DTWh0CY04_TBo8uG__4UWnd8sfWYLOZ8fapfZ%3DCA%40mail.gmail.com
>> 
>> .
>>
>> --
>> 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/5C30197E-FCE7-4BE8-B169-4E9E74F4EBF3%40gmail.com
>> 
>> .
>>
> --
> 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/CALzNJXmFb3cSFpEmYs2yB502x%2BB9DtNkDT_L2hqxvmvTPx08jA%40mail.gmail.com
> 
> .
>
 --
 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/CAMf5KvxLjfvMEPJZ6j3PTruMpho34FOW3HaLOECfbkGQFV%2B6zA%40mail.gmail.com
 

Re: Help passing the url

2020-04-06 Thread Luka Nik
How do I pass it exactly?

On Mon, 6 Apr 2020, 9:41 pm ola neat,  wrote:

> You need to add the id as argument in the function
>
> On Mon, Apr 6, 2020, 19:17 Luka Nik  wrote:
>
>> How can I alter this post_detail function:
>>
>>
>> def post_detail(request):
>>
>> post = get_object_or_404(Post)
>> comments = post.comments.filter(active=True)
>> new_comment = None
>> if request.method == 'POST':
>> comment_form = CommentForm(data=request.POST)
>> if comment_form.is_valid():
>> new_comment = comment_form.save(commit=False)
>> new_comment.post = post
>> new_comment.save()
>> else:
>> comment_form = CommentForm()
>>
>> return render(request, 'blog/post_detail.html', {'post': post,
>>  'comments': comments,
>>  'new_comment': 
>> new_comment,
>>  'comment_form': 
>> comment_form
>>  })
>>
>>
>>
>> So this URL line can read the function?
>>
>> path('post//', views.post_detail, name='post-detail'),
>>
>>
>> Note:
>> In the Post model get_absolute_url is provided for returning the pk
>>
>>
>> Thanks in advance
>>
>> --
>> 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/CAMqindvdzOxxuZSC41Z%3D-TaQianws9jSDvZEevDLTgPw6mFPiw%40mail.gmail.com
>> 
>> .
>>
> --
> 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/CAHLKn73Evou6KsXQGFNYA95AXPLjraaP_mXOTeYPsCOAobHY1w%40mail.gmail.com
> 
> .
>

-- 
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/CAMqindsi%2Be0eRwjST3r68rNUa%2B0qRc%2Behf6%2B8g66im7MUVq8Uw%40mail.gmail.com.


Re: Help passing the url

2020-04-06 Thread ola neat
You need to add the id as argument in the function

On Mon, Apr 6, 2020, 19:17 Luka Nik  wrote:

> How can I alter this post_detail function:
>
>
> def post_detail(request):
>
> post = get_object_or_404(Post)
> comments = post.comments.filter(active=True)
> new_comment = None
> if request.method == 'POST':
> comment_form = CommentForm(data=request.POST)
> if comment_form.is_valid():
> new_comment = comment_form.save(commit=False)
> new_comment.post = post
> new_comment.save()
> else:
> comment_form = CommentForm()
>
> return render(request, 'blog/post_detail.html', {'post': post,
>  'comments': comments,
>  'new_comment': 
> new_comment,
>  'comment_form': 
> comment_form
>  })
>
>
>
> So this URL line can read the function?
>
> path('post//', views.post_detail, name='post-detail'),
>
>
> Note:
> In the Post model get_absolute_url is provided for returning the pk
>
>
> Thanks in advance
>
> --
> 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/CAMqindvdzOxxuZSC41Z%3D-TaQianws9jSDvZEevDLTgPw6mFPiw%40mail.gmail.com
> 
> .
>

-- 
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/CAHLKn73Evou6KsXQGFNYA95AXPLjraaP_mXOTeYPsCOAobHY1w%40mail.gmail.com.


Help passing the url

2020-04-06 Thread Luka Nik
How can I alter this post_detail function:


def post_detail(request):

post = get_object_or_404(Post)
comments = post.comments.filter(active=True)
new_comment = None
if request.method == 'POST':
comment_form = CommentForm(data=request.POST)
if comment_form.is_valid():
new_comment = comment_form.save(commit=False)
new_comment.post = post
new_comment.save()
else:
comment_form = CommentForm()

return render(request, 'blog/post_detail.html', {'post': post,
 'comments': comments,
 'new_comment': new_comment,
 'comment_form':
comment_form
 })



So this URL line can read the function?

path('post//', views.post_detail, name='post-detail'),


Note:
In the Post model get_absolute_url is provided for returning the pk


Thanks in advance

-- 
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/CAMqindvdzOxxuZSC41Z%3D-TaQianws9jSDvZEevDLTgPw6mFPiw%40mail.gmail.com.


Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-06 Thread Appu Yadav
yes i am interested

On Tue, Mar 31, 2020 at 8:28 PM chander shekhar  wrote:

> Yes sir I am also interested,
> I am quite new to it,
> But curious to learn a lot from you guys
>
> On Tue, Mar 31, 2020, 8:16 PM Saswat Ray  wrote:
>
>> Hi,
>> Interested.
>>
>> *Thanks*,
>> *Saswat*
>>
>> https://www.linkedin.com/in/saswat-ray-27313316/
>> https://www.quora.com/profile/Saswat-Ray
>>
>>
>>
>> On Tue, Mar 31, 2020 at 7:10 PM Juan J. Moreno Piña <
>> prof.juanj.mor...@gmail.com> wrote:
>>
>>> available now, I'm located remote
>>> Juan
>>>
>>> *Teaching to learn *
>>> *Trading to survive*
>>> *M.Sc. Juan J. Moreno*
>>> En Venezuela (Maracaibo)
>>> Skype:studiom2j
>>> Tel (Italy): +39 02320628565
>>>
>>>
>>>
>>>
>>>
>>>
>>> El lun., 30 de mar. de 2020 a la(s) 07:56, Satish Pal (
>>> satishpal...@gmail.com) escribió:
>>>
 Hi

 I have total of 2 years of experience and I am interested to join your
 team.
 please check my Linkedin profile
 https://www.linkedin.com/in/satish-kumar-2230b3158/

 Thanks in Advance.

 On Mon, Mar 30, 2020 at 8:51 AM Phako Perez <13.phak...@gmail.com>
 wrote:

> Hi,
>
> I’m also interested to join your team, have 3+ years working with
> python
> Currently I’m teaching python to a group in order them to improve
> theirs career
>
> Thanks in advance
>
> Sent from my iPhone
>
> On 29 Mar 2020, at 20:48, chinna 
> wrote:
>
> 
> Hi,
>
> I am Premkumar having 3 years of experience in web and rest api
> development using python and Django. I would like to join your team
>
> On Sun, Mar 29, 2020 at 11:26 PM Lax Nayak  wrote:
>
>> I am looking for a django developer who has expertise in building
>> enterprise grade solutions.
>>
>>
>> --
>> 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/f93f06b0-883c-4477-9d73-cc429a43380d%40googlegroups.com
>> 
>> .
>>
> --
> 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/CAG%3DmdoCaGy%3DTWh0CY04_TBo8uG__4UWnd8sfWYLOZ8fapfZ%3DCA%40mail.gmail.com
> 
> .
>
> --
> 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/5C30197E-FCE7-4BE8-B169-4E9E74F4EBF3%40gmail.com
> 
> .
>
 --
 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/CALzNJXmFb3cSFpEmYs2yB502x%2BB9DtNkDT_L2hqxvmvTPx08jA%40mail.gmail.com
 
 .

>>> --
>>> 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/CAMf5KvxLjfvMEPJZ6j3PTruMpho34FOW3HaLOECfbkGQFV%2B6zA%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 

Re: ValueError: The database backend does not accept 0 as a value for AutoField.

2020-04-06 Thread Simon Charette
Something in your code is assigning a id=0 to Mail before calling .save() 
on it.

If you identify its origin then removing it should address your problem.

Simon

Le lundi 6 avril 2020 11:51:46 UTC-4, Hamza Mirchi a écrit :
>
> How Can I Fix That Via Django?
>
> On Mon, Apr 6, 2020 at 10:16 AM Simon Charette  > wrote:
>
>> Hello there,
>>
>> By default MySQL interprets providing 0 for an AUTO_INCREMENT PRIMARY KEY 
>> as NULL which defaults to increment the field.
>>
>> CREATE TABLE foo (id int auto_increment primary key);
>> INSERT INTO foo (id) VALUES(0);
>> INSERT INTO foo (id) VALUES(0);
>> SELECT * FROM foo;
>> ++
>> | id |
>> ++
>> | 1  |
>> | 2  |
>> ++
>>
>> This ORM level check is to prevent you from shooting yourself in the foot 
>> by expecting that providing a zero will assign this value.
>>
>> Cheers,
>> Simon
>>
>> Le lundi 6 avril 2020 09:35:22 UTC-4, Hamza Mirchi a écrit :
>>>
>>> Hi Everyone,
>>>
>>> I'm Saving My Mail Model but i can't but i get that error again and again
>>>
>>> This is my model:
>>>
>>> class Mail(models.Model):
>>>  choices = (('Valid','Valid'),('InValid','InValid'),('Unknown','Unknown'
>>> ),('Extracted','Extracted',))
>>>  providers = (('Gmail','Gmail'),('Yahoo','Yahoo'),('Hotmail','Hotmail'
>>> ),('Outlook','Outlook'),('Live','Live'),('Aol','Aol'),('Protonmail',
>>> 'Protonmail'),('Other','Other'),)
>>>  user = models.ForeignKey(User,on_delete=models.CASCADE,blank=True,null=
>>> True)
>>>  email = models.EmailField(blank=False,null=False)
>>>  status = models.CharField(max_length=100,choices=choices)
>>>  type = models.CharField(max_length=100,choices=providers)
>>>
>>>
>>>  def __str__(self):
>>>  return self.email
>>>
>>>
>>>
>>> This is my Code:
>>>
>>> mail = Mail.objects.create(user=request.user,email=str(g),status='Valid'
>>> ,type='Gmail')
>>> mail.save()
>>>
>>>
>>> Here is The Error:
>>>
>>>
>>> Traceback (most recent call last):
>>>   File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in 
>>> _bootstrap
>>> self.run()
>>>   File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
>>> self._target(*self._args, **self._kwargs)
>>>   File "/media/lenovo/Local 
>>> Disk/Learning/Scripts/Django/emailv3/src/validator/views.py", line 703, 
>>> in g6
>>> mail.save()
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
>>> , line 746, in save
>>> force_update=force_update, update_fields=update_fields)
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
>>> , line 784, in save_base
>>> force_update, using, update_fields,
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
>>> , line 887, in _save_table
>>> results = self._do_insert(cls._base_manager, using, fields, 
>>> returning_fields, raw)
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
>>> , line 926, in _do_insert
>>> using=using, raw=raw,
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/manager.py"
>>> , line 82, in manager_method
>>> return getattr(self.get_queryset(), name)(*args, **kwargs)
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/query.py"
>>> , line 1204, in _insert
>>> return query.get_compiler(using=using).execute_sql(returning_fields)
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>>> , line 1390, in execute_sql
>>> for sql, params in self.as_sql():
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>>> , line 1335, in as_sql
>>> for obj in self.query.objs
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>>> , line 1335, in 
>>> for obj in self.query.objs
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>>> , line 1334, in 
>>> [self.prepare_value(field, self.pre_save_val(field, obj)) for field 
>>> in fields]
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>>> , line 1275, in prepare_value
>>> value = field.get_db_prep_save(value, connection=self.connection)
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/fields/__init__.py"
>>> , line 821, in get_db_prep_save
>>> return self.get_db_prep_value(value, connection=connection, prepared
>>> =False)
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/fields/__init__.py"
>>> , line 2366, in get_db_prep_value
>>> value = connection.ops.validate_autopk_value(value)
>>>   File 
>>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/backends/mysql/operations.py"
>>> , line 192, in validate_autopk_value
>>> raise ValueError('The database backend does not accept 0 as a '
>>> ValueError: The database backend does 

Re: ValueError: The database backend does not accept 0 as a value for AutoField.

2020-04-06 Thread Hamza Mirchi
How Can I Fix That Via Django?

On Mon, Apr 6, 2020 at 10:16 AM Simon Charette  wrote:

> Hello there,
>
> By default MySQL interprets providing 0 for an AUTO_INCREMENT PRIMARY KEY
> as NULL which defaults to increment the field.
>
> CREATE TABLE foo (id int auto_increment primary key);
> INSERT INTO foo (id) VALUES(0);
> INSERT INTO foo (id) VALUES(0);
> SELECT * FROM foo;
> ++
> | id |
> ++
> | 1  |
> | 2  |
> ++
>
> This ORM level check is to prevent you from shooting yourself in the foot
> by expecting that providing a zero will assign this value.
>
> Cheers,
> Simon
>
> Le lundi 6 avril 2020 09:35:22 UTC-4, Hamza Mirchi a écrit :
>>
>> Hi Everyone,
>>
>> I'm Saving My Mail Model but i can't but i get that error again and again
>>
>> This is my model:
>>
>> class Mail(models.Model):
>>  choices = (('Valid','Valid'),('InValid','InValid'),('Unknown','Unknown'
>> ),('Extracted','Extracted',))
>>  providers = (('Gmail','Gmail'),('Yahoo','Yahoo'),('Hotmail','Hotmail'),(
>> 'Outlook','Outlook'),('Live','Live'),('Aol','Aol'),('Protonmail',
>> 'Protonmail'),('Other','Other'),)
>>  user = models.ForeignKey(User,on_delete=models.CASCADE,blank=True,null=
>> True)
>>  email = models.EmailField(blank=False,null=False)
>>  status = models.CharField(max_length=100,choices=choices)
>>  type = models.CharField(max_length=100,choices=providers)
>>
>>
>>  def __str__(self):
>>  return self.email
>>
>>
>>
>> This is my Code:
>>
>> mail = Mail.objects.create(user=request.user,email=str(g),status='Valid',
>> type='Gmail')
>> mail.save()
>>
>>
>> Here is The Error:
>>
>>
>> Traceback (most recent call last):
>>   File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in
>> _bootstrap
>> self.run()
>>   File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
>> self._target(*self._args, **self._kwargs)
>>   File "/media/lenovo/Local
>> Disk/Learning/Scripts/Django/emailv3/src/validator/views.py", line 703,
>> in g6
>> mail.save()
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
>> , line 746, in save
>> force_update=force_update, update_fields=update_fields)
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
>> , line 784, in save_base
>> force_update, using, update_fields,
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
>> , line 887, in _save_table
>> results = self._do_insert(cls._base_manager, using, fields,
>> returning_fields, raw)
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
>> , line 926, in _do_insert
>> using=using, raw=raw,
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/manager.py"
>> , line 82, in manager_method
>> return getattr(self.get_queryset(), name)(*args, **kwargs)
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/query.py"
>> , line 1204, in _insert
>> return query.get_compiler(using=using).execute_sql(returning_fields)
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>> , line 1390, in execute_sql
>> for sql, params in self.as_sql():
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>> , line 1335, in as_sql
>> for obj in self.query.objs
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>> , line 1335, in 
>> for obj in self.query.objs
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>> , line 1334, in 
>> [self.prepare_value(field, self.pre_save_val(field, obj)) for field
>> in fields]
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
>> , line 1275, in prepare_value
>> value = field.get_db_prep_save(value, connection=self.connection)
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/fields/__init__.py"
>> , line 821, in get_db_prep_save
>> return self.get_db_prep_value(value, connection=connection, prepared=
>> False)
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/fields/__init__.py"
>> , line 2366, in get_db_prep_value
>> value = connection.ops.validate_autopk_value(value)
>>   File
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/backends/mysql/operations.py"
>> , line 192, in validate_autopk_value
>> raise ValueError('The database backend does not accept 0 as a '
>> ValueError: The database backend does not accept 0 as a value for
>> AutoField
>>
>>
>>
>>
>> --
> 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
> 

ldapdb

2020-04-06 Thread paulo bruck
Hi All

I am learning django and it looks like great. Part of my job is to 
refactory a python2.7/cgi + html5 + openldap base to django.

I noted that there is already a project django-ldapdb that I could use.

Is there someone that uses ldapdb?

Is possible to use django-ldapdb to implement other schemas made in home?

thanks in advanced

-- 
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/c869eaf4-bf05-4613-86d2-1ae1ad18970c%40googlegroups.com.


Re: ValueError: The database backend does not accept 0 as a value for AutoField.

2020-04-06 Thread Simon Charette
Hello there,

By default MySQL interprets providing 0 for an AUTO_INCREMENT PRIMARY KEY 
as NULL which defaults to increment the field.

CREATE TABLE foo (id int auto_increment primary key);
INSERT INTO foo (id) VALUES(0);
INSERT INTO foo (id) VALUES(0);
SELECT * FROM foo;
++
| id |
++
| 1  |
| 2  |
++

This ORM level check is to prevent you from shooting yourself in the foot 
by expecting that providing a zero will assign this value.

Cheers,
Simon

Le lundi 6 avril 2020 09:35:22 UTC-4, Hamza Mirchi a écrit :
>
> Hi Everyone,
>
> I'm Saving My Mail Model but i can't but i get that error again and again
>
> This is my model:
>
> class Mail(models.Model):
>  choices = (('Valid','Valid'),('InValid','InValid'),('Unknown','Unknown'
> ),('Extracted','Extracted',))
>  providers = (('Gmail','Gmail'),('Yahoo','Yahoo'),('Hotmail','Hotmail'),(
> 'Outlook','Outlook'),('Live','Live'),('Aol','Aol'),('Protonmail',
> 'Protonmail'),('Other','Other'),)
>  user = models.ForeignKey(User,on_delete=models.CASCADE,blank=True,null=
> True)
>  email = models.EmailField(blank=False,null=False)
>  status = models.CharField(max_length=100,choices=choices)
>  type = models.CharField(max_length=100,choices=providers)
>
>
>  def __str__(self):
>  return self.email
>
>
>
> This is my Code:
>
> mail = Mail.objects.create(user=request.user,email=str(g),status='Valid',
> type='Gmail')
> mail.save()
>
>
> Here is The Error:
>
>
> Traceback (most recent call last):
>   File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in 
> _bootstrap
> self.run()
>   File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
> self._target(*self._args, **self._kwargs)
>   File "/media/lenovo/Local 
> Disk/Learning/Scripts/Django/emailv3/src/validator/views.py", line 703, in 
> g6
> mail.save()
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
> , line 746, in save
> force_update=force_update, update_fields=update_fields)
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
> , line 784, in save_base
> force_update, using, update_fields,
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
> , line 887, in _save_table
> results = self._do_insert(cls._base_manager, using, fields, 
> returning_fields, raw)
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/base.py"
> , line 926, in _do_insert
> using=using, raw=raw,
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/manager.py"
> , line 82, in manager_method
> return getattr(self.get_queryset(), name)(*args, **kwargs)
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/query.py"
> , line 1204, in _insert
> return query.get_compiler(using=using).execute_sql(returning_fields)
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
> , line 1390, in execute_sql
> for sql, params in self.as_sql():
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
> , line 1335, in as_sql
> for obj in self.query.objs
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
> , line 1335, in 
> for obj in self.query.objs
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
> , line 1334, in 
> [self.prepare_value(field, self.pre_save_val(field, obj)) for field in 
> fields]
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py"
> , line 1275, in prepare_value
> value = field.get_db_prep_save(value, connection=self.connection)
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/fields/__init__.py"
> , line 821, in get_db_prep_save
> return self.get_db_prep_value(value, connection=connection, prepared=
> False)
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/fields/__init__.py"
> , line 2366, in get_db_prep_value
> value = connection.ops.validate_autopk_value(value)
>   File 
> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/backends/mysql/operations.py"
> , line 192, in validate_autopk_value
> raise ValueError('The database backend does not accept 0 as a '
> ValueError: The database backend does not accept 0 as a value for 
> AutoField
>
>
>
>
>

-- 
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/86f4aedc-2241-4ca9-b088-afb511d1733a%40googlegroups.com.


Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread Roger Gammans
You don't have to send the messages all the way to the client
(browser), you can handle them directly in the consumer still on the
serverside.
As far as I know you'll have to keep track of metadata like all users
connections yourself, but you have the connect(), disconnect() method
pair to put your tracking code into.
On Mon, 2020-04-06 at 05:36 -0700, krnrrr wrote:
> thank you for the help.
> I need to try it out. i think it's more down the "tell-clients-to-
> tell-me-to-close" route which i wanted to escape.
> however, i still don't understand how i can get ALL connections of a
> user knowing only his token.
> 
> i mean, when i have an event in the system, i want to notify a user
> about - i KNOW which group I must send it to, so it's up to client to
> consume this message. I did all I should - sent it. And now it's like
> vice versa - I must learn which group to send message to, knowing
> only a recipient ID.
> 
> I imagined it as like in django admin view there could be a page at
> UserAdmin: "close all websockets for this user" - in such case we
> have a manage.py command, or any random view which knows nothing
> about clients-communicatiors. only about a user, whose connections
> must be closed.
> 
> maybe, you're right, and i'm thinking about it the wrong way
> 
> On Monday, 6 April 2020 15:28:44 UTC+4, Roger Gammans  wrote:
> > I think you are looking at it from the wrong direction.
> > Think about it in terms of consumers/connections, not in terms of
> > users,and in terms of send receiving events.
> > When in your consumers connect method, you subscribe
> > (eg  self.channel_layer.group_add() ) to add appropriate group to
> > send user global messages. One of those messages is close. Then you
> > just need to send the close message, and make sure you have code to
> > close the connection at each subscriber. The group doesn't matter
> > you had use any which doesn't conflict, you might even be able to
> > use one of your exisiting groups.  Although are they the Redis
> > names? I would avoid delving under the hood with channel_layers and
> > poking redis directly - unless your creating you own keys.
> 
> 
> 
> -- 
> 
> 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/cb1b8bbc-dc9c-4cdc-a45c-9c30ed871cd8%40googlegroups.com
> .
> 

-- 
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/16b7c749df844d13fd186daf69d91276a0cc451b.camel%40gammascience.co.uk.


Re: Working with forms

2020-04-06 Thread waqar khan
hey
I am waqar,
 i have created user form but not working
please solve my problems

admin:
username:-admin
password:-admin

user:
username:-waqar
password:-Test@123



On Mon, Apr 6, 2020 at 10:55 AM Ifeanyi Chielo 
wrote:

> Thanks to you all, I finally resolved the matter. I discovered it was just
> of a mix up of ModelForm and ordinary Django forms, though I enjoyed the
> teething challenges as a new django user
> Dr. Chielo C. Ifeanyi
> Chief Programmer,
> Head Webometrics Section
> ICT Unit, UNN
> 08032366433, 08154804230
> ifeanyi.chi...@unn.edu.ng
> http://www.unn.edu.ng/users/ifeanyichielo 
>
>
>
> On Mon, Apr 6, 2020 at 12:04 AM Maro Okegbero Samuel <
> marookegb...@gmail.com> wrote:
>
>> Port your code back to the initial state it was when you asked the
>> question and on the template change
>>  *{{form}}* to *{{form.as_p}}*
>>
>>
>>> --
>> 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/063525f8-c177-47d6-b849-52240522ae4f%40googlegroups.com
>> 
>> .
>>
> --
> 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/CAOcS8H2%2BtMxewMDAm6s%3DAQB6L%2BYCMTUaPHpyrr5A20u4z1vP2w%40mail.gmail.com
> 
> .
>

-- 
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/CAJO58e7%3Dz%2Bmr7EY7Ef%2BTqfF7UeDGD%3Do_rwwTqRa_bSWZHNHGtw%40mail.gmail.com.
<>


Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread krnrrr
thank you for the help.
I need to try it out. i think it's more down the 
"tell-clients-to-tell-me-to-close" route which i wanted to escape.

however, i still don't understand how i can get ALL connections of a user 
knowing only his token.

i mean, when i have an event in the system, i want to notify a user about - 
i KNOW which group I must send it to, so it's up to client to consume this 
message. I did all I should - sent it. And now it's like vice versa - I 
must learn which group to send message to, knowing only a recipient ID.

I imagined it as like in django admin view there could be a page at 
UserAdmin: "close all websockets for this user" - in such case we have a 
manage.py command, or any random view which knows nothing about 
clients-communicatiors. only about a user, whose connections must be closed.

maybe, you're right, and i'm thinking about it the wrong way

On Monday, 6 April 2020 15:28:44 UTC+4, Roger Gammans wrote:
>
> I think you are looking at it from the wrong direction.
>
> Think about it in terms of consumers/connections, not in terms of 
> users,and in terms of send receiving events.
>
> When in your consumers connect method, you subscribe (eg 
> self.channel_layer.group_add() ) to add appropriate group to send user 
> global messages. One of those messages is close. Then you just need to send 
> the close message, and make sure you have code to close the connection at 
> each subscriber. The group doesn't matter you had use any which doesn't 
> conflict, you might even be able to use one of your exisiting groups. 
> Although are they the Redis names? I would avoid delving under the hood 
> with channel_layers and poking redis directly - unless your creating you 
> own keys.
>
>
>

-- 
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/cb1b8bbc-dc9c-4cdc-a45c-9c30ed871cd8%40googlegroups.com.


Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread Roger Gammans
I think you are looking at it from the wrong direction.
Think about it in terms of consumers/connections, not in terms of
users,and in terms of send receiving events.
When in your consumers connect method, you subscribe
(eg  self.channel_layer.group_add() ) to add appropriate group to send
user global messages. One of those messages is close. Then you just
need to send the close message, and make sure you have code to close
the connection at each subscriber. The group doesn't matter you had use
any which doesn't conflict, you might even be able to use one of your
exisiting groups.  Although are they the Redis names? I would avoid
delving under the hood with channel_layers and poking redis directly -
unless your creating you own keys.
The channel dos say you should be able to get the users out of
self.scope, exactly where will depend on your auth middleware, but
probably self.scope['user']
self.channel_layer.group_send(group, {type: 'close'}) , almost does the
same as your loop to all the consumers in the group, but it might be
better to call your own sub method (if for no other reason than close()
doesn't normally take a event object as a argument)

On Mon, 2020-04-06 at 04:07 -0700, krnrrr wrote:
> well, how I see it:
> 
> - a user can subscribe to any amount of groups during the lifecycle
> of his JWT
> - how can I get a list these groups in the first place? so to be able
> to "send a message to an appropriate group"?
> 
> I thought there's a way to decode JWT, get user ID from it and then
> somehow:
> 
> channels = get_channel_layer():
> for ws in channels.get_connections_for_user(user_id):
> ws.close()
> 
> but i couldn't find a way
> On Monday, 6 April 2020 14:36:46 UTC+4, Roger Gammans  wrote:
> > Don't you just have to send a message to an appropriate group which
> > contains just that users/sessions connections/consumers and in the
> > message handler on the consumer call  'self.close()' and remove the
> > consumer from any subscriptions. 
> > If I understand the docs, in the disconnect method is still called
> > so can do it there, and should be anyway. (Although it doesn't hurt
> > to do it twice group_discard() is defined a s NOOP if the
> > consumer's unique channel  isn't in the group)
> > Or have I missed something,?
> 
> 
> 
> -- 
> 
> 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/5673c750-b428-4ffd-87c8-7de10f19ba6e%40googlegroups.com
> .
> 

-- 
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/87e250928689bb9eefbc470af2446dfdee584597.camel%40gammascience.co.uk.


Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread krnrrr
well, how I see it:

- a user can subscribe to any amount of groups during the lifecycle of his 
JWT
- how can I get a list these groups in the first place? so to be able to 
"send a message to an appropriate group"?

I thought there's a way to decode JWT, get user ID from it and then somehow:

channels = get_channel_layer():
for ws in channels.get_connections_for_user(user_id):
ws.close()

but i couldn't find a way

On Monday, 6 April 2020 14:36:46 UTC+4, Roger Gammans wrote:
>
> Don't you just have to send a message to an appropriate group which 
> contains just that users/sessions connections/consumers and in the message 
> handler on the consumer call 'self.close()' and remove the consumer from 
> any subscriptions. 
>
> If I understand the docs, in the disconnect method is still called so can 
> do it there, and should be anyway. (Although it doesn't hurt to do it twice 
> group_discard() is defined a s NOOP if the consumer's unique channel isn't 
> in the group)
>
> Or have I missed something,?
>
>
>

-- 
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/5673c750-b428-4ffd-87c8-7de10f19ba6e%40googlegroups.com.


Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread Roger Gammans
Don't you just have to send a message to an appropriate group which
contains just that users/sessions connections/consumers and in the
message handler on the consumer call  'self.close()' and remove the
consumer from any subscriptions. 
If I understand the docs, in the disconnect method is still called so
can do it there, and should be anyway. (Although it doesn't hurt to do
it twice group_discard() is defined a s NOOP if the consumer's unique
channel  isn't in the group)
Or have I missed something,?
On Mon, 2020-04-06 at 03:08 -0700, krnrrr wrote:
> or maybe any example of "superuser with groups: he can list all
> connections and close them if he likes"-type of application. All i
> found was some types of chats, but none of them included some kind of
> "chat-admin" with management of the rooms and visitors
> 
> 
> 
> -- 
> 
> 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/ad5f38cd-0d4e-4187-a2c2-d092df869f8e%40googlegroups.com
> .
> 

-- 
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/530606d8f5e1320eed464ffe94e968b66260b0f0.camel%40gammascience.co.uk.


Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread krnrrr
or maybe any example of "superuser with groups: he can list all connections 
and close them if he likes"-type of application. All i found was some types 
of chats, but none of them included some kind of "chat-admin" with 
management of the rooms and visitors

-- 
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/ad5f38cd-0d4e-4187-a2c2-d092df869f8e%40googlegroups.com.


[django-channels] How to close websocket connection from server?

2020-04-06 Thread krnrrr
we have django 2.0.4 and channels 2.1.7 in production.
And now users must have only open 1 session allowed. (when a user logs in 
the second time, the first open websocket connection must be closed). I'm 
out of ideas on how to do it.

AFAIK, `websocket.disconnect` must be sent from the client, and it is not 
what I want (what's the point to tell the client "hey, tell me that you 
want to disconnect, because I say so..." if I can close it myself?). I've 
read this 

 
chapter and the related issue in Github and also would like to see a code 
snippet how to do this.

I also read about a similar issue (54518717 at SO) which is about a "kick 
out" user from a specific group. but what if I need to kick him out of all 
his possible groups/channels?

i noticed, that after a user logs in ha connects to a bunch of groups:

1) "asgi::group:room__36" <--- group for his UserGroup(36)
2) "asgi::group:238"  <--- his personal group, for User(238)
3) "asgi::group:notifications.36" <--- another group for his UserGroup(36)

so, one group can be discarded as a whole, and from others... he must be 
ZREM'ed somehow?

So, any help or direction would be very appreciated.
Thank you.

-- 
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/ab8fa346-5aab-4894-8eb0-0c4b24667ca0%40googlegroups.com.