Skip to content
Merged
12 changes: 6 additions & 6 deletions .claude/commands/commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ When analyzing the diff, consider splitting commits based on these criteria:
## Examples

**Good commit messages for this Django/Wagtail project:**
- ✨ feat: add speaker bio field to Speaker model
- ✨ feat: add dark mode toggle to website header
- ✨ feat: implement new StreamField block for video embeds
- 🐛 fix: correct sponsor logo display on homepage
- 🐛 fix: resolve meetup sync timezone issue
- 📝 docs: update CLAUDE.md with new task commands
- ♻️ refactor: simplify SpeakersPage queryset logic
- ♻️ refactor: simplify HomePage queryset logic
- ♻️ refactor: extract common page mixins to core app
- 🎨 style: improve Wagtail admin panel layout
- 🔥 chore: remove deprecated Meetup API v2 code
Expand All @@ -82,17 +82,17 @@ When analyzing the diff, consider splitting commits based on these criteria:
- 💚 fix: resolve failing Docker build
- 🔒️ fix: patch Django security vulnerability
- ♿️ feat: improve navigation accessibility for screen readers
- 🗃️ chore: add migration for new Session fields
- 🗃️ chore: add migration for new Meetup fields
- 🌐 feat: add French translation for sponsor pages

**Example of splitting commits:**

If you modify both a Wagtail page model AND update a management command, split into:
1. ✨ feat: add session_type field to Session model
2. ♻️ refactor: update import-sessionize command to handle new field
1. ✨ feat: add url field to Sponsor model
2. ♻️ refactor: update sponsor display logic to include links

If you fix multiple unrelated issues, split into:
1. 🐛 fix: correct speaker ordering on TalksPage
1. 🐛 fix: correct meetup ordering on HomePage
2. 🐛 fix: resolve Redis connection timeout in dev settings
3. 🗃️ chore: add missing migration for sponsors app

Expand Down
16 changes: 1 addition & 15 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

This is the Python Ireland (python.ie / pycon.ie) website, built with Django 6.0 and Wagtail CMS 7.2. It manages content for the Python Ireland community including meetups, sponsors, speakers, and PyCon talks/sessions.
This is the Python Ireland (python.ie / pycon.ie) website, built with Django 6.0 and Wagtail CMS 7.2. It manages content for the Python Ireland community including meetups and sponsors.

### Python Version

Expand All @@ -19,7 +19,6 @@ The project follows a modular Django app structure within the `pythonie/` direct
- **core**: Base Wagtail pages (HomePage, SimplePage) with StreamField content blocks. Implements PageSegment snippets and mixins (MeetupMixin, SponsorMixin) for common functionality.
- **meetups**: Manages Meetup.com integration for Python Ireland meetups. Includes a management command `updatemeetups` to sync with Meetup API.
- **sponsors**: Sponsor management with SponsorshipLevel relationships.
- **speakers**: Speaker and Session (talk/workshop) management for conferences. Includes Sessionize integration via management commands (`import-sessionize`, `update-sessionize-json-stream`).

### Settings Configuration

Expand Down Expand Up @@ -208,26 +207,13 @@ task heroku:maintenance:on
task heroku:maintenance:off
```

### Conference Management

```bash
# Import speakers/sessions from Sessionize
task pycon:import:sessionize
# or: docker compose run web python pythonie/manage.py import-sessionize --file sessionize.xlsx

# Update from Sessionize JSON stream
task pycon:import:sessionize:json
```

## Important Implementation Notes

### Wagtail Page Models

All page types inherit from `wagtail.models.Page`. The page tree structure:
- HomePage (root, can have child HomePage or SimplePage)
- SimplePage
- SpeakersPage → Speaker pages
- TalksPage → Session pages

Pages use StreamFields for flexible content blocks (heading, paragraph, video, image, slide, html).

Expand Down
31 changes: 15 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ website/
├── pythonie/ # Main Django project
│ ├── core/ # Base pages and templates
│ ├── meetups/ # Meetup.com integration
│ ├── speakers/ # Conference speakers/sessions
│ ├── sponsors/ # Sponsor management
│ └── pythonie/ # Django settings
├── requirements/ # Dependency files
Expand Down Expand Up @@ -112,7 +111,7 @@ python pythonie/manage.py runserver --settings=pythonie.settings.dev
Use descriptive branch names with prefixes:

```
feature/add-speaker-profile-images
feature/add-dark-mode-toggle
bugfix/fix-meetup-sync-error
docs/update-readme
refactor/simplify-sponsor-model
Expand Down Expand Up @@ -144,7 +143,7 @@ refactor/simplify-sponsor-model
5. **Commit your changes** with clear messages:
```bash
git add .
git commit -m "Add speaker profile image upload feature"
git commit -m "Add dark mode toggle feature"
```

6. **Push and create a Pull Request**:
Expand Down Expand Up @@ -244,7 +243,7 @@ task tests
# or: python pythonie/manage.py test pythonie --settings=pythonie.settings.tests -v 2

# Specific app
python pythonie/manage.py test pythonie.speakers --settings=pythonie.settings.tests
python pythonie/manage.py test pythonie.meetups --settings=pythonie.settings.tests

# Specific test file
python pythonie/manage.py test pythonie.meetups.test_meetups --settings=pythonie.settings.tests
Expand All @@ -261,24 +260,24 @@ Place tests in `test_*.py` files within each app:
from django.test import TestCase
from model_mommy import mommy

from pythonie.speakers.models import Speaker
from pythonie.sponsors.models import Sponsor


class SpeakerTestCase(TestCase):
"""Tests for the Speaker model."""
class SponsorTestCase(TestCase):
"""Tests for the Sponsor model."""

def setUp(self):
"""Set up test fixtures."""
self.speaker = mommy.make(Speaker, name="Test Speaker")
self.sponsor = mommy.make(Sponsor, name="Test Sponsor")

def test_speaker_str(self):
def test_sponsor_str(self):
"""Test string representation."""
self.assertEqual(str(self.speaker), "Test Speaker")
self.assertEqual(str(self.sponsor), "Test Sponsor")

def test_speaker_creation(self):
"""Test speaker can be created."""
speaker = mommy.make(Speaker)
self.assertIsNotNone(speaker.id)
def test_sponsor_creation(self):
"""Test sponsor can be created."""
sponsor = mommy.make(Sponsor)
self.assertIsNotNone(sponsor.id)
```

### Test Requirements
Expand All @@ -294,7 +293,7 @@ class SpeakerTestCase(TestCase):
### Pull Request Guidelines

1. **Title**: Clear, descriptive title
- Good: "Add speaker profile image upload"
- Good: "Add sponsor logo upload feature"
- Bad: "Fix stuff" or "Updates"

2. **Description**: Include:
Expand Down Expand Up @@ -352,7 +351,7 @@ Types:

Examples:
```
feat: Add speaker bio character limit validation
feat: Add dark mode toggle to website header

fix: Resolve meetup sync timezone issue

Expand Down
Loading