Okupy/Profiling and Debugging

Profiling
Required packages: hotshot

Option 1

 * Create a new file and name it 'middleware.py'.
 * Add the following code: https://gist.github.com/Miserlou/3649773/raw/72e73609e67f70faaa31c73f25911ba15e384d54/middleware.py
 * In the MIDDLEWARE_CLASSES of your local.py/development.py, include the line. 'okupy.accounts.middleware.ProfileMiddleware',
 * To use the profiler, simply add the string '?prof' to the end of your URL. e.g. http://127.0.0.1:8000/devlist/?prof
 * Reference: https://gun.io/blog/fast-as-fuck-django-part-1-using-a-profiler/

Option 2

 * Follow this guide: https://code.djangoproject.com/wiki/ProfilingDjango

Debugging

 * Required packages: django-debug-toolbar
 * Optional packages: https://github.com/django-debug-toolbar/django-debug-toolbar/wiki/3rd-Party-Panels
 * Make sure your IP is listed in the INTERNAL_IPS local.py/development.py settings. If you are working locally this will be: INTERNAL_IPS = ('127.0.0.1',)
 * Add the following middleware to local.py/development.py file:
 * Add debug_toolbar to your INSTALLED_APPS setting INSTALLED_APPS = ( 'debug_toolbar', )
 * Add a tuple called DEBUG_TOOLBAR_PANELS to your settings.py file that specifies the full Python path to the panel that you want included in the Toolbar.

Reference: https://github.com/django-debug-toolbar/django-debug-toolbar

Front-end profiling

 * Firefox: Shift+F5 to start profiler or Right-click --> Inspect element --> Profiler
 * Features: 3D view, Responsive design mode, times


 * TODO: Chrome Dev tools