-
Notifications
You must be signed in to change notification settings - Fork 77
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
add price to TouristicEvent - ref #3587 #3855
add price to TouristicEvent - ref #3587 #3855
Conversation
Passing run #8109 ↗︎
Details:
Review all test suite changes for PR #3855 ↗︎ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3855 +/- ##
=======================================
Coverage 98.35% 98.35%
=======================================
Files 294 294
Lines 22292 22293 +1
=======================================
+ Hits 21925 21926 +1
Misses 367 367 ☔ View full report in Codecov by Sentry. |
d1a1bbc
to
1c76ad8
Compare
1c76ad8
to
73269bb
Compare
b7d9e2a
to
c80feee
Compare
geotrek/tourism/models.py
Outdated
@@ -458,6 +458,13 @@ class TouristicEvent(ZoningPropertiesMixin, AddPropertyMixin, PublishableMixin, | |||
help_text=_("In hours (1.5 = 1 h 30, 24 = 1 day, 48 = 2 days)"), | |||
validators=[MinValueValidator(0)] | |||
) | |||
price = models.FloatField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I advise you to consider a DecimalField here. It will prevent many rounding issues coming with floating numbers. It is not mandatory in your case since there is no computation on that field. But I think it would guarantee we won't have to deal with rounding and/or formatting to display the values properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, done !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can rebase if necessary
1ba104c
to
c4444c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense qu'il y a un probleme avec tes traductions car toutes les trads venant de geotrek/locales/ (trads non incluses dans des apps) ont enormément de changements
https://github.com/GeotrekCE/Geotrek-admin/pull/3855/files#diff-fc6029e51be9d381ebe39b2b526f0a10f7cb10fd0ed1800e0a79048e8dbe58d3
Je pense que t'as du laisser un venv et qu'il est interprété lors du make messages
1226602
to
ec60c09
Compare
J'ai relancé le |
replaced by #3966 3966 |
Description
Related Issue
#3587
Checklist