Skip to main content

djangochan

A django-powered image/textboard engine. It's split to a core app with the boards and posts models, a boards app with hmtx-dynamic template-based server-rendered front-end, and a read-only (for time being) JSON API utilizing Django REST framework.

You can set everything up with the djangochan CLI; no source checkout needed. Site profile (title, description, others) is editable in the admin panel.

Installation

  1. Create/activate a Python 3.10+ virtualenv.
  2. Install: pip install djangochan (or python -m pip install -e . from source).
  3. In an empty working directory, run djangochan init --admin-password yourpass to create .env, run migrations, create admin, and collect static files. Add --sample-data to load boards/profile from djangochan/sample.py.
  4. Start: djangochan runserver (or python -m djangochan runserver).

Configuration & overrides

  • .env is created in your working directory by djangochan init; tweak secrets, hosts, paths as needed. A packaged .env.dist template is used when creating it.
  • Media/static: djangochan init creates media/ and static/; adjust STATIC_ROOT/MEDIA_ROOT in settings or .env as needed.
  • Templates/static overrides: use STATICFILES_DIRS to point at your own theme/assets if you want to rebrand without forking.

This is mainly an educational project for myself to learn Django, and as a template to follow for future projects. Issues and bug reports welcome, contributions too considering previous.

There's a test instance deployed on PythonAnywhere, linked in repo details, where someone can check how project looks like. It updates from this repo and resets once daily (gonna be doing the reset irregularly so it isn't permanently in wasteland mode).

TODO

  • refactor search, thread, incl/threads_list, reply templates (currently they share large parts)
  • add per-board max filesize+
  • add ip-based post limit (needed to prevent spam, theoretically server could do that)
  • add ip-based ban (probably useless for users, and actual spam bots could be handled by server)
  • improve htmx utilization (currently overlying on hx-boost)
  • improve site and admin panel design (django project site has cool design and colorscheme to base on, also check simple.css)
  • improve caching, maybe save rendered text
  • provide posting via JSON API (requires changes to simple-math-captcha)
  • add pagination
  • add capcodes
  • quote link preview utilizing the htmx or json api
  • file deduplication+
  • file filter+
  • add tests to all apps+

Project considered feature complete after those are done.

Dependencies

  • Django
  • django-environ
  • django-precise-bbcode
  • django-simple-math-captcha
  • djangorestframework
  • passlib (for tripcode hashing after crypt removal)
  • sorl-thumbnail

Similar

Projects to copy ideas get inspiration from.

Metadata

Release files for djangochan 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djangochan 0.1.0
File Size Uploaded
djangochan-0.1.0.tar.gz 539.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for djangochan 0.1.0
File Interpreter ABI Platform
djangochan-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 577.5 kB

Release files / djangochan-0.1.0.tar.gz

Download URL djangochan-0.1.0.tar.gz
Size 539.3 kB
Tags Source
SHA-256 checksum
How to use checksums
68cbe1a32d9ac431996be7f305cc17c4766f5e965509589683a70aaab1251ec8
BLAKE2b-256 checksum
How to use checksums
aabeb3836d8ef81011dd0412a51f4b6fd7592af438f9d433062e8096c9962eaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / djangochan-0.1.0-py3-none-any.whl

Download URL djangochan-0.1.0-py3-none-any.whl
Size 38.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7787802c9151706b71d16494c0939044e9daa4c1e014945214479db3ac0b2d34
BLAKE2b-256 checksum
How to use checksums
9415cd80629694745a978b6364b2e4d6b9d14f0857737a84a3a473b9b552408c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page