| Issue 71: | 'Category' object has no attribute 'n' | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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.
Sep 2, 2010
Project Member
#1
craig.ds@gmail.com
Status:
Fixed
|