I hereby claim:
- I am dryan on github.
- I am dryan (https://keybase.io/dryan) on keybase.
- I have a public key whose fingerprint is 7AB9 E960 B4F7 7F82 B86D 1C05 5E35 CE30 0DD4 B19C
To claim this, I am signing this object:
| /** | |
| @OnlyCurrentDoc | |
| */ | |
| function onOpen() { | |
| const ui = SpreadsheetApp.getUi(); | |
| ui.createMenu("Django CoC").addItem("Generate Code Name", "insertCodeName").addToUi(); | |
| } | |
| function insertCodeName() { |
| from django import http | |
| from django.db.models import F | |
| from app.models import Redirect | |
| class RedirectsMiddleware: | |
| def __init__(self, get_response): | |
| self.get_response = get_response |
I hereby claim:
To claim this, I am signing this object:
| (() => { | |
| if (window.customElements.get('pr-the-header')) return; | |
| class PrideraiserTheHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.role = 'banner'; | |
| this.addEventListener('click', (event) => { | |
| const navToggle = (event.target as HTMLElement).closest( | |
| '[aria-controls="site-nav"]' |
| import random | |
| import string | |
| import typing | |
| from django.conf import settings | |
| # if you have a Report-To service, add it to settings.py along with | |
| # adding ReportToMiddleware to settings.MIDDLEWARE | |
| from django.views.defaults import page_not_found as django_page_not_found | |
| from django.views.decorators.csrf import requires_csrf_token | |
| from django.views.defaults import ERROR_404_TEMPLATE_NAME | |
| @requires_csrf_token | |
| def page_not_found(request, exception, template_name=ERROR_404_TEMPLATE_NAME): | |
| path = request.path.strip("/") | |
| # custom logic goes here | |
| # see if there's a lowercase match |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: |
| #! /usr/bin/env bash | |
| POSITIONAL_ARGS=() | |
| while [[ $# -gt 0 ]]; do | |
| case $1 in | |
| -v | --version) | |
| shift | |
| PY_VERSIONS+=($1) | |
| shift |
| from django.contrib.gis.db import models | |
| from django.utils.translation import gettext_lazy as _ | |
| def validate_is_true(value): | |
| if value is not True: | |
| raise ValidationError(validate_is_true.error_message) | |
| validate_is_true.error_message = _("This field is required") |
| # Hosts/domain names that are valid for this site; required if DEBUG is False | |
| # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts | |
| ALLOWED_HOSTS = [ | |
| 'yourdomain.tld', | |
| '.compute-1.amazonaws.com', # allows viewing of instances directly | |
| ] | |
| import requests | |
| EC2_PRIVATE_IP = None | |
| try: |