I use Django 1.1.1 and last mptt from svn.
Tried example form documentation (only class name was changed):
>from django.db import models
>import mptt
>
>class Category(models.Model):
> name = models.CharField(max_length=50, unique=True)
> parent = models.ForeignKey('self', null=True, blank=True,
>related_name='children')
>
>mptt.register(Category, order_insertion_by='name')
This code produces next exception: "'Category' object has no attribute 'n'"
At least I found the solution:
>mptt.register(Category, order_insertion_by=['name'])
So please fix code or documentation.
Original issue reported on code.google.com by ishalya...@gmail.com on 23 Apr 2010 at 8:43
Original issue reported on code.google.com by
ishalya...@gmail.com
on 23 Apr 2010 at 8:43