Giter VIP home page Giter VIP logo

lbforum's Introduction

LBForum

LBForum is a quick and simple forum which uses the Django Framework (written in Python language). LBForum is a reusable Django application, can be added to any existing django project. LBForum is distributed under the BSD.

Demo site: http://lbf.haoluobo.com/

Demo site's source: https://github.com/vicalloy/lbforum-site

Features

  • user-friendly installation process
  • the ease of integration into any Django project and the ease of installation
  • classic view of the forum like FluxBB
  • Allow users to upload attachments to their posts(by AJAX).
  • avatar support
  • BBCode support
  • friendly edtor(by markItUp!).
  • Sticky threads (These threads are always sorted first in the list of threads)

Requirements

Installation

Installation

  1. Install LBForum by easy_install or pip.

easy_install:

$ easy_install lbforum

pip:

$ pip install lbforum

Configuration

Config urls.py:

url(r'^', include('lbforum.urls')),
url(r'^attachments/', include('lbattachment.urls')),

The LBForum has some settings should be set in `settings.py`:

  1. Add the following app to INSTALLED_APPS:

    'el_pagination',
    'easy_thumbnails',
    'constance',
    'constance.backends.database',
    'djangobower',
    
    'lbforum',
    'lbattachment',
    'lbutils',
  2. Add the following middleware to TEMPLATES['OPTIONS']['context_processors']:

    'django.contrib.messages.context_processors.messages',
  3. setting urls for lbforum:

    STATIC_URL = '/static/'
    STATIC_ROOT = os.path.join(PRJ_ROOT, 'collectedstatic')
    
    HOST_URL = ''
    MEDIA_URL_ = '/media/'
    MEDIA_URL = HOST_URL + MEDIA_URL_
    MEDIA_ROOT = os.path.join(PRJ_ROOT, 'media')
    
    SIGNUP_URL = '/accounts/signup/'
    LOGIN_URL = '/accounts/login/'
    LOGOUT_URL = '/accounts/logout/'
    LOGIN_REDIRECT_URL = '/'
    CHANGE_PASSWORD_URL = '/accounts/password/change/'
  4. settings for constance:

    CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'
    
    CONSTANCE_CONFIG = {
        'forbidden_words': ('', 'Forbidden words', str),
    }
  5. settings for bower:

    from django.conf.global_settings import STATICFILES_FINDERS
    STATICFILES_FINDERS += (('djangobower.finders.BowerFinder'),)
    
    BOWER_COMPONENTS_ROOT = PRJ_ROOT
    
    BOWER_INSTALLED_APPS = (
        'jquery#1.12',
        'markitup#1.1.14',
        'mediaelement#2.22.0',
        'blueimp-file-upload#9.12.5',
    )
  6. settings for BBCODE:

    BBCODE_AUTO_URLS = True
    #add allow tags
    HTML_SAFE_TAGS = ['embed']
    HTML_SAFE_ATTRS = ['allowscriptaccess', 'allowfullscreen', 'wmode']
    #add forbid tags
    HTML_UNSAFE_TAGS = []
    HTML_UNSAFE_ATTRS = []
    
    """
    #default html safe settings 
    acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'area', 'b', 'big',
        'blockquote', 'br', 'button', 'caption', 'center', 'cite', 'code', 'col',
        'colgroup', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em',
        'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 
        'ins', 'kbd', 'label', 'legend', 'li', 'map', 'menu', 'ol', 
        'p', 'pre', 'q', 's', 'samp', 'small', 'span', 'strike',
        'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th',
        'thead', 'tr', 'tt', 'u', 'ul', 'var']
    acceptable_attributes = ['abbr', 'accept', 'accept-charset', 'accesskey',
        'action', 'align', 'alt', 'axis', 'border', 'cellpadding', 'cellspacing',
        'char', 'charoff', 'charset', 'checked', 'cite', 'clear', 'cols',
        'colspan', 'color', 'compact', 'coords', 'datetime', 'dir', 
        'enctype', 'for', 'headers', 'height', 'href', 'hreflang', 'hspace',
        'id', 'ismap', 'label', 'lang', 'longdesc', 'maxlength', 'method',
        'multiple', 'name', 'nohref', 'noshade', 'nowrap', 'prompt', 
        'rel', 'rev', 'rows', 'rowspan', 'rules', 'scope', 'shape', 'size',
        'span', 'src', 'start', 'summary', 'tabindex', 'target', 'title', 'type',
        'usemap', 'valign', 'value', 'vspace', 'width', 'style']
    """

Initialize The Database & Static Files -----------------------

  1. Run command manage.py bower install
  2. Run command manage.py migrate

lbforum's People

Contributors

vicalloy avatar slepa avatar imunizaga avatar nyafka avatar andrii-sherepa avatar kaysackey avatar stereoit avatar baffolobill avatar ddkangfu avatar catmidia 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.