Forum for Django framework.
Project description
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
Add application ‘musette’ and dependencies to INSTALLED_APPS:
INSTALLED_APPS = ( ... 'log', 'hitcount', 'endless_pagination', 'rest_framework', 'musette', )
Add this urls to file urls.py:
url(r'^' , include('musette.urls')),
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',
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 } } }
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>
Execute command migrate:
python manage.py migrate python manage.py makemigrations python manage.py migrate
If you need to enable the forum in spanish.
Config variables to send email and variable EMAIL_MUSETTE with email from in settings.py.
In settings.py configure SITE_NAME and SITE_URL. Example config of settings.py.
How to use?
Login in django admin and start to insert categories necessary. Example:
The field position is for indicate the order of the categories.
Insert the forum necessary: Example:
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.
Make sure that each user registration exist in the profile table. Execute in the terminal:
python manage.py runserver
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.
Features
Multiple forums ordered by for category.
Notifications and email notifications.
Notifications and comments in real time.
Count views for forum and topic.
Infinite scroll for comments of one topic.
Support of media files for topics.
Easy integration with other applications Django of your project.
Pre-moderation of topics.
Models registered in admin django for administrators.
Search for topics in a forum.
Modern design, thank you to Bootstrap material design.
Avatar.
Support to English and Spanish languages.
Validation of forms in real time with AngularJs.
User registration a forum.
Support to Markdown.
Support to rss to forums.
API REST with django-rest-framework.
Support to topics main in forum.
Integrated model profile, but can be extended.
Roadmap
Roadmap with content of the next versions of django-musette.
Contribute
Fork this repo and install it
Follow PEP8, Style Guide for Python Code
Write code
Write unit test
Send pull request
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-musette-0.1.4.tar.gz
.
File metadata
- Download URL: django-musette-0.1.4.tar.gz
- Upload date:
- Size: 988.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cf65712a9e5c498a65328f8e2d5cd2577832d64f5525865e33edbe6c562c90e |
|
MD5 | c63732c8d576f75961d72760c1c26da8 |
|
BLAKE2b-256 | 666a3bc645274cb0a5baeb34a3f5e768a4ef1c7d0bdabcc7e90ef8c282eb491c |