Thank you for your interest in contributing to QuakerCMS! This guide will help you set up your development environment and get started.
- Python 3.12 or higher
- uv package manager
- Git
git clone https://github.com/WesternFriend/QuakerCMS.git
cd QuakerCMScurl -LsSf https://astral.sh/uv/install.sh | shpowershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Alternatively, install via pip:
pip install uvCreate a virtual environment and install all dependencies:
uv syncThis command will:
- Create a virtual environment in
.venv/ - Install all project dependencies
- Install development dependencies (like
rufffor linting) automatically
source .venv/bin/activate.venv\Scripts\Activate.ps1.venv\Scripts\activate.batcd srcSet up the database by running the initial migrations:
python manage.py migrateCreate an admin account to access the Wagtail admin interface:
python manage.py createsuperuserFollow the prompts to create your admin account with username, email, and password.
Start the Django development server:
python manage.py runserverQuakerCMS uses Tailwind CSS with DaisyUI for styling. You need to install the Node.js dependencies:
# Navigate to the Tailwind source directory
cd theme/static_src
# Install npm dependencies
npm install
# Return to the src directory
cd ../..To quickly set up sample pages and navigation menu for development:
# This creates test pages (About, Programs, Contact) and configures the navigation menu
python manage.py scaffold_navbar_contentThis command creates:
- About page (top-level)
- Programs page with a dropdown containing:
- Programs overview
- Adult Education
- Youth Programs
- FGC Website external link
- Contact page (top-level)
To reset and recreate the test content:
python manage.py scaffold_navbar_content --deleteOnce the server is running, you can access:
- Main site: http://127.0.0.1:8000/
- Wagtail admin: http://127.0.0.1:8000/admin/
Log in to the admin interface using the superuser credentials you created in step 7.
For a quick setup using Docker:
# Clone the repository
git clone https://github.com/WesternFriend/QuakerCMS.git
cd QuakerCMS
# Build and run with Docker Compose
docker-compose up --build
# In another terminal, create a superuser
docker-compose exec web python manage.py createsuperuserAccess the site at http://localhost:8000/
QuakerCMS requires two development servers running simultaneously:
- Django development server - Serves the application
- Tailwind CSS watcher - Automatically rebuilds CSS when files change
Terminal 1 - Django Server:
cd src
python manage.py runserverTerminal 2 - Tailwind CSS Watcher:
cd src/theme/static_src
npm run devThis setup provides:
- ✅ Auto-reload when Python/template files change (Django)
- ✅ Auto-rebuild CSS when templates/classes change (Tailwind)
- ✅ Live browser refresh with django-browser-reload (in DEBUG mode)
If you have honcho installed (part of django-tailwind optional dependencies):
cd src
python manage.py tailwind devThis runs both servers together, but requires the honcho package.
The navigation menu is configured in Wagtail Admin → Settings → Navigation Menu.
Use the scaffold command to quickly set up test pages and navigation:
# First time setup or when you need fresh test data
python manage.py scaffold_navbar_content
# Reset existing test data and recreate
python manage.py scaffold_navbar_content --delete
# Create pages only (skip navigation menu configuration)
python manage.py scaffold_navbar_content --skip-menuTo manually configure the navigation menu:
- Go to Wagtail Admin (http://127.0.0.1:8000/admin/)
- Navigate to Settings → Navigation Menu
- Add menu items using the StreamField:
- Page Link - Links to Wagtail pages
- External Link - Links to external URLs
- Dropdown - Creates a dropdown with nested items (max 2 levels)
The navigation system automatically:
- Shows the current page with
aria-current="page" - Links to translated versions in multilingual sites
- Provides mobile-responsive drawer navigation
- Ensures WCAG 2.1 AA accessibility compliance
This project uses ruff for code linting and formatting, along with pre-commit hooks to automatically maintain code quality.
Pre-commit hooks will automatically run code quality checks before each commit:
# Install pre-commit hooks (one-time setup)
uv run pre-commit install
# Manually run hooks on all files (optional)
uv run pre-commit run --all-filesOnce installed, the hooks will run automatically on staged files before each commit.
You can also run code quality checks manually:
# Run linting and automatically fix issues
uv run ruff check --fix .
# Run formatting
uv run ruff format .You can also run linting without auto-fixing to see what issues exist:
# Run linting without auto-fix (view-only)
uv run ruff check .To add new dependencies:
# Add a runtime dependency
uv add package-name
# Add a development dependency
uv add --dev package-name# Run tests with Django test runner
python manage.py test
# Run tests with pytest (alternative)
uv run pytest
# Run tests with coverage
coverage run --source='.' manage.py test
coverage report
coverage html # Generate HTML coverage reportNote: All tests also run automatically in our GitHub Actions CI pipeline when you create a pull request.
To update all dependencies to their latest compatible versions:
uv sync --upgradeQuakerCMS/
├── .github/
│ ├── ISSUE_TEMPLATE/ # Issue templates for bugs, features, questions
│ ├── workflows/
│ │ └── ci.yml # GitHub Actions CI pipeline
│ ├── dependabot.yml # Automated dependency updates
│ └── pull_request_template.md # PR template
├── src/ # Django project root
│ ├── core/ # Main Django app with settings
│ │ ├── settings/ # Settings split by environment (base, dev, production)
│ │ ├── constants.py # Shared constants (e.g., language codes)
│ │ └── templates/ # Core templates (base.html, 404, 500)
│ ├── home/ # Home page app
│ ├── content/ # General content pages with StreamField
│ ├── navigation/ # Navigation menu system
│ │ ├── blocks.py # StreamField blocks for menu items
│ │ ├── models.py # NavigationMenuSetting model
│ │ ├── templatetags/ # Template tags for rendering navigation
│ │ ├── templates/ # Navigation template
│ │ ├── management/ # Management commands (scaffold_navbar_content)
│ │ └── README.md # Navigation system documentation
│ ├── locales/ # Internationalization settings
│ ├── search/ # Search functionality
│ ├── theme/ # Tailwind CSS theme
│ │ └── static_src/ # Tailwind source files
│ │ ├── src/
│ │ │ └── styles.css # Tailwind configuration
│ │ ├── package.json # Node.js dependencies
│ │ └── postcss.config.js
│ └── manage.py # Django management script
├── docs/ # Documentation
├── specs/ # Feature specifications and planning
├── .pre-commit-config.yaml # Pre-commit hooks configuration
├── CHANGELOG.md # Project changelog
├── docker-compose.yml # Docker development environment
├── Dockerfile # Docker configuration
├── pyproject.toml # Project configuration and dependencies
├── requirements.txt # Generated requirements file (for deployment)
├── SECURITY.md # Security policy
├── uv.lock # Locked dependency versions
└── README.md # Project overview
-
Create a new branch for your feature or fix:
git checkout -b feature/your-feature-name
-
Make your changes following the project's coding standards
-
Test your changes thoroughly
-
Run linting and formatting:
uv run ruff check --fix . uv run ruff format .
-
Commit your changes with a descriptive message:
git commit -m "Add descriptive commit message" -
Push your branch and create a pull request
The project uses GitHub Actions for continuous integration. When you create a pull request, the CI pipeline will automatically:
- Test Matrix: Run tests on Python 3.12 and 3.13
- Code Quality: Run pre-commit hooks including ruff linting and formatting
- Django Checks: Run Django system checks and security checks
- Database: Test database migrations
All checks must pass before a pull request can be merged. You can view the status of these checks on your pull request page.
Problem: Navigation menu or other components appear unstyled.
Solution: Make sure the Tailwind CSS watcher is running:
cd src/theme/static_src
npm run devIf styles are still missing:
# Rebuild Tailwind CSS in production mode
npm run build
# Then hard refresh your browser (Cmd+Shift+R on macOS, Ctrl+Shift+R on Windows/Linux)Problem: The accessibility skip link appears all the time instead of only on focus.
Solution: The Tailwind CSS watcher needs to be running. The sr-only utility class requires compiled CSS:
cd src/theme/static_src
npm run devProblem: No navigation menu shows on pages.
Solutions:
-
Check if navigation menu is configured:
- Go to Wagtail Admin → Settings → Navigation Menu
- Add at least one menu item
-
Use the scaffold command:
cd src python manage.py scaffold_navbar_content -
Check if pages exist: The menu only shows published pages.
Problem: Error like 'NoneType' object has no attribute '_inc_path' when creating pages.
Solution: Fix the page tree structure:
cd src
python manage.py fixtreeThe scaffold_navbar_content --delete command automatically runs this after deletion.
Problem: Errors when running python manage.py migrate.
Solution:
# Check for migration conflicts
python manage.py makemigrations --check
# If there are unapplied migrations, apply them
python manage.py migrate
# If you have migration conflicts, you may need to merge migrations
python manage.py makemigrations --mergeProblem: ModuleNotFoundError when running Django commands.
Solution: Make sure your virtual environment is activated:
# Activate the virtual environment
source .venv/bin/activate # macOS/Linux
.venv\Scripts\Activate.ps1 # Windows PowerShell
# Verify Django is installed
python -c "import django; print(django.get_version())"If Django is not installed:
# Reinstall dependencies
uv syncIf you encounter any issues or have questions:
- Check the existing issues on GitHub
- Create a new issue with detailed information about your problem
- Reach out to the maintainers
# Start Django development server
cd src
python manage.py runserver
# Start Tailwind CSS watcher
cd src/theme/static_src
npm run dev
# Create test navigation content
cd src
python manage.py scaffold_navbar_content
# Reset and recreate test content
python manage.py scaffold_navbar_content --delete
# Run tests
cd src
python manage.py test
# Run linting and formatting
uv run ruff check --fix .
uv run ruff format .
# Fix page tree issues
cd src
python manage.py fixtree
# Create database migrations
cd src
python manage.py makemigrations
# Apply migrations
python manage.py migrate
# Create superuser
python manage.py createsuperuser- Main Site: http://127.0.0.1:8000/
- Wagtail Admin: http://127.0.0.1:8000/admin/
- Navigation Menu Settings: http://127.0.0.1:8000/admin/settings/navigation/navigationmenusetting/
src/core/settings/base.py- Main Django settingssrc/core/constants.py- Shared constants (language codes, etc.)src/navigation/models.py- Navigation menu modelsrc/navigation/templatetags/navigation_tags.py- Navigation rendering logicsrc/theme/static_src/src/styles.css- Tailwind CSS configurationpyproject.toml- Project dependencies and configuration
- Always run both servers (Django + Tailwind) for development
- Use
scaffold_navbar_contentto quickly set up test pages - Run
fixtreeif you encounter page tree errors - Hard refresh browser (Cmd+Shift+R / Ctrl+Shift+R) if CSS changes don't appear
- Check pre-commit hooks run before commits for code quality
By contributing to QuakerCMS, you agree that your contributions will be licensed under the AGPL-3.0-or-later license.