Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for #49
This pull request introduces significant changes to the
qgis-app
project, primarily adding support for a newMap
model in themap_gallery
app. The changes include updates to serializers, views, forms, validators, and tests to handle the newMap
model. Below are the most important changes:Serializer and View Updates:
Map
import toqgis-app/api/serializers.py
and updatedResourceBaseSerializer
to includeget_thumbnail_full
method for handlingMap
objects. [1] [2] [3]MapSerializer
class extendingResourceBaseSerializer
and addedMap
to the list of serializers and views inqgis-app/api/views.py
. [1] [2] [3] [4] [5] [6]Form and Validator Updates:
filesize_validator
function to includeis_map
parameter and updatedclean_file
method inqgis-app/base/forms/processing_forms.py
to handleMap
files. [1] [2]ResourceFormMixin
,UploadForm
, andUpdateForm
inqgis-app/map_gallery/forms.py
to handleMap
uploads and updates.Model and Migration Updates:
Map
model and associatedReview
model inqgis-app/map_gallery/models.py
and added initial migrations to create these models in the database. [1] [2] [3]Test Updates:
Map
model inqgis-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