From 76a945de6f98ca3c9f944e04614f20b64d9587fb Mon Sep 17 00:00:00 2001 From: azman0101 Date: Sat, 28 Sep 2013 05:56:48 +0200 Subject: [PATCH 1/5] template's static call to 1.5 style --- profiler/templates/profiler/base.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/profiler/templates/profiler/base.html b/profiler/templates/profiler/base.html index 953bcee..8495569 100644 --- a/profiler/templates/profiler/base.html +++ b/profiler/templates/profiler/base.html @@ -6,14 +6,14 @@ - + {% load staticfiles %} - - + + - - + + @@ -44,7 +44,7 @@ {% endblock %} - + From 5401173a594736e314ee96f3405f8dab1a2bd3c6 Mon Sep 17 00:00:00 2001 From: azman0101 Date: Sat, 28 Sep 2013 06:13:04 +0200 Subject: [PATCH 2/5] workaround for signal only works un main thread issue --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index c4d494b..75374d7 100644 --- a/README.rst +++ b/README.rst @@ -11,6 +11,9 @@ Installation 2. Add `'profiler'` app to `INSTALLED_APPS` 3. Add `'profiler.middleware.ProfilerMiddleware'` to `MIDDLEWARE_CLASSES` 4. Optionally add `'profiler.middleware.StatProfMiddleware'` to `MIDDLEWARE_CLASSES` to enable Python code statistical profiling (using statprof_). WARNING: this is an experimental feature, beware of possible incorrect output. + if you get `ValueError: signal only works in main Thread` try this workaround: + `./manage.py --noreload --nothreading` + 5. Add `url(r'^profiler/', include('profiler.urls'))` to your urlconf .. _statprof: https://github.com/bos/statprof.py From 85884df5229204530ea41cb8be3c430e5cb00655 Mon Sep 17 00:00:00 2001 From: azman0101 Date: Sat, 28 Sep 2013 06:13:04 +0200 Subject: [PATCH 3/5] workaround for signal only works un main thread issue --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index c4d494b..75374d7 100644 --- a/README.rst +++ b/README.rst @@ -11,6 +11,9 @@ Installation 2. Add `'profiler'` app to `INSTALLED_APPS` 3. Add `'profiler.middleware.ProfilerMiddleware'` to `MIDDLEWARE_CLASSES` 4. Optionally add `'profiler.middleware.StatProfMiddleware'` to `MIDDLEWARE_CLASSES` to enable Python code statistical profiling (using statprof_). WARNING: this is an experimental feature, beware of possible incorrect output. + if you get `ValueError: signal only works in main Thread` try this workaround: + `./manage.py --noreload --nothreading` + 5. Add `url(r'^profiler/', include('profiler.urls'))` to your urlconf .. _statprof: https://github.com/bos/statprof.py From 5a6536e174f275a056a1d5bfc2ee6e0c32fc382d Mon Sep 17 00:00:00 2001 From: azman0101 Date: Sat, 28 Sep 2013 06:18:32 +0200 Subject: [PATCH 4/5] workaround for signal only works un main thread issue --- README.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 75374d7..c4925a7 100644 --- a/README.rst +++ b/README.rst @@ -11,9 +11,12 @@ Installation 2. Add `'profiler'` app to `INSTALLED_APPS` 3. Add `'profiler.middleware.ProfilerMiddleware'` to `MIDDLEWARE_CLASSES` 4. Optionally add `'profiler.middleware.StatProfMiddleware'` to `MIDDLEWARE_CLASSES` to enable Python code statistical profiling (using statprof_). WARNING: this is an experimental feature, beware of possible incorrect output. - if you get `ValueError: signal only works in main Thread` try this workaround: - `./manage.py --noreload --nothreading` - + + if you get ``ValueError: signal only works in main Thread`` + try this workaround: + `` + $ ./manage.py --noreload --nothreading + `` 5. Add `url(r'^profiler/', include('profiler.urls'))` to your urlconf .. _statprof: https://github.com/bos/statprof.py From 046f3e97569a667c935d7cbd0840b1b7bf24c50a Mon Sep 17 00:00:00 2001 From: azman0101 Date: Sat, 28 Sep 2013 16:29:33 +0200 Subject: [PATCH 5/5] Update README.rst workaround for signal only works un main thread issue --- README.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index c4925a7..dde126a 100644 --- a/README.rst +++ b/README.rst @@ -12,11 +12,10 @@ Installation 3. Add `'profiler.middleware.ProfilerMiddleware'` to `MIDDLEWARE_CLASSES` 4. Optionally add `'profiler.middleware.StatProfMiddleware'` to `MIDDLEWARE_CLASSES` to enable Python code statistical profiling (using statprof_). WARNING: this is an experimental feature, beware of possible incorrect output. - if you get ``ValueError: signal only works in main Thread`` - try this workaround: - `` - $ ./manage.py --noreload --nothreading - `` +if you get ``ValueError: signal only works in main Thread`` try this workaround: + + $ ./manage.py runserver --noreload --nothreading + 5. Add `url(r'^profiler/', include('profiler.urls'))` to your urlconf .. _statprof: https://github.com/bos/statprof.py