[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

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 y

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 ca

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: cha

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 glo

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 not

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 jus

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

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

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

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 IN

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 Sim

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

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(

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 r

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)

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 Gi

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, >> Bu

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

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

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

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 > e

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 >

""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 UserPropertie

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 us

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 advic

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 applicat

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

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 m

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. >

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

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 >

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

2020-04-06 Thread אורי
Hi, I'm also looking for work. I'm an experienced Django developer with 6 years of experience. You can find more information about me here: https://www.speedysoft.com/uri/en/ אורי u...@speedy.net On Sun, Mar 29, 2020 at 8:56 PM Lax Nayak wrote: > I am looking for a django developer who has exp