Stackoverflow that gave me an idea.
http://stackoverflow.com/questions/843671/profiling-in-python-who-called-the-function
Code that I may need to run:
First profile what you're wanting to check
python -m cProfile -o output.pstats PATH/TO/SCRIPT
# -*- coding: utf-8 -*- | |
from django.conf.urls import include | |
def decorated_include(urls, decorator) | |
"""Used to decorate all urls in a 3rd party app with a specific decorator""" | |
urls_to_decorate = include(urls) | |
for url_pattern in urls_to_decorate | |
url_pattern._callback = decorator(url_pattern._callback) |
import os | |
# Our django-pipeline settings | |
PATH_TO_HERE = os.getcwd() | |
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage' | |
PIPELINE_CSS = { | |
'standard': { | |
'source_filenames': ( |
heroku create | |
heroku addons:add sendgrid:starter | |
heroku config:add BUILDPACK_URL=git://github.com/jiaaro/heroku-buildpack-django.git |
web: python manage.py collectstatic --noinput; python manage.py run_gunicorn -b 0.0.0.0:$PORT |
less@1.3.0 |
[ | |
{ "keys": ["super+."], "command": "toggle_side_bar" }, | |
{ "keys": ["super+shift+m"], "command": "toggle_minimap"}, | |
{ "keys": ["super+p"], "command": "swap_case"}, | |
{ "keys": ["super+shift+l"], "command": "lower_case" } | |
] |
python manage.py collectstatic --noinput |
def create_form_sets(number_to_make=None): | |
""" | |
Use this to make number_to_make form sets. | |
""" | |
number = number_to_make or 0 | |
return formset_factory(MyForm, | |
extra=number) |
# -*- coding: utf-8 -*- | |
import os | |
from mongoengine.connection import connect | |
DB_NAME = os.getenv('MONGO_DB_NAME') or'local-db' | |
DB_HOST = os.getenv('MONGO_DB_HOST') or 'localhost' | |
DB_USER = os.getenv('MONGO_DB_USER') or '' |
Stackoverflow that gave me an idea.
http://stackoverflow.com/questions/843671/profiling-in-python-who-called-the-function
Code that I may need to run:
First profile what you're wanting to check
python -m cProfile -o output.pstats PATH/TO/SCRIPT