askbot.utils.decorators

askbot.utils.decorators.ajax_login_required(view_func)
askbot.utils.decorators.ajax_method(view_func)
askbot.utils.decorators.auto_now_timestamp(func)

decorator that will automatically set argument named timestamp to the “now” value if timestamp == None

if there is no timestamp argument, then exception is raised

askbot.utils.decorators.profile(log_file)

Profile some callable.

This decorator uses the hotshot profiler to profile some callable (like a view function or method) and dumps the profile data somewhere sensible for later processing and examination.

It takes one argument, the profile log name. If it’s a relative path, it places it under the PROFILE_LOG_BASE. It also inserts a time stamp into the file name, such that ‘my_view.prof’ become ‘my_view-20100211T170321.prof’, where the time stamp is in UTC. This makes it easy to run and compare multiple trials.

http://code.djangoproject.com/wiki/ProfilingDjango

This Page