Ok, so here's a simplified version of the thing that has been driving me crazy all day:
models.py
:
from django.template.defaultfilters import slugify
class MyModel(models.Model):
....
def populate_property(self):
self.property = slugify('string of text')
My view then calls populate_property()
but I get a NoneType object is not callable
error.
BUT, if I add an inline import
of slugify
then it works.
This is code that has worked for a long time, so I'm at a loss right now.
The PYTHONPATH
but it looks ok and the environment is created using buildout
Any help would be much appreciated...