Skip to main content

Django-powered image/textboard engine.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangochan-0.1.0.tar.gz (539.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djangochan-0.1.0-py3-none-any.whl (38.1 kB view details)

Uploaded Python 3

File details

Details for the file djangochan-0.1.0.tar.gz.

File metadata

  • Download URL: djangochan-0.1.0.tar.gz
  • Upload date:
  • Size: 539.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for djangochan-0.1.0.tar.gz
Algorithm Hash digest
SHA256 68cbe1a32d9ac431996be7f305cc17c4766f5e965509589683a70aaab1251ec8
MD5 773a755df211d6710b9b901015481d23
BLAKE2b-256 aabeb3836d8ef81011dd0412a51f4b6fd7592af438f9d433062e8096c9962eaf

See more details on using hashes here.

File details

Details for the file djangochan-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: djangochan-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for djangochan-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7787802c9151706b71d16494c0939044e9daa4c1e014945214479db3ac0b2d34
MD5 6f41a60534caae1e9fea56e2a503ef5c
BLAKE2b-256 9415cd80629694745a978b6364b2e4d6b9d14f0857737a84a3a473b9b552408c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page