Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CBV fix

  • Loading branch information...
commit 1aee755c24e04236c9ea46c5f133687f38085313 1 parent 254b56f
@mx14 mx14 authored
Showing with 7 additions and 1 deletion.
  1. +2 −0  .gitignore
  2. +5 −1 django_statsd/middleware.py
View
2  .gitignore
@@ -0,0 +1,2 @@
+*.pyc
+*.egg-info
View
6 django_statsd/middleware.py
@@ -147,7 +147,11 @@ def process_view(
# View name is defined as module.view
# (e.g. django.contrib.auth.views.login)
- self.view_name = view_func.__module__ + '.' + view_func.__name__
+ self.view_name = view_func.__module__
+
+ # CBV specific
+ if hasattr(view_func, '__name__'):
+ self.view_name = self.view_name + '.' + view_func.__name__
@classmethod
def stop(cls, *key):
Please sign in to comment.
Something went wrong with that request. Please try again.