Issue #12 new

ListField, ForeignKey with 'anyModel' or AnyModel exception on 0.9.2

Daniel Beth Madariaga
created an issue

I have this in a model:

{{{ from django.db import models from djangotoolbox.fields import ListField

class A(models.Model): attr1 = models.CharField(max_length=200) ...

classB(models.Model): attr1 = ListField(models.ForeignKey('A')) }}}

And I get the following exception:

//Caught AttributeError while rendering: 'str' object has no attribute '_meta'//

Then, I tried:

{{{ classB(models.Model): attr1 = ListField(models.ForeignKey(A)) # Without ' ' }}}

And I get the following exception:

//models.ForeignKey(A) NameError: name 'A' is not defined//

Now I using djangotoolbox 0.9.2.

Can you take a look into that?, please

Comments (1)

  1. Log in to comment