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
package com.example.nightmodebutton | |
import android.os.Bundle | |
import android.widget.CompoundButton | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.appcompat.app.AppCompatDelegate | |
import com.google.android.material.switchmaterial.SwitchMaterial | |
class MainActivity : AppCompatActivity() { |
/* exported Script */ | |
/* globals console, _, s */ | |
/** Global Helpers | |
* | |
* console - A normal console instance | |
* _ - An underscore instance | |
* s - An underscore string instance | |
*/ |
CREATE OR REPLACE FUNCTION public.clone_schema( | |
source_schema text, | |
dest_schema text) | |
RETURNS void AS | |
$BODY$ | |
DECLARE | |
object text; | |
buffer text; | |
default_ text; | |
column_ text; |
from graphene_django.filter import DjangoFilterConnectionField | |
from graphene.utils.str_converters import to_snake_case | |
class OrderedDjangoFilterConnectionField(DjangoFilterConnectionField): | |
@classmethod | |
def resolve_queryset( | |
cls, connection, iterable, info, args, filtering_args, filterset_class | |
): | |
qst = super(DjangoFilterConnectionField, cls).resolve_queryset( |
const gray = "#8D8391"; | |
const red = "#A1225D"; | |
const orange = "#EEB56F"; | |
const yellow = "#FCED60"; | |
const purple = "#CE85F8"; | |
const pink1 = "#F62599"; | |
const pink2 = "#C45E9D"; | |
const white = "#CABCD0"; | |
const sidebar_background = "#080112"; | |
const background = "#080112"; |
CREATE OR REPLACE FUNCTION public.clone_schema( | |
source_schema text, | |
dest_schema text) | |
RETURNS void AS | |
$BODY$ | |
DECLARE | |
object text; | |
buffer text; | |
default_ text; | |
column_ text; |
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 |
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 |
Django channels are official way for implementing async messaging in Django.
The primary caveat when working with GraphQL subscription is that we can't serialize message before broadcasting it to Group of subscribers. Each subscriber might use different GraphQL query so we don't know how to serialize instance in advance.
See related issue