Skip to content

Sync nearbyshops with the updated tutorial - #874

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

realpython-bot wants to merge 1 commit 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

… Web App With Django and GeoDjango

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