This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==== SNIP ==== | |
class DistanceSerializer(serializers.Serializer): | |
km = serializers.FloatField() | |
m = serializers.FloatField() | |
mi = serializers.FloatField() | |
ft = serializers.FloatField() | |
class SearchResultSerializer(serializers.Serializer): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import os | |
import re | |
import subprocess | |
def git(args, **kwargs): | |
environ = os.environ.copy() | |
if 'repo' in kwargs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* =================================================== | |
* django-filter | |
* =================================================== | |
*/ | |
.filter-form-header { | |
padding: 0; | |
h2 { | |
background-color: #fafafa; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List, Optional | |
from django import forms | |
from django.db.models import Model, QuerySet | |
from django.utils.functional import cached_property | |
from wagtail.core.blocks import FieldBlock | |
from wagtail.core.utils import resolve_model_string | |
from dal_select2.widgets import ModelSelect2, ModelSelect2Multiple |
First, create a few volumes so that state is persisted across restarts:
docker volume create nats1
docker volume create nats2
docker volume create nats3
Now create a docker-compose.yaml
with the following: