models.py
def operation(argument):
#Operation
return variable
class X(models.Model)
a = models ...
b = models ...
I am trying to import operation in my views.py .. When I try using
from project.models import operation
But then I get the following error
ImportError: cannot import name operation
/* */aren’t valid comment characters in python, which is causes a parse error, so the import fails. Use#instead.Also, you’ll want to get an instance of
Xthen call theoperationmethod on that. Like: