Is there any difference in using login_required decorator in urls.py and in views.py ? If I put this line:
url(r\'^add/$\', login_required(views.add_media), name
Yes, they are the same. Decorators are syntactic sugar for wrapping a function in another one. So in either case, you are wrapping login_required around views.add_media.
login_required
views.add_media