-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This solves a problem where a new S3Storage object was made for each file, which led to terrible performance from loading the cloudfront key.
- Loading branch information
Showing
15 changed files
with
127 additions
and
85 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
45 changes: 30 additions & 15 deletions
45
website/partners/migrations/0024_alter_partner_logo_alter_partner_site_header_and_more.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,47 @@ | ||
# Generated by Django 4.0.4 on 2022-05-27 07:44 | ||
from django.db import migrations, models | ||
import thaliawebsite.storage.backend | ||
from django.core.files.storage import storages | ||
|
||
class Migration(migrations.Migration): | ||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
('partners', '0023_delete_partnerevent'), | ||
("partners", "0023_delete_partnerevent"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='partner', | ||
name='logo', | ||
field=models.ImageField(storage=thaliawebsite.storage.backend.get_public_storage, upload_to='partners/logos/'), | ||
model_name="partner", | ||
name="logo", | ||
field=models.ImageField( | ||
storage=storages["public"], upload_to="partners/logos/" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='partner', | ||
name='site_header', | ||
field=models.ImageField(blank=True, null=True, storage=thaliawebsite.storage.backend.get_public_storage, upload_to='partners/headers/'), | ||
model_name="partner", | ||
name="site_header", | ||
field=models.ImageField( | ||
blank=True, | ||
null=True, | ||
storage=storages["public"], | ||
upload_to="partners/headers/", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='partnerimage', | ||
name='image', | ||
field=models.ImageField(storage=thaliawebsite.storage.backend.get_public_storage, upload_to='partners/images/'), | ||
model_name="partnerimage", | ||
name="image", | ||
field=models.ImageField( | ||
storage=storages["public"], upload_to="partners/images/" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='vacancy', | ||
name='company_logo', | ||
field=models.ImageField(blank=True, null=True, storage=thaliawebsite.storage.backend.get_public_storage, upload_to='partners/vacancy-logos/', verbose_name='company logo'), | ||
model_name="vacancy", | ||
name="company_logo", | ||
field=models.ImageField( | ||
blank=True, | ||
null=True, | ||
storage=storages["public"], | ||
upload_to="partners/vacancy-logos/", | ||
verbose_name="company logo", | ||
), | ||
), | ||
] |
17 changes: 11 additions & 6 deletions
17
website/partners/migrations/0026_partner_alternate_logo.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
# Generated by Django 4.0.7 on 2022-10-05 18:11 | ||
|
||
from django.db import migrations, models | ||
import thaliawebsite.storage.backend | ||
from django.core.files.storage import storages | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('partners', '0025_migrate_public_folders'), | ||
("partners", "0025_migrate_public_folders"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='partner', | ||
name='alternate_logo', | ||
field=models.ImageField(blank=True, help_text='If set, this logo will be shown on the frontpage banner. Please use files with proper transparency.', null=True, storage=thaliawebsite.storage.backend.get_public_storage, upload_to='partners/logos/'), | ||
model_name="partner", | ||
name="alternate_logo", | ||
field=models.ImageField( | ||
blank=True, | ||
help_text="If set, this logo will be shown on the frontpage banner. Please use files with proper transparency.", | ||
null=True, | ||
storage=storages["public"], | ||
upload_to="partners/logos/", | ||
), | ||
), | ||
] |
Oops, something went wrong.