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
import typing | |
from functools import wraps | |
from django.urls import reverse | |
from django.utils.html import format_html | |
def display_admin_link(admin_method: typing.Callable=None, *, display_function: typing.Callable=str): | |
""" | |
Returns link to corresponding admin change page of object |
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
# coding: utf-8 | |
from __future__ import absolute_import | |
from django import VERSION | |
from django.apps.registry import apps as global_apps | |
from django.db import router, migrations | |
from django.db.migrations import executor, migration | |
from django.db.migrations.loader import MigrationLoader | |
from django.db.migrations.recorder import MigrationRecorder | |
from django.db.migrations.state import ProjectState |
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
certbot --authenticator standalone --pre-hook "service nginx stop" --post-hook "service nginx start" --installer nginx |
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
import markdown | |
from django.utils.encoding import smart_text | |
from django.utils.safestring import mark_safe | |
from rest_framework.utils import formatting | |
__all__ = ['get_view_description'] | |
if markdown.version <= '2.2': |
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
# coding: utf-8 | |
from __future__ import unicode_literals | |
from collections import OrderedDict | |
from rest_framework.fields import SkipField | |
from rest_framework.relations import PKOnlyObject | |
class DefaultIfNoneMixin(object): |