Python - How to import functions?
You would have to import the class to get access to the instance method you've defined on the class.
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