Code Monkey home page Code Monkey logo

vestlus's Introduction

Django Vestlus

vestlus is a django chat app with support for private and public channels.

PyPI - License PyPI - Version PyPI - Python Version PyPI - Downloads Github - Issues

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

  1. 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',
    ]
  1. 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')),
  1. Run python manage.py migrate to create the app models.

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

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

vestlus's People

Contributors

oleoneto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.