Get the Python library:
pip install newrelic
Add this to your ProcFile:
web: newrelic-admin run-program python cn_project/manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 3 --settings=settings.prod
| pipenv install ipykernel jupyter | |
| pipenv shell | |
| python -m ipykernel install --user --name=$(basename $(pwd)) | |
| jupyter notebook | |
| # then in UI, switch kernel to the one matching your pipenv shell name |
Get the Python library:
pip install newrelic
Add this to your ProcFile:
web: newrelic-admin run-program python cn_project/manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 3 --settings=settings.prod
| class ProductAutochangeInlineFormSet( | |
| forms.inlineformset_factory(ProductAutochangeSet, ProductAutochange, form=ProductAutochangeForm, extra=1)): | |
| def clean(self): | |
| super(ProductAutochangeInlineFormSet, self).clean() | |
| product_pks = [] | |
| num_productautochanges = 0 | |
| for form in self.forms: | |
| if not form.is_valid(): | |
| continue |
| /* exported Script */ | |
| /* globals console, _, s */ | |
| /** Global Helpers | |
| * | |
| * console - A normal console instance | |
| * _ - An underscore instance | |
| * s - An underscore string instance | |
| */ |