Q:

Django: My function is returning an object instead of the return value

Models.py
class Document(models.Model):

    def test():
        return "hello"

Views.py
print(Document.test)

When I run this code, it prints this: <function Document.test at 0x03DF9030>. How do I get it to print "hello"? Thank you.

A:

I just want to add explanation to the answer in the comments. When you call a method without parenthesis you will get the method itself. It may be useful if you want to pass it as a parameter for example. If you call it with parenthesis you will get whatever you have defined the return value to be. 
So, as it's already answered in comments you need to call it like this:
print(Document.test())

