A Django app for chat conversations
Project description
Django Vestlus
vestlus is a django chat app with support for private and public channels.
Dependencies
Use of vestlus requires:
django-polymorphic
: used to handle inheritance between message models.django-crispy-forms
: used for better formatting of forms in templates.django-restframework
: used to provide REST api support.django-haystack
: used to handle searching across channels and messages.
Those apps will need to be installed in the INSTALLED_APPS
tuple of your django project.
Models
The app is split into three main models:
- channel: channels allow for group conversations. Any message sent to a channel is visible to every member of the channel. Channels can be either public or private.
- membership: memberships allow users to join, leave, and administer channels. Owners and admins can manage channel memberships.
- message: all messages are private (self to self); private (shared with somebody else); or
Installation
- Add vestlus to your
INSTALLED_APPS
setting like this::
INSTALLED_APPS = [
# other apps...
'vestlus',
]
Alternatively, you can also add this app like so::
INSTALLED_APPS = [
# other apps...
'vestlus.apps.VestlusConfig',
]
- Include the polls URLconf in your project urls.py like this::
path('chat/', include('vestlus.urls', namespace='vestlus')),
2.1. Optionally, you can also add the api endpoints in your project urls.py like so::
path('api/', include('vestlus.api', namespace='vestlus_api')),
-
Run
python manage.py migrate
to create the app models. -
Start the development server and visit
http://127.0.0.1:8000/admin/
to start a add chat groups and messages (you'll need the Admin app enabled). -
Visit
http://127.0.0.1:8000/chat/
to use the app. You should have the following urls added to your url schemes::
http://127.0.0.1:8000/chat/
http://127.0.0.1:8000/chat/channels/
http://127.0.0.1:8000/chat/channels/new/
http://127.0.0.1:8000/chat/channels/<slug:slug>
http://127.0.0.1:8000/chat/channels/<slug:channel>/messages/<slug:slug>/delete
http://127.0.0.1:8000/chat/channels/<slug:slug>/delete
http://127.0.0.1:8000/chat/channels/<slug:slug>/messages/new/
http://127.0.0.1:8000/chat/memberships/
http://127.0.0.1:8000/chat/memberships/<slug:slug>
http://127.0.0.1:8000/chat/memberships/<slug:slug>/new/
http://127.0.0.1:8000/chat/messages/
http://127.0.0.1:8000/chat/messages/<slug:slug>
http://127.0.0.1:8000/chat/messages/<slug:slug>/delete
5.1. If you've included the api urls as well, you can visit the endpoints by visiting::
http://127.0.0.1:8000/api/channels
http://127.0.0.1:8000/api/channels/<pk>
http://127.0.0.1:8000/api/channels/<uuid>
http://127.0.0.1:8000/api/channels/<pk>/messages
http://127.0.0.1:8000/api/channels/<uuid>/messages
http://127.0.0.1:8000/api/channels/me
http://127.0.0.1:8000/api/group-messages
http://127.0.0.1:8000/api/group-messages/<pk>
http://127.0.0.1:8000/api/memberships
http://127.0.0.1:8000/api/memberships/<uuid>
http://127.0.0.1:8000/api/messages
http://127.0.0.1:8000/api/messages/<pk>
http://127.0.0.1:8000/api/messages/notes
License
vestlus is BSD-Licensed.
Built with django-clite.
Developed and maintained by Leo Neto
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-vestlus-0.1.4.tar.gz
.
File metadata
- Download URL: django-vestlus-0.1.4.tar.gz
- Upload date:
- Size: 31.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f7584ccb37a0a6ff0a704b092a3d5b7a793d4bc05a50217fcd12ccbccb56b6c |
|
MD5 | edc85fc3b360d19d045ce1b8b1312719 |
|
BLAKE2b-256 | 705b298ea56db6992acd1bb3b425f46f26fbfef48f27a4ba5ee7a9f0a732e912 |
File details
Details for the file django_vestlus-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: django_vestlus-0.1.4-py3-none-any.whl
- Upload date:
- Size: 66.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25b55e97d7903cedb90c39544f40f62d002050fdba6f00263f31b8d9980eff8a |
|
MD5 | 0e7ba6f5cd38341acfad7f24de8ea6be |
|
BLAKE2b-256 | 90f467d1e6d7f3b4556a576ededab595af7aa265afef028babc3728d898c812c |