diff --git a/src/milla/app.py b/src/milla/app.py index 80e7606..dc6ebc7 100644 --- a/src/milla/app.py +++ b/src/milla/app.py @@ -75,8 +75,10 @@ class Application(object): if request.method == 'POST' and '_method' in request.POST: request.method = request.POST.pop('_method') - allowed_methods = getattr(func, 'allowed_methods', - self.DEFAULT_ALLOWED_METHODS) + try: + allowed_methods = self._find_attr(func, 'allowed_methods') + except AttributeError: + allowed_methods = self.DEFAULT_ALLOWED_METHODS if request.method not in allowed_methods: allow_header = {'Allow': ', '.join(allowed_methods)} if request.method == 'OPTIONS':