﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17754	Django GIS Measure refactor	Riccardo Di Virgilio	nobody	"hi, the class MeasureBase in django.contrib.gis.measure is not subclassable.

i've write a new code, that allows the very same API, but it can be subclassed with no pain

the new code is one hundred line shorter, and is DRY.

in the old code the class Area and the class Distance write the same methods every time.

i've pushed a lot of base methods (like __repr__, __init__, __sub__, __add__, ...) in the base class, and i've defined just __molt__ for the new Distance class and __div__ for the new Area class.

Please consider to include this code in the django 1.4 version.

I've tested it and it works like the old version, but now you can create a new class for Weight with no method definition, just unit definition.

if you want i can write standard measure for every measure and we can put it inside localflavor..."	Cleanup/optimization	closed	GIS	dev	Normal	fixed			Accepted	0	0	0	1	0	0
