| Issue 54: | MPTT not working with Django 1.0.2? | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Here's my model that uses mptt:
class Discipline(models.Model):
discipline = models.CharField(max_length=50,)
information = models.TextField()
def __unicode__(self):
return self.discipline
mptt.register(Discipline)
I reset my app and syncdb'd, then started the django shell and imported my
models. When I try this...
physics = Discipline(discipline='Physics', information='whatever')
physics.insert_at(None)
Discipline.objects.all()
I get an empty list. Am I missing something?
I also tried adding through the django admin interface. When I try to save
a test discipline, it gives the error "'Discipline' object has no attribute
'parent'"
Any ideas?
What version of the product are you using? On what operating system?
Django 1.0.2
django-mptt SVN checked out earlier today (I deleted it from site-packages
and reinstalled so I know it's not old)
Windows Vista 64 bit
I'm using the django dev server and mysql
Sep 18, 2009
#1
skylar.s...@gmail.com
Sep 3, 2010
1 - physics.save() 2 - You need to define a parent field on your model These both seem to be working, closing
Status:
Invalid
|