made flatly default theme + fixed preview image

This commit is contained in:
vabene1111 2020-02-16 22:58:24 +01:00
parent 2cc385ceac
commit 81677a74bb
5 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.0.2 on 2020-02-16 21:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0016_auto_20200213_2335'),
]
operations = [
migrations.AlterField(
model_name='userpreference',
name='theme',
field=models.CharField(choices=[('BOOTSTRAP', 'Bootstrap'), ('DARKLY', 'Darkly'), ('FLATLY', 'Flatly'), ('SUPERHERO', 'Superhero')], default='FLATLY', max_length=128),
),
]

View File

@ -12,7 +12,7 @@ class UserPreference(models.Model):
THEMES = ((BOOTSTRAP, 'Bootstrap'), (DARKLY, 'Darkly'), (FLATLY, 'Flatly'), (SUPERHERO, 'Superhero')) THEMES = ((BOOTSTRAP, 'Bootstrap'), (DARKLY, 'Darkly'), (FLATLY, 'Flatly'), (SUPERHERO, 'Superhero'))
user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True) user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True)
theme = models.CharField(choices=THEMES, max_length=128, default=BOOTSTRAP) theme = models.CharField(choices=THEMES, max_length=128, default=FLATLY)
class Storage(models.Model): class Storage(models.Model):

View File

@ -20,7 +20,7 @@ def theme_url(request):
else: else:
raise AttributeError raise AttributeError
except AttributeError: except AttributeError:
return static('themes/bootstrap.min.css') return static('themes/flatly.min.css')
@register.simple_tag @register.simple_tag

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.