Import upstream version 1.1.5
Debian Janitor
2 years ago
0 | 0 |
Metadata-Version: 2.1
|
1 | 1 |
Name: django-favicon-plus-reloaded
|
2 | |
Version: 1.1.3
|
|
2 |
Version: 1.1.5
|
3 | 3 |
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
|
4 | 4 |
Home-page: https://edugit.org/AlekSIS/libs/django-favicon-plus
|
5 | 5 |
Author: arteria GmbH
|
0 | 0 |
Metadata-Version: 2.1
|
1 | 1 |
Name: django-favicon-plus-reloaded
|
2 | |
Version: 1.1.3
|
|
2 |
Version: 1.1.5
|
3 | 3 |
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
|
4 | 4 |
Home-page: https://edugit.org/AlekSIS/libs/django-favicon-plus
|
5 | 5 |
Author: arteria GmbH
|
0 | |
__version__ = '1.1.3'
|
|
0 |
__version__ = '1.1.5'
|
6 | 6 |
from django.core.files.uploadedfile import InMemoryUploadedFile
|
7 | 7 |
from django.db import models
|
8 | 8 |
from django.db.models import Q, signals
|
|
9 |
from django.utils.text import slugify
|
9 | 10 |
|
10 | 11 |
use_sites = hasattr(settings, "SITE_ID")
|
11 | 12 |
|
|
137 | 138 |
|
138 | 139 |
tmp_io = BytesIO()
|
139 | 140 |
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)
|
141 | 143 |
|
142 | 144 |
self.faviconImage = tmp_file
|
143 | 145 |
|