Issue 71: 'Category' object has no attribute 'n'
Status:  Fixed
Owner: ----
Closed:  Sep 2010
Reported by ishalya...@gmail.com, Apr 23, 2010
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
order_insertion_by (source checkout) now handles strings, tuples, lists
Status: Fixed