Get Involved with Django Chatter!

We’d highly appreciate contributions to this project! The source code is currently hosted on GitHub. If you caught a bug or have suggestions, we welcome pull requests and issues!

Currently, Ahmed Ishtiaque is the primary maintainer for this project. If you have any questions or suggestions, feel free to reach out to him as well.

Get Started

To start developing Chatter, follow the following steps:

  • Install Python 3 if you don’t have it already.

  • Clone the GitHub Repo.

  • Spawn up a new virtual environment, cd into your working directory and run

    $ pip install -r dev-requirements.txt

    This will install all the prerequisites needed to run Chatter.

  • If you don’t have Redis, you can install it from their Download page.

  • Since we’re phasing into implementing multitenancy support on Chatter with django-tenants, we will be using PostgreSQL as the database. Install PostgreSQL from PostgreSQL.

    After this, create user for chatter database:

    • Open the postgres terminal:

      $ sudo su - postgres
    • Connect to your psql server:

      $ psql
    • Run the following commands (don’t miss the semi-colons):

      $ CREATE DATABASE chatter;
      $ CREATE USER chatteradmin WITH PASSWORD 'chatter';
      $ ALTER ROLE chatteradmin SET client_encoding TO 'utf8';
      $ ALTER ROLE chatteradmin SET default_transaction_isolation TO 'read committed';
      $ ALTER ROLE chatteradmin SET timezone TO 'America/New_York';
      $ GRANT ALL PRIVILEGES ON DATABASE chatter TO chatteradmin;
      $ \q

      The instructions should be pretty intuitive. This is a replication of the detailed PostgreSQL install guide on DigitalOcean.

    • Exit the postgres session:

      $ exit
  • Run migrations:

    $ python makemigrations django_chatter
    $ python migrate
  • Create public tenant to enable multitenancy testing support with django-tenants:

    $ python shell
    from tenants.models import Client, Domain
    # create your public tenant
    tenant = Client(schema_name='public',
                  name='Schemas Inc.')
    # Add one or more domains for the tenant
    domain = Domain()
    domain.domain = 'localhost' # don't add your port or www here! on a local server you'll want to use localhost here
    domain.tenant = tenant
    domain.is_primary = True
  • Run the tests:

    $ pytest

    All tests in the master branch should pass.

  • Create a superuser for chatter:

    $ python createsuperuser
  • Run the development server:

    $ python runserver
  • (Optional) if you want to streamline the login/logout mechanisms, feel free to add a login.html file to django_chatter/templates/registration folder. This should give you a form to log in. Django’s template for that is pretty adequate.

The following is a list of features and hooks that we plan on bringing to Chatter:

Features Yet to Come

  • Add a “Create Group” option for users on the templates
  • Add ‘Seen by user x’ functionality
  • Add time to when messages were sent