In Python 2.7 and Python 3.x, the unittest2 module deprecates the failUnless* method names. So this is a preemptive change to use the assert* versions of the names, even thought I find them less naturally descriptive.
Applications using topic hierarchies can then set up things like URL rewrites based on subtrees that have moved. The signal is emitted *before* any moves take place so that the original names of the topics can still be determined.
I was creating my own unittest.TestSuite, but this appears (from reading the Django code) to not be necessary. Auto-discovery takes place if I import the TestCase instances into the "acacia.tests" namespace and then I can restrict test runs to invidivual TestCases.
This avoids needing to block out that warning once per TestCase subclass.
This is the bulk of the code changes, excising any use of django-treebeard and replacing it all with django-mptt. All of the tests, bar one (which is a bad test anyway) pass. Documentation hasn't been updated and there are still a couple of FIXME items in the code.
I want to include a reasonable introduction to what I mean by topic trees, but I also don't want people to fall asleep thinking they have to read it. So I'm trying to find a balance between making the information easily available (early in the docs) and setting expectations appropriately. Maybe this current version will make me happier.
README.txt is now more to the point and mentions standalone testing, since that's a bit hidden. Also added an AUTHORS.txt file for consistency.
BACKWARDS INCOMPATIBLE CHANGE. If were using an earlier version of this code, you will need to change the fullname field in the acacia_topic table to have a unique constraint (previously, it was indexed, but not required to contain unique values, which was an error in the design).
Because we cache a bit of information on each AbstractTopic node (the full_name attribute), this must be updated when a subtree is moved. Since subclasses of AbstractTopic may have similar requirements, there's also a facility to pass in other callables which are called for each child node to do similar updates prior to saving the node.
It wasn't necessarily clear that a parent-less node meant you should choose "<root node>" as the parent. I've now made that explicitly say "<no parent>".
Now that Django ticket #10208 has been fixed, it's no longer necessary to specify the excluded form fields again in the ModelAdmin subclass. This means Django 1.0.3 is the minimum supported version now (anything after r10620 from the 1.0.X branch in Django's subversion repository will do).