Search code examples
pythondecoratorpython-decorators

python lines that start with @


Possible Duplicate:
Understanding Python decorators

I was reading a django app source code where I find this

@login_required
def activities(request = None,\
            project_id = 0,\
            task_id = 0,\
            ...

What does the line that start with @ mean?


Solution

  • Please check out Python Decorators Explained. It has an amazing answer that will explain everything.