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 django import template | |
from wagtail.wagtailimages.models import SourceImageIOError | |
from wagtail.wagtailimages.templatetags.wagtailimages_tags import ImageNode | |
register = template.Library() | |
@register.tag(name="responsiveimage") | |
def responsiveimage(parser, token): | |
bits = token.split_contents()[1:] |
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 shutil | |
import tempfile | |
from django.apps import apps | |
from django.conf import settings | |
from django.core.files.storage import FileSystemStorage | |
from django.db.models import FileField | |
from django.db.models.loading import get_model, get_models | |
from django.test.runner import DiscoverRunner |