1. ken cochrane
  2. django-mobi


Boris FELD  committed b3bd5a4

Wraps decorator for better debugging.

  • Participants
  • Parent commits 4994a05
  • Branches lothiraldan/wraps-decorator-for-better-debugging-1382714625759

Comments (1)

Files changed (1)

File mobi/decorators.py

View file
 from mobi.useragents import search_strings
 from mobi.middleware import MobileDetectionMiddleware
+from functools import wraps
 def detect_mobile(view):
     """View Decorator that adds a "mobile" attribute to the request which is
        True or False depending on whether the request should be considered
        to come from a small-screen device such as a phone or a PDA"""
+    @wraps(view)
     def detected(request, *args, **kwargs):
         return view(request, *args, **kwargs)