Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map gallery #53

Merged
merged 8 commits into from
Mar 5, 2025
Merged

Map gallery #53

merged 8 commits into from
Mar 5, 2025

Conversation

Xpirix
Copy link
Collaborator

@Xpirix Xpirix commented Feb 28, 2025

Fix for #49

This pull request introduces significant changes to the qgis-app project, primarily adding support for a new Map model in the map_gallery app. The changes include updates to serializers, views, forms, validators, and tests to handle the new Map model. Below are the most important changes:

Serializer and View Updates:

  • Added Map import to qgis-app/api/serializers.py and updated ResourceBaseSerializer to include get_thumbnail_full method for handling Map objects. [1] [2] [3]
  • Introduced MapSerializer class extending ResourceBaseSerializer and added Map to the list of serializers and views in qgis-app/api/views.py. [1] [2] [3] [4] [5] [6]

Form and Validator Updates:

  • Modified filesize_validator function to include is_map parameter and updated clean_file method in qgis-app/base/forms/processing_forms.py to handle Map files. [1] [2]
  • Added new forms ResourceFormMixin, UploadForm, and UpdateForm in qgis-app/map_gallery/forms.py to handle Map uploads and updates.

Model and Migration Updates:

  • Created Map model and associated Review model in qgis-app/map_gallery/models.py and added initial migrations to create these models in the database. [1] [2] [3]

Test Updates:

  • Added comprehensive tests for Map model in qgis-app/map_gallery/tests/test_views.py, including form validation, email notifications, and upload/review functionalities. [1] [2]

These changes collectively enhance the functionality of the qgis-app project by integrating support for map submissions, reviews, and related operations.

map-gallery.mov

image

@Xpirix Xpirix requested a review from timlinux February 28, 2025 12:31
@Xpirix Xpirix marked this pull request as ready for review March 3, 2025 06:46
@timlinux
Copy link
Member

timlinux commented Mar 5, 2025

That looks really great @Xpirix thanks

@Xpirix Xpirix merged commit 79ef159 into qgis:master Mar 5, 2025
2 checks passed
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.

2 participants