-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/add_circulation_model
- Loading branch information
Showing
35 changed files
with
461 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.101.2+dev | ||
2.101.3+dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
geotrek-admin (2.101.2+dev) UNRELEASED; urgency=medium | ||
geotrek-admin (2.101.3+dev) UNRELEASED; urgency=medium | ||
|
||
* | ||
|
||
-- Célia Prat <[email protected]> Tue, 17 Oct 2023 17:15:50 +0200 | ||
-- Joaquim Nallar <[email protected]> Thu, 26 Oct 2023 12:04:29 +0200 | ||
|
||
geotrek-admin (2.101.3) RELEASED; urgency=medium | ||
|
||
* New package release | ||
|
||
-- Joaquim Nallar <[email protected]> Thu, 26 Oct 2023 10:57:23 +0200 | ||
|
||
geotrek-admin (2.101.2) RELEASED; urgency=medium | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from django.core.exceptions import ValidationError | ||
from django_filters.fields import ModelChoiceField, RangeField | ||
|
||
from geotrek.common.widgets import OneLineRangeWidget | ||
|
||
|
||
class ComaSeparatedMultipleModelChoiceField(ModelChoiceField): | ||
def to_python(self, value): | ||
if value in self.empty_values: | ||
return None | ||
try: | ||
key = self.to_field_name or 'pk' | ||
value = self.queryset.filter(**{f'{key}__in': value.split(',')}) | ||
except (ValueError, TypeError): | ||
raise ValidationError(self.error_messages['invalid_choice'], code='invalid_choice') | ||
return value | ||
|
||
|
||
class OneLineRangeField(RangeField): | ||
widget = OneLineRangeWidget(attrs={'class': 'minmax-field'}) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.