Skip to content

Sync nearbyshops with the updated tutorial - #874

Open
realpython-bot wants to merge 2 commits into
masterfrom
maintenance/location-based-app-with-geodjango-tutorial-20261004
Open

realpython-bot wants to merge 2 commits into
masterfrom
maintenance/location-based-app-with-geodjango-tutorial-20261004

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Syncs nearbyshops/ with the maintenance update of Make a Location-Based Web App With Django and GeoDjango.

What changed

  • shops/admin.py: OSMGeoAdmin was removed in Django 5.0, so the admin now uses GISModelAdmin, matching the updated article.
  • nearbyshops/settings.py: dropped USE_L10N (removed in Django 5.0) and set DEFAULT_AUTO_FIELD = "django.db.models.AutoField" to match the existing 0001_initial migration and silence models.W042.
  • requirements.txt (new): pins the article's dependencies field, django==6.1.1 and psycopg2-binary==2.9.13.
  • readme.md: adds a Requirements section (Python 3.12 or later, which is Django 6.1's floor, plus GDAL/GEOS/PROJ and a PostGIS database) and the kartoza/postgis:18-3.6 command the article now uses.

Verification

  • Fresh venv on Python 3.14.6 with the new pins, against PostgreSQL 16 + PostGIS 3.4 (GDAL/GEOS/PROJ from Ubuntu 24.04).
  • manage.py check: no issues. manage.py migrate applies both migrations and loads all 100 shops from data.json.
  • The test client returned 200 for / (the six nearest shops) and for the admin changelist, add, and change pages. The add and change pages render the OSM map widget. runserver serves / with a 200.
  • ruff@0.14.1 format --check and ruff@0.14.1 check pass.

Draft article: https://realpython.com/pbjt/blog/post/2457/change/
Maintenance card: https://trello.com/c/iUHUfici

🤖 Generated with Claude Code

realpython-bot and others added 2 commits October 4, 2026 06:08
… Web App With Django and GeoDjango

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Pin django==6.1.4 (6.1.3 added Python 3.15 support; 6.1.4 is a security release)
- urls.py matches the article (admin route first, current docs link)
- 0001_initial matches the model (name max_length=100); makemigrations --check is clean
- 0002 data migration in double quotes
- README links the article with its trailing slash

Verified on Python 3.15.2 + PostGIS 3.4: migrate loads 100 shops, home lists 6, admin 200.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant