Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

refactor to abstract models #58

Closed
django-mptt opened this Issue · 8 comments

1 participant

@django-mptt
Owner

Originally GC 34

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.

@django-mptt
Owner

insin (12 Oct 08):

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

@django-mptt
Owner

mocksoul (06 Dec 08):

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).

@django-mptt
Owner

craigds (02 Sep 10):

I'm definitely +1 for this. Will either be 0.4 or 0.5

@django-mptt
Owner

craigds (12 Sep 10):

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.

@django-mptt
Owner

craigds (18 Sep 10):

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
@django-mptt
Owner

craigds (20 Sep 10):

Issue 52 has been merged into this issue.

@django-mptt
Owner

craigds (27 Sep 10):

Some discussion in FeinCMS project, around using multiple inheritance for MPTTModel subclasses:

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

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.