views:

156

answers:

1

I am attempting to use this snippet: http://www.djangosnippets.org/snippets/1095/ on a model I am building- I am defining things as:

first = models.TextField()
last = models.TextField()
email = models.EmailField(default=None)
screen = models.TextField()
password = models.EncryptedCharField()
icon = models.ImageField(upload_to='avatars/')

When I attempt to validate the model (running syncdb) it gives me an error that states that the "EncryptedCharField" is not defined.

I have the code from that snippet present in my model.py file- is this incorrect? do i need to implement this snippet elsewhere, or have it extend a different class?

A: 

It's saying that EncryptedCharField is not defined in models. If it's defined in the current module then you should not be trying to reference it from a different module.

Ignacio Vazquez-Abrams
But the model i'm defining and the declarations for the encrypted strings are in the same model.py file- the same 'place'. Where -should- this logic go?
LandonGN
Err... remove the `models.` in the front...
Ignacio Vazquez-Abrams