Django channels in django admin - python

I would like to implement websocket chats inside of Django admin page. I have not found any information, if it is possible to do so?
I need some ideas to start from, maybe there are some tutorials on the topic? Or may it be completely impossible to do?

Related

Getting django accept phpBB users

My Problem is, I want to create a extra website on a phpBB forum to provide extra stuff and registration for meeting. No problem I know django and python, so this is no problem.
But I would be nice, if I could accept a session from a user or import the phpBB users so that they can login to my app.
I found django-phpBB, but I don't want to access the data. If I read correctly, my case is not the use case of django-phpBB.
Can anybody give me a good advice?

Notification in django?

I have been developing in django for sometime now, and have developed a neat website having functionality such as writing blogs, posting questions, sharing content etc. However there is still one thing that is missing and i.e. creating notification for users.
What I want to do is to inform users in their profiles, whenever somebody comments on their posts, or if they are following a particular post and there is an update on it, then inform the user of that update. I have looked around many applications but I am still very confused about how to do it.
In case of using django-notification I seem to have an impression(which can be wrong) that I can use this only to inform the user via email, i.e. I cannot show these notifications in the user profile, just like we have on facebook.
Firstly I would like to know if I am wrong, and then I really need some proper tutorial or guidance on how to go about doing it. I know how to register a notification and send it on proper signal but there is no documentation on how to show these notices in a template, if this can be done.
Any guidance/tutorial/getting started doc will be deeply appreciated.
Websockets are simple and very useful in terms of bi-directional communication between clients and servers. If your app's features list grows it will be possible that you will need additional events in your app. WS will help you to scale.

Django CMS Multisite User Permissions

Im starting a project using Django CMS that has multiple sites being controlled from one instance of Django CMS. I have found the documentation for User Permissions and Group Permissions but didn't see anything by default about permissions depending on which site the user is on.
I want to be able to give user a group and have them only be able to login to a specific site(s). Im sure this is going to be possible by requesting the current SITE_ID but I just wanted to see if anyone could point me in the right direction of a plugin or middleware that might let me do this?
Any advice would be greatly appreciated.

Django user input steps needed

I'm a noob I know.
So I want to build a web app that allows the user to enter text. Then have the web server send an email based on the text with a message from another file.
What would be the optimal way to accomplish this? I am new to Django but have experience with Python. If someone could give me a basic bullet point way on how to do this I can google the rest. I just don't know where to start.
There is plenty of good guides online. The django documentation will take you step by step through making your first django app.
https://docs.djangoproject.com/en/1.9/intro/tutorial01/
Django has a sendmail library that you can use once you get your app started
https://docs.djangoproject.com/en/1.9/topics/email/
This guide is help you to go step by step
Tango with Django : http://www.tangowithdjango.com/book17/
Or
http://tutorial.djangogirls.org/en/index.html
as well you have to follow official documentation.because Tango with Django may cause version issues but Django girls tutorial seems updated.
Official : https://docs.djangoproject.com/en/1.9/intro/tutorial01/

reusable application for django site wide announcements that displays a message only once per user

I want to show various messages to registered users only once in my django application. I found django-announcements which seemed to do what I want - but I found in testing it marks messages as read by using a session variable, which disappears if the user logs out. This means a message is shown again to a user if they dismiss it when logged in, log out, and then log in again.
I wondered if anyone know of an application that I might be able to use here without re-inventing the wheel.
Have a look at django-notification. It is used by pinax, there it seems to work like what you are searching for. At least it saves the status in the db.
edit
Response to the comment
from the docs:
notification.send([to_user], "friends_invite", {"from_user": from_user})
so this should work:
notification.send(Users.objects.all(), "friends_invite", {"from_user": from_user})
and if a queryset isnt right:
notification.send([u for u in Users.objects.all()], "friends_invite", {"from_user": from_user})
Have you looked at the Messages Framework in Django 1.3? In Django <=1.2 it was a simple model so you could do:
for user in User.objects.all():
user.message_set.create(message="some text")
and this would be rendered in the template, and dismissed as soon as the next page is loaded (it's what Django admin uses). It has changed a bit in 1.3, but it might be handy, but not 'dismissable' in the way that maybe you want.

Categories