Getting Started with Development
Django Admin Tabs uses Docker for development to ensure a consistent environment across all contributors.Prerequisites
- Git
- Docker and Docker Compose
- Make (optional, but recommended)
Setting Up the Development Environment
Start the development environment
- Build the Docker container
- Install all dependencies
- Start the Django development server
- Make the example project available at http://localhost:8000
Access the example project
Once the containers are running, visit http://localhost:8000/admin in your browser to see the example polls application with tabbed admin.
The
make dev command uses Docker Compose to set up the entire environment. You don’t need to manually install Python, Django, or any dependencies.Running the Example Project
The example project is a complete Django application demonstrating Django Admin Tabs with a Poll/Choice/Answer voting system.Creating a Superuser
To log into the admin interface, you’ll need a superuser account:Example Project Structure
Key Features to Explore
Running Tests
The test suite ensures Django Admin Tabs works correctly across different Django versions.Run All Tests
Manual Testing
For manual testing and debugging:Development Workflow
Making Changes
Make your changes
Edit files in the
django_admin_tabs/ directory. The development server will automatically reload when you save files.Run pre-commit hooks
Available Make Commands
| Command | Description |
|---|---|
make dev | Start development containers with the example project |
make test | Run the test suite |
make superuser | Create a Django superuser |
make shell | Open a Django shell |
make migrate | Run database migrations |
make makemigrations | Create new migrations |
make showmigrations | Show migration status |
make pre-commit | Run pre-commit hooks (formatting, linting) |
make cleanpy | Remove .pyc files and pycache |
make clean | Full cleanup including virtual environment |
Project Structure
Code Quality Tools
The project uses several tools to maintain code quality:Pre-commit Hooks
Pre-commit hooks are configured in.pre-commit-config.yaml and run automatically before each commit. They include:
- Ruff: Fast Python linter and formatter
- Trailing whitespace removal
- End-of-file fixes
- YAML validation
Ruff Configuration
Ruff is used for both linting and formatting. Configuration is inpyproject.toml.
Contributing Guidelines
Before Submitting a PR
Test with the example project
Verify your changes work correctly with the example polls application:
Pull Request Process
- Fork the repository on GitHub
- Create a feature branch from
main - Make your changes with clear, descriptive commits
- Push to your fork and submit a pull request
- Respond to review feedback from maintainers
Getting Help
If you run into issues during development:- Check the GitHub Issues for similar problems
- Review the example project in the
example/directory - Ask questions by opening a new issue with the “question” label
License
Django Admin Tabs is licensed under the Apache Software License. See theLICENSE file for details.