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_APPSsetting 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 migrateto 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
Release files for django-vestlus 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-vestlus-0.1.4.tar.gz | 31.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_vestlus-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.6 kB
Release files / django-vestlus-0.1.4.tar.gz
| Download URL | django-vestlus-0.1.4.tar.gz |
|---|---|
| Size | 31.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f7584ccb37a0a6ff0a704b092a3d5b7a793d4bc05a50217fcd12ccbccb56b6c
|
|
BLAKE2b-256 checksum How to use checksums |
705b298ea56db6992acd1bb3b425f46f26fbfef48f27a4ba5ee7a9f0a732e912
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / django_vestlus-0.1.4-py3-none-any.whl
| Download URL | django_vestlus-0.1.4-py3-none-any.whl |
|---|---|
| Size | 66.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25b55e97d7903cedb90c39544f40f62d002050fdba6f00263f31b8d9980eff8a
|
|
BLAKE2b-256 checksum How to use checksums |
90f467d1e6d7f3b4556a576ededab595af7aa265afef028babc3728d898c812c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|