Codebase list django-favicon-plus-reloaded / fresh-snapshots/upstream
Import upstream version 1.1.5 Debian Janitor 2 years ago
4 changed file(s) with 6 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
00 Metadata-Version: 2.1
11 Name: django-favicon-plus-reloaded
2 Version: 1.1.3
2 Version: 1.1.5
33 Summary: simple Django app which allows you to upload a image and it renders a wide variety for html link tags to display the favicon
44 Home-page: https://edugit.org/AlekSIS/libs/django-favicon-plus
55 Author: arteria GmbH
00 Metadata-Version: 2.1
11 Name: django-favicon-plus-reloaded
2 Version: 1.1.3
2 Version: 1.1.5
33 Summary: simple Django app which allows you to upload a image and it renders a wide variety for html link tags to display the favicon
44 Home-page: https://edugit.org/AlekSIS/libs/django-favicon-plus
55 Author: arteria GmbH
0 __version__ = '1.1.3'
0 __version__ = '1.1.5'
66 from django.core.files.uploadedfile import InMemoryUploadedFile
77 from django.db import models
88 from django.db.models import Q, signals
9 from django.utils.text import slugify
910
1011 use_sites = hasattr(settings, "SITE_ID")
1112
137138
138139 tmp_io = BytesIO()
139140 tmp.save(tmp_io, format='PNG')
140 tmp_file = InMemoryUploadedFile(tmp_io, None, f"fav-{self.size}s.png", 'image/png', sys.getsizeof(tmp_io), None)
141 file_name = f"{slugify(self.faviconFK.title)}-{self.size}s.png"
142 tmp_file = InMemoryUploadedFile(tmp_io, None, file_name, 'image/png', sys.getsizeof(tmp_io), None)
141143
142144 self.faviconImage = tmp_file
143145