Website for Python Ireland (python.ie / pycon.ie) community, built with Django 6.0 and Wagtail CMS 7.2. Manages meetups, sponsors, speakers, and conference sessions.
- Python 3.13 (see
.tool-versions) - Docker & Docker Compose (for containerized development - recommended)
- Task (optional but recommended)
- Redis (only for local non-Docker development)
- Environment variables file as per the instructions here
-
Build the Docker image:
task docker:build # or: make docker-build -
Start supporting services:
docker compose up -d postgres redis minio
-
Run database migrations:
task django:migrate
-
Generate sample data (creates pages, navigation, meetups):
docker compose run --rm web python pythonie/manage.py generate_sample_data --settings=pythonie.settings.dev
-
Create a superuser:
docker compose run --rm web python pythonie/manage.py createsuperuser --settings=pythonie.settings.dev
-
Start the development server:
task run # or: docker compose run --rm --service-ports web python pythonie/manage.py runserver 0.0.0.0:8000 -
Visit http://127.0.0.1:8000/ to see the site with sample content
-
Access Wagtail admin at http://127.0.0.1:8000/admin/
If you prefer to develop without Docker:
- Fork the repository into your own personal GitHub account
- Clone your fork:
git clone git@github.com:YourGitHubName/website.git - Ensure you are running Python 3.13:
python -Vshould outputPython 3.13.x - Create a virtualenv:
python3 -m venv pythonie-venv - Activate the virtualenv:
source pythonie-venv/bin/activate - Install dependencies:
pip install -r requirements.txt(oruv pip install -r requirements.txt) - Set up the database:
python pythonie/manage.py migrate --settings=pythonie.settings.dev - Generate sample data:
python pythonie/manage.py generate_sample_data --settings=pythonie.settings.dev - Create a superuser:
python pythonie/manage.py createsuperuser --settings=pythonie.settings.dev - Install and run Redis server locally:
redis-server - Set Redis environment variable:
export REDISCLOUD_URL=127.0.0.1:6379 - Run the server:
python pythonie/manage.py runserver --settings=pythonie.settings.dev - Visit http://127.0.0.1:8000/ to see the site with sample content
- Visit http://127.0.0.1:8000/admin/ to log in to Wagtail admin
pythonie/
├── core/ # Base Wagtail pages (HomePage, SimplePage) and mixins
├── meetups/ # Meetup.com integration and event management
├── sponsors/ # Sponsor management with sponsorship levels
├── speakers/ # Conference speakers and sessions (Sessionize integration)
└── pythonie/
├── settings/ # Environment-specific settings (base, dev, tests, production)
├── urls.py # URL configuration
└── wsgi.py # WSGI application
# Development
task run # Run development server
task shell # Open bash shell in container
task django:shell-plus # Django shell with models pre-loaded
# Database
task django:migrate # Run migrations
task django:make-migrations # Create new migrations
task django:collect-static # Collect static files
# Sample Data (for development)
python pythonie/manage.py generate_sample_data --settings=pythonie.settings.dev
# Testing
task tests # Run test suite
make docker-tests # Alternative test command
# Code Quality
task code:format # Format code with ruff
task code:lint # Lint and fix issues
task code:check # Check without changes
# Dependencies
task dependencies:compute # Recompile dependency files
task dependencies:outdated # List outdated packages
task dependencies:upgrade # Upgrade all dependencies
task dependencies:upgrade:package PACKAGE=django # Upgrade specific package
task dependencies:security # Check for security vulnerabilities
task dependencies:tree # Show dependencies tree
# Database Operations (Heroku)
task database:pull # Pull production database to local
task database:push # Push local database to production
task database:reset # Reset local DB with production copy
task heroku:database:backups # View Heroku backups
task heroku:database:run-backup # Create a new backup
# Heroku Management
task heroku:logs # View logs in real-time
task heroku:restart # Restart the application
task heroku:shell # Django shell on Heroku
task heroku:bash # Bash shell on Heroku
task heroku:migrate # Run migrations on Heroku
task heroku:config # Show environment variables
task heroku:ps # Show dyno status
task heroku:releases # Show deployment history
task heroku:rollback # Rollback to previous release
task heroku:maintenance:on # Enable maintenance mode
task heroku:maintenance:off # Disable maintenance mode
# Conference Management
task pycon:import:sessionize # Import from Sessionize Excel
task pycon:import:sessionize:json # Update from Sessionize JSON stream# Always specify --settings=pythonie.settings.dev (or tests, production, etc.)
# Run server
python pythonie/manage.py runserver --settings=pythonie.settings.dev
# Database
python pythonie/manage.py migrate --settings=pythonie.settings.dev
python pythonie/manage.py makemigrations --settings=pythonie.settings.dev
# Create superuser
python pythonie/manage.py createsuperuser --settings=pythonie.settings.dev
# Django shell
python pythonie/manage.py shell_plus --settings=pythonie.settings.dev# Using Task (Docker)
task tests
# Using Make (Docker)
make docker-tests
# Local (all tests)
python pythonie/manage.py test pythonie --settings=pythonie.settings.tests --verbosity=2
# Run specific test module
python pythonie/manage.py test pythonie.meetups.test_meetups --settings=pythonie.settings.tests
# Verbose output
python pythonie/manage.py test pythonie --settings=pythonie.settings.tests --verbosity=3# Format code with ruff
task code:format
# Lint and fix issues
task code:lint
# Check without changes
task code:checkFor Docker development, create/edit development.env:
DJANGO_SETTINGS_MODULE=pythonie.settings.dev
PGDATABASE=pythonie
PGUSER=postgres
PGPASSWORD=pythonie
PGHOST=postgres
REDISCLOUD_URL=redis://redis:6379 # Optional, for Redis integration
MEETUP_KEY=your_meetup_api_key # Optional, for Meetup.com syncFor local development without Docker:
export REDISCLOUD_URL=127.0.0.1:6379
export MEETUP_KEY=your_meetup_api_key # Get from https://secure.meetup.com/meetup_api/key/The project is deployed on Heroku using the heroku-24 stack with PostgreSQL 17. Use Task commands for database operations:
# View backups
task heroku:database:backups
# Create a new backup
task heroku:database:run-backup
# Pull production data to local (for testing/debugging)
task database:pull
# Push local data to production (use with caution!)
task database:pushThis project uses several tools to streamline development:
- Task: Task runner for common workflows. See
Taskfile.yamlfor all available tasks. - Toast: Containerized automation for dependency management. See
toast.yml. - asdf: Tool version manager for consistent Python versions. See
.tool-versions. - uv: Fast Python package manager for dependency installation.
- Docker: Redis should work automatically via
docker compose - Local: Ensure Redis is running (
redis-server) and setREDISCLOUD_URL=127.0.0.1:6379
- Reset with production data:
task database:reset - Check PostgreSQL is running:
docker compose ps postgres - Verify environment variables in
development.env
- Check file ownership in mounted volumes
- May need to run:
sudo chown -R $USER:$USER .
- Pull latest production data:
task database:pull - Or create fresh migrations:
task django:make-migrations
- Rebuild Docker image:
task docker:build - Reinstall dependencies:
pip install -r requirements.txt
- Fork the repository into your own GitHub account
- Create a feature branch:
git checkout -b feature/my-new-feature - Make your changes and test thoroughly
- Format your code:
task code:format - Run tests:
task tests - Commit your changes with clear messages
- Push to your fork and create a Pull Request