Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Django Favicon Plus Reloaded
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Libraries
Django Favicon Plus Reloaded
Commits
ade6451c
Verified
Commit
ade6451c
authored
3 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Use temporary file instead of in-memory file"
This reverts commit
6c406ec1
.
parent
ac17481d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
favicon/models.py
+2
-2
2 additions, 2 deletions
favicon/models.py
with
2 additions
and
2 deletions
favicon/models.py
+
2
−
2
View file @
ade6451c
...
...
@@ -4,7 +4,7 @@ import sys
from
PIL
import
Image
from
django.conf
import
settings
from
django.core.files.storage
import
default_storage
as
storage
from
django.core.files.uploadedfile
import
Tempora
ryUploadedFile
from
django.core.files.uploadedfile
import
InMemo
ryUploadedFile
from
django.db
import
models
from
django.db.models
import
Q
,
signals
from
django.utils.text
import
slugify
...
...
@@ -140,7 +140,7 @@ class FaviconImg(models.Model):
tmp_io
=
BytesIO
()
tmp
.
save
(
tmp_io
,
format
=
'
PNG
'
)
file_name
=
f
"
{
slugify
(
self
.
faviconFK
.
title
)
}
-
{
self
.
size
}
s.png
"
tmp_file
=
Tempora
ryUploadedFile
(
file_name
,
'
image/png
'
,
sys
.
getsizeof
(
tmp_io
),
None
)
tmp_file
=
InMemo
ryUploadedFile
(
tmp_io
,
None
,
file_name
,
'
image/png
'
,
sys
.
getsizeof
(
tmp_io
),
None
)
self
.
faviconImage
=
tmp_file
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment