Django application that provides a simple and modern forum board software for your Django website.
Project description
PunkwebBB
PunkwebBB is a Django application that provides a simple and modern forum board software for your Django website.
This is the successor to punkweb-boards.
Check out punkweb.net for documentation, support and a live demonstration of the software.
Built with
Requirements
- Python 3.9+
- Django 4.2+
- django-precise-bbcode 1.2+
- Pillow
It may work with older versions of Python and Django, but it has not been tested.
Installation
pip install punkweb-bb
Add precise_bbcode
and punkweb_bb
to your INSTALLED_APPS
in your Django settings module:
INSTALLED_APPS = [
...
"precise_bbcode",
"punkweb_bb",
]
Note: precise_bbcode
is required. It must be installed before punkweb_bb
.
Add the following middleware to your MIDDLEWARE
setting:
MIDDLEWARE = [
...
"punkweb_bb.middleware.ProfileOnlineCacheMiddleware",
]
Add the following context processor to your TEMPLATES
setting:
TEMPLATES = [
{
...
"OPTIONS": {
"context_processors": [
...
"punkweb_bb.context_processors.punkweb_bb",
],
},
},
]
Add the following URL pattern to your urls.py
:
from django.urls import path, include
urlpatterns = [
...
path("forum/", include("punkweb_bb.urls")), # or any other path you want
]
And finally, install the models:
python manage.py migrate
Configuration
These are the default settings for PunkwebBB, which can be overridden in your Django settings module:
PUNKWEB_BB = {
"SITE_NAME": "PUNKWEB",
"SITE_TITLE": "PunkwebBB",
"FAVICON": "punkweb_bb/favicon.ico",
"OG_IMAGE": None, # Used for Open Graph meta tags, must be a full URL!
"SHOUTBOX_ENABLED": True,
"DISCORD_WIDGET_ENABLED": False,
"DISCORD_WIDGET_THEME": "dark",
"DISCORD_SERVER_ID": None, # Found under Server Settings > Widget > Server ID
}
Testing
Report:
coverage run && coverage report
HTML:
coverage run && coverage html
Found 57 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
.........................................................
----------------------------------------------------------------------
Ran 57 tests in 8.824s
OK
Destroying test database for alias 'default'...
Name Stmts Miss Cover
----------------------------------------------------------------
punkweb_bb/__init__.py 0 0 100%
punkweb_bb/admin.py 41 1 98%
punkweb_bb/admin_forms.py 28 0 100%
punkweb_bb/apps.py 6 0 100%
punkweb_bb/bbcode_tags.py 115 3 97%
punkweb_bb/context_processors.py 3 0 100%
punkweb_bb/forms.py 35 0 100%
punkweb_bb/middleware.py 10 0 100%
punkweb_bb/mixins.py 11 0 100%
punkweb_bb/models.py 124 0 100%
punkweb_bb/pagination.py 11 4 64%
punkweb_bb/parsers.py 50 2 96%
punkweb_bb/response.py 3 0 100%
punkweb_bb/settings.py 6 0 100%
punkweb_bb/signals.py 9 0 100%
punkweb_bb/templatetags/__init__.py 0 0 100%
punkweb_bb/templatetags/humanize_int.py 9 5 44%
punkweb_bb/templatetags/shoutbox_bbcode.py 9 0 100%
punkweb_bb/tests.py 410 0 100%
punkweb_bb/urls.py 4 0 100%
punkweb_bb/views.py 174 17 90%
punkweb_bb/widgets.py 8 0 100%
----------------------------------------------------------------
TOTAL 1066 32 97%
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
Built Distribution
Hashes for punkweb_bb-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1667c108f0d397f184d1ff8efb1df85eef85d23d807fe39a1d1d572dbb44d70 |
|
MD5 | c996982e5a1dc5a7967d91f99c536873 |
|
BLAKE2b-256 | 6ce2be198865c602be13820ea9cd3e66cbafcf4215d31e698155a8673dc07511 |