Public and Private Chat Room Creation with Django Python Framework

62 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

Chukwudi Onwusa

lukematon,
20.11.2022 klo 9.52.0720.11.2022
vastaanottaja django...@googlegroups.com
Greetings and good tidings!
Please how do I create with django the above mail subject(private and public chat room).
I need help and references to work on.
Thanks.

Lakshyaraj Dash

lukematon,
20.11.2022 klo 9.55.0020.11.2022
vastaanottaja django...@googlegroups.com
Provide is_private to the rooms model of your app.
If you make the default as true, then the room is private by default and vice versa

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGoV8nnwKZa%3DSYCfbcOX-n-3GRSOGTNgQKgz2%3DqF%2BMEddHGFig%40mail.gmail.com.

Chukwudi Onwusa

lukematon,
20.11.2022 klo 17.33.4620.11.2022
vastaanottaja django...@googlegroups.com
Please can you help me with a sample.
Please.

Lakshyaraj Dash

lukematon,
20.11.2022 klo 18.50.5120.11.2022
vastaanottaja django...@googlegroups.com
class Room(models.Model):
   ...
   is_private = models.BooleanField(default=False)

In views.py
def chat_room(request):
    if room.is_private:
       return redirect ("/")
    else:
       ...

Chukwudi Onwusa

lukematon,
21.11.2022 klo 10.22.1321.11.2022
vastaanottaja django...@googlegroups.com
Vastaa kaikille
Vastaa kirjoittajalle
Välitä
0 uutta viestiä