Skip to content

Commit 83c6a0b

Browse files
authored
🎨 Code formatting with Ruff (#183)
* 📝 docs: update documentation for Django 6.0, Wagtail 7.2.1, and heroku-24 stack * 🎨 style: format code with Ruff (imports and whitespace cleanup)
1 parent 966ab4b commit 83c6a0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+118
-127
lines changed

CLAUDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
This is the Python Ireland (python.ie / pycon.ie) website, built with Django 5.2 and Wagtail CMS 7.2. It manages content for the Python Ireland community including meetups, sponsors, speakers, and PyCon talks/sessions.
7+
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.
88

99
### Python Version
1010

11-
This project requires **Python 3.13**. All code must be compatible with Python 3.13. When developing locally without Docker, ensure you are using Python 3.13.x.
11+
This project requires **Python 3.13.11** (or any Python 3.13.x). All code must be compatible with Python 3.13. When developing locally without Docker, ensure you are using Python 3.13.x.
1212

1313
## Architecture
1414

@@ -42,8 +42,8 @@ Always specify settings module: `--settings=pythonie.settings.dev` (or `tests`,
4242

4343
### Key Dependencies
4444

45-
- Django ~5.2.0
46-
- Wagtail ~7.2.0 (CMS framework)
45+
- Django 6.0
46+
- Wagtail 7.2.1 (CMS framework)
4747
- Redis (caching, configured via `REDISCLOUD_URL`)
4848
- WhiteNoise (static file serving)
4949
- boto3/django-storages (S3 integration)
@@ -260,7 +260,7 @@ Tests use `pythonie.settings.tests` which configures SQLite and mock Redis. Run
260260

261261
### Deployment
262262

263-
The project is hosted on Heroku.
263+
The project is hosted on Heroku using the **heroku-24** stack with PostgreSQL 17.
264264

265265
### Upgrading Wagtail
266266

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ refactor/simplify-sponsor-model
158158

159159
### Python
160160

161-
- **Python version**: 3.13 (strict requirement)
161+
- **Python version**: 3.13.11 (or any Python 3.13.x - strict requirement)
162162
- **Formatter**: Ruff
163163
- **Line length**: 88 characters (Ruff default)
164164
- **Imports**: Sorted automatically by Ruff

DEVELOPMENT.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222

2323
### Tech Stack
2424

25-
- **Framework**: Django 5.2.8
26-
- **CMS**: Wagtail 7.2
27-
- **Python**: 3.13 (required)
25+
- **Framework**: Django 6.0
26+
- **CMS**: Wagtail 7.2.1
27+
- **Python**: 3.13.11 (or any Python 3.13.x - required)
2828
- **Database**: PostgreSQL 17 (prod and dev via Docker)
2929
- **Cache**: Redis 6.2
3030
- **Storage**: AWS S3 (prod), Local (dev)
3131
- **Server**: Gunicorn (prod), Runserver (dev)
3232
- **Containerization**: Docker + docker-compose
3333
- **Automation**: Task (Taskfile.yaml)
34-
- **Deployment**: Heroku
34+
- **Deployment**: Heroku (heroku-24 stack)
3535

3636
### Project Statistics
3737

@@ -105,7 +105,7 @@ pythonie/
105105

106106
### Prerequisites
107107

108-
- Python 3.13 (required)
108+
- Python 3.13.11 (or any Python 3.13.x - required)
109109
- Docker + docker-compose
110110
- Task (or Make)
111111
- Git
@@ -1441,6 +1441,7 @@ pythonie/pythonie/wsgi.py # WSGI application
14411441
---
14421442

14431443
**Last updated**: 2025
1444-
**Django Version**: 5.2.8
1445-
**Wagtail Version**: 7.2
1446-
**Python Version**: 3.13
1444+
**Django Version**: 6.0
1445+
**Wagtail Version**: 7.2.1
1446+
**Python Version**: 3.13.11
1447+
**Heroku Stack**: heroku-24

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python Ireland Website
22

3-
Website for Python Ireland (python.ie / pycon.ie) community, built with Django 5.2 and Wagtail CMS 7.2. Manages meetups, sponsors, speakers, and conference sessions.
3+
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.
44

55
## Prerequisites
66

@@ -213,7 +213,7 @@ export MEETUP_KEY=your_meetup_api_key # Get from https://secure.meetup.com/meet
213213

214214
## Deployment
215215

216-
The project is deployed on Heroku. Use Task commands for database operations:
216+
The project is deployed on Heroku using the **heroku-24** stack with PostgreSQL 17. Use Task commands for database operations:
217217

218218
```bash
219219
# View backups

pythonie/core/factories.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import factory
2-
from factory.django import DjangoModelFactory
32
from django.utils import timezone
4-
5-
from core.models import HomePage, SimplePage
3+
from factory.django import DjangoModelFactory
64
from meetups.models import Meetup
75
from sponsors.models import SponsorshipLevel
86

7+
from core.models import HomePage, SimplePage
8+
99

1010
class SponsorshipLevelFactory(DjangoModelFactory):
1111
class Meta:

pythonie/core/management/commands/generate_sample_data.py

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
from django.core.management.base import BaseCommand
22
from wagtail.models import Page, Site
33

4-
from core.factories import SponsorshipLevelFactory, MeetupFactory, HomePageFactory, SimplePageFactory
4+
from core.factories import (
5+
HomePageFactory,
6+
MeetupFactory,
7+
SimplePageFactory,
8+
SponsorshipLevelFactory,
9+
)
510
from core.models import HomePage, SimplePage
611

712

@@ -84,45 +89,62 @@ def _create_page(self, parent, title, slug, body=None):
8489
self.stdout.write(f" {title} already exists")
8590
return SimplePage.objects.get(slug=slug)
8691

87-
page = SimplePageFactory.build(title=title, slug=slug, body=body or [], show_in_menus=True)
92+
page = SimplePageFactory.build(
93+
title=title, slug=slug, body=body or [], show_in_menus=True
94+
)
8895
parent.add_child(instance=page)
8996
self.stdout.write(self.style.SUCCESS(f"Created {title}"))
9097
return page
9198

9299
def _get_home_content(self):
93100
return [
94101
{"type": "heading", "value": "Introduction"},
95-
{"type": "paragraph", "value": (
96-
"<p>Python Ireland is the Irish organisation representing the various chapters of Python users. "
97-
"We organise meet ups and events for software developers, students, academics and anyone who wants "
98-
"to learn the language. One of our aims is to help grow and diversify the Python community in Ireland. "
99-
"We also develop and foster links with other Python based communities overseas.</p>"
100-
)},
102+
{
103+
"type": "paragraph",
104+
"value": (
105+
"<p>Python Ireland is the Irish organisation representing the various chapters of Python users. "
106+
"We organise meet ups and events for software developers, students, academics and anyone who wants "
107+
"to learn the language. One of our aims is to help grow and diversify the Python community in Ireland. "
108+
"We also develop and foster links with other Python based communities overseas.</p>"
109+
),
110+
},
101111
{"type": "heading", "value": "PyCon Ireland 2025"},
102-
{"type": "paragraph", "value": (
103-
"<p>We are thrilled to announce PyCon Ireland 2025, taking place in Dublin "
104-
"on November 15th and 16th! Join us at the UCD O'Reilly Hall for this exciting event.</p>"
105-
)},
106-
{"type": "paragraph", "value": (
107-
"<p>PyCon Ireland 2025 will feature two talk tracks and two workshop tracks on both days. "
108-
"Your ticket includes breakfast and lunch. Join us Saturday evening for networking!</p>"
109-
)},
110-
{"type": "paragraph", "value": (
111-
"<p>Please adhere to our <a href='/policies/code-of-conduct/'>Code of Conduct</a>. "
112-
"Check <a href='/pycon-2025/'>Terms and conditions</a> for details.</p>"
113-
)},
112+
{
113+
"type": "paragraph",
114+
"value": (
115+
"<p>We are thrilled to announce PyCon Ireland 2025, taking place in Dublin "
116+
"on November 15th and 16th! Join us at the UCD O'Reilly Hall for this exciting event.</p>"
117+
),
118+
},
119+
{
120+
"type": "paragraph",
121+
"value": (
122+
"<p>PyCon Ireland 2025 will feature two talk tracks and two workshop tracks on both days. "
123+
"Your ticket includes breakfast and lunch. Join us Saturday evening for networking!</p>"
124+
),
125+
},
126+
{
127+
"type": "paragraph",
128+
"value": (
129+
"<p>Please adhere to our <a href='/policies/code-of-conduct/'>Code of Conduct</a>. "
130+
"Check <a href='/pycon-2025/'>Terms and conditions</a> for details.</p>"
131+
),
132+
},
114133
{"type": "paragraph", "value": "<p>See you at PyCon Ireland 2025!</p>"},
115134
]
116135

117136
def _get_meetups_content(self):
118137
return [
119138
{"type": "heading", "value": "Python Ireland Meetups"},
120-
{"type": "paragraph", "value": (
121-
"<p>Join us at our regular meetups! We hold events every month.</p>"
122-
"<ul>"
123-
"<li><a href='https://www.meetup.com/pythonireland/events/'>Upcoming Events</a></li>"
124-
"<li><a href='https://www.meetup.com/pythonireland/photos/'>Photos</a></li>"
125-
"<li><a href='https://www.meetup.com/pythonireland/'>Python Ireland on Meetup.com</a></li>"
126-
"</ul>"
127-
)},
139+
{
140+
"type": "paragraph",
141+
"value": (
142+
"<p>Join us at our regular meetups! We hold events every month.</p>"
143+
"<ul>"
144+
"<li><a href='https://www.meetup.com/pythonireland/events/'>Upcoming Events</a></li>"
145+
"<li><a href='https://www.meetup.com/pythonireland/photos/'>Photos</a></li>"
146+
"<li><a href='https://www.meetup.com/pythonireland/'>Python Ireland on Meetup.com</a></li>"
147+
"</ul>"
148+
),
149+
},
128150
]

pythonie/core/migrations/0001_initial.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
import django.utils.timezone
54
import modelcluster.fields
65
import wagtail.fields
76
from django.db import migrations, models
87

98

109
class Migration(migrations.Migration):
11-
1210
dependencies = [
1311
("wagtailcore", "0013_update_golive_expire_help_text"),
1412
]

pythonie/core/migrations/0002_simplepage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99

1010
class Migration(migrations.Migration):
11-
1211
dependencies = [
1312
("core", "0001_initial"),
1413
]

pythonie/core/migrations/0003_media_in_simple_page.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
from __future__ import unicode_literals
33

44
import wagtail.blocks
5-
import wagtail.fields
65
import wagtail.embeds.blocks
6+
import wagtail.fields
77
import wagtail.images.blocks
8-
from django.db import migrations, models
8+
from django.db import migrations
99

1010

1111
class Migration(migrations.Migration):
12-
1312
dependencies = [
1413
("core", "0002_simplepage"),
1514
]
@@ -22,9 +21,7 @@ class Migration(migrations.Migration):
2221
(
2322
(
2423
"heading",
25-
wagtail.blocks.CharBlock(
26-
classname="full title", icon="home"
27-
),
24+
wagtail.blocks.CharBlock(classname="full title", icon="home"),
2825
),
2926
("paragraph", wagtail.blocks.RichTextBlock(icon="edit")),
3027
("video", wagtail.embeds.blocks.EmbedBlock(icon="media")),

pythonie/core/migrations/0004_auto_20150708_1416.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
from __future__ import unicode_literals
33

44
import wagtail.blocks
5-
import wagtail.fields
65
import wagtail.embeds.blocks
6+
import wagtail.fields
77
import wagtail.images.blocks
88
from django.db import migrations, models
99

1010

1111
class Migration(migrations.Migration):
12-
1312
dependencies = [
1413
("core", "0003_media_in_simple_page"),
1514
]
@@ -22,9 +21,7 @@ class Migration(migrations.Migration):
2221
(
2322
(
2423
"heading",
25-
wagtail.blocks.CharBlock(
26-
icon="home", classname="full title"
27-
),
24+
wagtail.blocks.CharBlock(icon="home", classname="full title"),
2825
),
2926
("paragraph", wagtail.blocks.RichTextBlock(icon="edit")),
3027
("video", wagtail.embeds.blocks.EmbedBlock(icon="media")),

0 commit comments

Comments
 (0)