Askbot is a Django-based Q&A forum (like StackOverflow). Django 4.2, Python 3.8+, PostgreSQL recommended.
# Install
pip install -e .
askbot-setup
# Pre-commit (required)
pre-commit install- Test project:
testproject/ - Virtual env may be specified in task files
If you want to override settings - either django or askbot livesettings - use decorators designed for this, not context managers, if the setting value should not change during the test.
# Tox (recommended)
tox
Use virtual environment `env-md`
# Direct
cd askbot_site/
../env-md/bin/python manage.py test --parallel 8 askbot.tests askbot.deps.django_authopenid.tests
# Database config (if needed)
DB_TYPE=postgres DB_USER=askbot DB_PASS=askB0T! DB_HOST=localhost DB_PORT=5432 DB_NAME=askbotfortoxBefore writing new tests: Check if the desired test already exists. Search existing test files for similar test cases. If a test exists, inform the developer. If not, plan the new test.
Use manage.py shell with heredoc for one-off scripts that need Django context:
cd askbot_site && ../env-md/bin/python manage.py shell << 'EOF'
from askbot.utils.markup import markdown_input_converter
result = markdown_input_converter("**test**")
print(result)
EOFThis properly initializes Django settings and all app configurations.
All client side media assets are located in askbot/media. Sass files are in askbot/media/sass.
Javascript
To rebuild css files from sass and the help panel, refer to askbot/media/CLAUDE.md
This project uses bd (beads). Run bd onboard to get started.
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --status in_progress # Claim work
bd close <id> # Complete work
bd sync # Sync with git
bd new "<title>" # Create a new issue
bd comments <id> # List comments on an issue
bd comments add <id> "message" # Add a commentDependencies: bd dep <blocker> --blocks <blocked> | bd dep tree <id>
Making issues part of an epic If I ask an issue X to be part of certain epic E, the issue in question must be blocking
the said epic issue - i.e. bd dep <X-id> --blocks <E-id>
Creating issues: Issues must be self-sufficient—include all necessary context, acceptance criteria, and relevant file paths so that implementing them requires no additional hand-typed context (e.g., "implement issue X" should be enough).
Use /land skill when ending a work session.
Changelog is in askbot/doc/source/changelog.rst
- all new edits should be appended to thes section "Development (not yet released)"
- entries must be brief - ideally 1 liners, should not be too technical
See .claude/docs/architecture.md for detailed architecture reference including:
- Django app structure and core models
- Configuration system (Livesettings)
- Template system (Jinja2)
- Authentication (django_authopenid fork)
- Multi-language support, search, email, Celery tasks
Comments in the code must:
- be concise
- limit use of the technical jargon
- must be written in clear simple English
- should not cross reference files or lines of code - that info rots quickly
Python code must adhere to PEP8 standards.