google-code-export / django-mptt

Automatically exported from code.google.com/p/django-mptt
Other
0 stars 0 forks source link

refactor to abstract models #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
refactor django-mptt to be a set of abstract models that can be extended.
I think this would be a more elegant solution thant the current monkey
patching.

Original issue reported on code.google.com by lauber.p...@gmail.com on 16 Sep 2008 at 8:09

GoogleCodeExporter commented 9 years ago
I've not looked into abstract models at all yet, but they're definitely the 
approach
I'd rather take if possible.

Original comment by jonathan.buchanan on 12 Oct 2008 at 1:00

GoogleCodeExporter commented 9 years ago
Yep, this is good idea. Also I want mptt to attach methods on model instances 
like 
Model.mptt.is_root(), not Model.is_root(). For clearer code and stability 
(avoid 
name collisions in large projects).

Original comment by mocksoul on 6 Dec 2008 at 12:34

GoogleCodeExporter commented 9 years ago

Original comment by jonathan.buchanan on 1 Jul 2009 at 2:40

GoogleCodeExporter commented 9 years ago
I'm definitely +1 for this. Will either be 0.4 or 0.5

Original comment by craig.ds@gmail.com on 2 Sep 2010 at 12:42

GoogleCodeExporter commented 9 years ago

Original comment by craig.ds@gmail.com on 6 Sep 2010 at 9:16

GoogleCodeExporter commented 9 years ago
Created a branch for this: 
http://github.com/django-mptt/django-mptt/tree/abstract-models-refactor

This is a major refactor, may not be sane anytime soon.

Original comment by craig.ds@gmail.com on 12 Sep 2010 at 12:20

GoogleCodeExporter commented 9 years ago
All the tests now pass on the new branch. Backwards incompatible changes:

 * mptt.register() has been removed
 * Field names and order_insertion_by are now specified via a MPTTMeta inner class

Original comment by craig.ds@gmail.com on 18 Sep 2010 at 4:52

GoogleCodeExporter commented 9 years ago
Issue 52 has been merged into this issue.

Original comment by craig.ds@gmail.com on 20 Sep 2010 at 10:28

GoogleCodeExporter commented 9 years ago
Merged to master in 
[http://github.com/django-mptt/django-mptt/commit/a7876509f4cbc35b25a76abd860e10
eb6ac7ed11 a7876509f]

Original comment by craig.ds@gmail.com on 23 Sep 2010 at 11:18

GoogleCodeExporter commented 9 years ago
Some discussion in FeinCMS project, around using multiple inheritance for 
MPTTModel subclasses:

http://github.com/matthiask/feincms/issues/#issue/105

Original comment by craig.ds@gmail.com on 27 Sep 2010 at 10:01