rezometz / django-paiji2-forum

A simple forum (django) app.
GNU Affero General Public License v3.0
2 stars 2 forks source link

paiji2-forum

Build Status Code Climate Coverage Status

Licenses

Testing

In the root of this folder, you can execute:

pip install -U .
./manage.py migrate
./manage.py createsuperuser
./manage.py runserver

Requirements

Django>=1.11 (including Django 2)

You must also install django-bootstrap3 and django-mptt (pip will do this for you). django-html-validator is required for testing purposes.

Installation

Installed apps

In the settings.py file of your project, add the following apps:

INSTALLED_APPS = [
    # other apps…
    'paiji2_forum.apps.Paiji2ForumConfig',
    'mptt',
    'bootstrap3',
    # other apps…
]

URLconf

Include 'paiji2_forum.urls' in the urlpatterns of your project. For instance:

from django.conf.urls import url, include

urlpatterns = [
    # other urls…
    url(r'^forum/', include('paiji2_forum.urls')),
]

Templates

See paiji2_forum/templates/forum/base.html for an example.

You should change the name of the extended template (line 1) to fit to your project.

The extended template should have a title block, a style block to add a css file link, and a content block to show the content of the forum.

It must also link to bootstrap.css or bootstrap.min.css (bootstrap version 3), for instance with:

<link rel="stylesheet" href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

Translations

The default language is english. French and german translations are provided. Please forgive my mistakes :-)