Code of Conduct
By participating in this project, you agree to abide by the Wagtail Code of Conduct.Getting Started
Fork the Repository
If you don’t have write access to the repo, start by forking it:
If you have write access, you can clone the main repository directly.
Set Up Development Environment
Follow the development setup guide to configure your local environment:
Create a Branch
Create a feature branch for your changes:
Use descriptive branch names like
feature/add-recipe-model or fix/broken-image-uploadCommit Your Changes
Commit with clear, descriptive messages:
Commit Message Guidelines
Commit Message Guidelines
Good commit messages:
- Use present tense (“Add feature” not “Added feature”)
- Use imperative mood (“Move cursor to…” not “Moves cursor to…”)
- First line is a summary (50 chars or less)
- Include detailed explanation after a blank line if needed
- Reference issues and PRs with
#number - Use
Closes #123orFixes #123to automatically close issues
Push and Create Pull Request
Push your branch and create a pull request:Then visit GitHub and create a pull request with:
- Clear description of changes
- Reference to related issues
- Screenshots for UI changes
- Test results or coverage information
Development Workflow
For Contributors Without Write Access
- Fork the repository
- Create a feature branch
- Make changes and commit
- Push to your fork
- Submit a pull request
- Wait for review and address feedback
For Contributors With Write Access
If you have write access, use your best judgement about committing directly to master. All non-trivial development should be done on a branch.
- Create a PR that’s not ready for review
- Assign the work in progress label
- When ready for review:
- Remove work in progress label
- Assign needs review label
- Typo fixes
- Documentation updates
- Minor style adjustments
- Dependency updates (with testing)
- New features
- Refactoring
- Breaking changes
- Significant bug fixes
Coding Standards
Python Code Style
The project uses Ruff for code formatting and linting. Configuration:ruff.toml
Template Style
The project uses:- djhtml for Django template formatting
- curlylint for template linting
JavaScript/CSS Style
The project uses:- ESLint for JavaScript linting
- Prettier for code formatting
- Stylelint for CSS linting
Pre-commit Hooks
The project uses pre-commit to run checks before commits. Setup:.pre-commit-config.yaml
The hooks automatically:
- Format Python code with Ruff
- Format templates with djhtml
- Lint templates with curlylint
- Format JS/CSS with Prettier
- Check for common issues
Testing Guidelines
Writing Tests
Test Structure:Manual Testing Checklist
Before submitting a PR:- All tests pass
- Code is formatted with Ruff
- No linting errors
- Changes work in multiple browsers (if UI changes)
- Changes work with demo data
- Documentation updated (if needed)
- Migration files included (if model changes)
Documentation
When to Update Documentation
Update documentation when:- Adding new features
- Changing existing behavior
- Adding management commands
- Updating dependencies
- Fixing significant bugs
Documentation Style
- Use clear, concise language
- Include code examples
- Add screenshots for UI changes
- Keep README.md up to date
- Update inline code comments
Issue Tracking
Reporting Bugs
When reporting bugs, include:- Description: Clear description of the issue
- Steps to reproduce:
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Environment:
- OS: macOS 13.0
- Python: 3.11
- Django: 6.0
- Wagtail: 7.2
- Screenshots: If applicable
- Error logs: Full traceback if available
Feature Requests
When requesting features:- Use case: Why is this needed?
- Proposed solution: How should it work?
- Alternatives: Other approaches considered?
- Examples: Similar features in other projects?
Pull Request Guidelines
PR Description Template
Review Process
Commit Message Guidelines
Cross-Reference Issues
Always cross-reference and close issues in commit messages:close,closes,closedfix,fixes,fixedresolve,resolves,resolved
Preparing Fixture Data
If you change content or images and need to prepare a new fixture file:Optimize Images
- Resize images to 1200px wide
- Use JPEG compression at 60%
- Place in
media/original_images(notmedia/images)
media/images is in .gitignore but media/original_images is tracked in version control.Getting Help
Community Resources
Wagtail Slack
Join the community chat
GitHub Discussions
Ask questions and share ideas
Stack Overflow
Search for existing solutions
Wagtail Documentation
Official documentation
Maintainer Contact
For urgent issues or security concerns:- Open a GitHub issue
- Contact maintainers on Slack
- Email security issues to [email protected]
Recognition
Contributors are recognized in:- GitHub contributors list
- Release notes (for significant contributions)
- Project documentation (where appropriate)

