Opened 6 years ago
Closed 6 years ago
#29862 closed New feature (wontfix)
Add Weight and Volume classes to measure module
Reported by: | David Ross | Owned by: | David Ross |
---|---|---|---|
Component: | GIS | Version: | 2.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Add functionality to manipulate weights and volumes in the same fashion as the Distance class.
Change History (7)
comment:1 by , 6 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 6 years ago
Description: | modified (diff) |
---|---|
Summary: | Add Weight class to measure module → Add Weight and Volume class to measure module |
comment:3 by , 6 years ago
Summary: | Add Weight and Volume class to measure module → Add Weight and Volume classes to measure module |
---|
comment:4 by , 6 years ago
Has patch: | set |
---|
comment:5 by , 6 years ago
I think I accepted the ticket prematurely. Do these classes have anything to do with GIS? If they aren't used by contrib.gis
then they probably don't belong.
comment:6 by , 6 years ago
Now that you mention it, contrib.gis
probably isn't really an appropriate location for these classes. It utilises the base class MeasureBase
in the contrib.gis.measure.py
file, hence why I placed the classes there. Is there a more appropriate place for these new classes in the code base?
I feel these classes are useful additions for being able to convert units on the fly. For example altering an app users weight units depending on their preferences or region or conversion of volumes for a scientific application.
comment:7 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
I don't think it's Django's place to provide these helpers. We have django.utils
but this is limited to code that Django itself uses. I'd be surprised if there isn't an existing Python package that provides this functionality. If not, maybe you'd consider creating one.
https://github.com/django/django/pull/10527