Skip to main content

Forum for Django framework.

Project description

https://coveralls.io/repos/mapeveri/django-musette/badge.svg https://travis-ci.org/mapeveri/django-musette.svg?branch=master https://badge.fury.io/py/django-musette.svg https://img.shields.io/pypi/dm/django-musette.svg

Forum for Django framework. This reusable application it is designed to be easily integrated into an existing Django application.

Installing

With pip:

pip install django-musette

Quick start

  1. Add application ‘musette’ and dependencies to INSTALLED_APPS:

    INSTALLED_APPS = (
            ...
            'log',
            'hitcount',
            'endless_pagination',
            'rest_framework',
            'musette',
    )
  2. Add this urls to file urls.py:

    url(r'^' , include('musette.urls')),
  3. And in settings.py in TEMPLATES check in context_processors this values:

        'django.template.context_processors.debug',
    'django.template.context_processors.request',
    'django.contrib.auth.context_processors.auth',
    'django.contrib.messages.context_processors.messages',
    'django.template.context_processors.media',
    'django.template.context_processors.static',
    'django.template.context_processors.tz',
    'django.template.context_processors.i18n',
    'musette.context_processors.data_templates',
  4. Configure in the settings.py LOGIN_URL, STATIC and MEDIA root. Something very important is to set the variable CACHES for redis. This is for real time support. Example:

    CACHES = {
        'default': {
            'BACKEND' : 'redis_cache.RedisCache',
            'LOCATION' : 'localhost:6379',
            'OPTIONS' : {
                'DB' : 1
                }
            }
    }
  5. In your application add the profile model do the following. For example your app is ‘main’, In models.py and admin.py add:

    # models.py
    from musette.models import AbstractProfile
    
    class Profile(AbstractProfile):
    
            # This is in case you need to extend the profile model. If not use 'pass'
            location = models.CharField("Label name", max_length=200, null=True, blank=True)
            company = models.CharField("Label name", max_length=150, null=True, blank=True)
    
    # admin.py
    from .models import Profile
    
    admin.site.register(Profile)
    
    # If you need to extend so, you will create template profile.html indide your app and add this
    # templates/main/profile.html
    
    <h4>Location</h4>
    <div class="panel panel-default">
        <div class="panel-body">
            {{ profile.location|safe }}
        </div>
    </div>
    
    <h4>Company</h4>
    <div class="panel panel-default">
        <div class="panel-body">
            {{ profile.company|safe }}
        </div>
    </div>
  6. Execute command migrate:

    python manage.py migrate
    python manage.py makemigrations
    python manage.py migrate
  7. If you need to enable the forum in spanish.

  1. Config variables to send email and variable EMAIL_MUSETTE with email from in settings.py.

  2. In settings.py configure SITE_NAME and SITE_URL. Example config of settings.py.

How to use?

  1. Login in django admin and start to insert categories necessary. Example:

https://github.com/mapeveri/django-musette/blob/master/images/categories.png

The field position is for indicate the order of the categories.

  1. Insert the forum necessary: Example:

https://github.com/mapeveri/django-musette/blob/master/images/forums.png

Field more importants:

  • Position: The field position is for indicate the order of the forums in the categories.

  • Topics count: Total forum topics.

  • Check topics: If you need to review the topics by a moderator.

  1. Make sure that each user registration exist in the profile table. Execute in the terminal:

    python manage.py runserver
  2. In other terminal execute this command for run server tornado for web sockets:

    python manage.py musette_run_server_ws

Visit 127.0.0.1:8000/forums you should see the categories and forums.

https://github.com/mapeveri/django-musette/blob/master/images/index.png https://github.com/mapeveri/django-musette/blob/master/images/forum.png https://github.com/mapeveri/django-musette/blob/master/images/notifications.png https://github.com/mapeveri/django-musette/blob/master/images/topic.png https://github.com/mapeveri/django-musette/blob/master/images/new_comment.png https://github.com/mapeveri/django-musette/blob/master/images/comment.png https://github.com/mapeveri/django-musette/blob/master/images/new_topic.png https://github.com/mapeveri/django-musette/blob/master/images/edit_topic.png

Features

  1. Multiple forums ordered by for category.

  2. Notifications and email notifications.

  3. Notifications and comments in real time.

  4. Count views for forum and topic.

  5. Infinite scroll for comments of one topic.

  6. Support of media files for topics.

  7. Easy integration with other applications Django of your project.

  8. Pre-moderation of topics.

  9. Models registered in admin django for administrators.

  10. Search for topics in a forum.

  11. Modern design, thank you to Bootstrap material design.

  12. Avatar.

  13. Support to English and Spanish languages.

  14. Validation of forms in real time with AngularJs.

  15. User registration a forum.

  16. Support to Markdown.

  17. Support to rss to forums.

  18. API REST with django-rest-framework.

  19. Support to topics main in forum.

  20. Integrated model profile, but can be extended.

Roadmap

Roadmap with content of the next versions of django-musette.

Contribute

  1. Fork this repo and install it

  2. Follow PEP8, Style Guide for Python Code

  3. Write code

  4. Write unit test

  5. Send pull request

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

django-musette-0.1.4.tar.gz (988.7 kB view details)

Uploaded Source

File details

Details for the file django-musette-0.1.4.tar.gz.

File metadata

File hashes

Hashes for django-musette-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8cf65712a9e5c498a65328f8e2d5cd2577832d64f5525865e33edbe6c562c90e
MD5 c63732c8d576f75961d72760c1c26da8
BLAKE2b-256 666a3bc645274cb0a5baeb34a3f5e768a4ef1c7d0bdabcc7e90ef8c282eb491c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page