mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-05 15:56:41 +00:00
Allow logo upload
This commit is contained in:
parent
0a9809e6b3
commit
94fc365a52
2 changed files with 40 additions and 0 deletions
28
bookwyrm/migrations/0053_auto_20201005_2233.py
Normal file
28
bookwyrm/migrations/0053_auto_20201005_2233.py
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# Generated by Django 3.0.7 on 2020-10-05 22:33
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('bookwyrm', '0052_auto_20201005_2145'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='sitesettings',
|
||||||
|
name='favicon',
|
||||||
|
field=models.ImageField(default='/static/images/favicon.ico', upload_to='static/images/'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='sitesettings',
|
||||||
|
name='logo',
|
||||||
|
field=models.ImageField(default='/static/images/logo.png', upload_to='static/images/'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='sitesettings',
|
||||||
|
name='logo_small',
|
||||||
|
field=models.ImageField(default='/static/images/logo-small.png', upload_to='static/images/'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -17,6 +17,18 @@ class SiteSettings(models.Model):
|
||||||
code_of_conduct = models.TextField(
|
code_of_conduct = models.TextField(
|
||||||
default="Add a code of conduct here.")
|
default="Add a code of conduct here.")
|
||||||
allow_registration = models.BooleanField(default=True)
|
allow_registration = models.BooleanField(default=True)
|
||||||
|
logo = models.ImageField(
|
||||||
|
upload_to='static/images/',
|
||||||
|
default='/static/images/logo.png'
|
||||||
|
)
|
||||||
|
logo_small = models.ImageField(
|
||||||
|
upload_to='static/images/',
|
||||||
|
default='/static/images/logo-small.png'
|
||||||
|
)
|
||||||
|
favicon = models.ImageField(
|
||||||
|
upload_to='static/images/',
|
||||||
|
default='/static/images/favicon.ico'
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get(cls):
|
def get(cls):
|
||||||
|
|
Loading…
Reference in a new issue