mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2024-11-27 01:03:51 -05:00
Add forms object for new preferences
This commit is contained in:
parent
cbb5b544ed
commit
b3444772fc
@ -1,6 +1,8 @@
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from pytz import common_timezones
|
||||
from .models import Theme
|
||||
|
||||
|
||||
PRIVACY_CHOICES = (('public', 'Public'),
|
||||
('unlisted', 'Unlisted'),
|
||||
|
18
brutaldon/migrations/0008_auto_20180618_2140.py
Normal file
18
brutaldon/migrations/0008_auto_20180618_2140.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.0.6 on 2018-06-19 01:40
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('brutaldon', '0007_auto_20180618_2115'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='name',
|
||||
field=models.TextField(max_length=80, unique=True),
|
||||
),
|
||||
]
|
@ -11,12 +11,15 @@ class Client(models.Model):
|
||||
return self.name + ": " + self.api_base_id
|
||||
|
||||
class Theme(models.Model):
|
||||
name = models.TextField(max_length=80)
|
||||
name = models.TextField(max_length=80, unique=True)
|
||||
main_css = models.TextField(max_length=1024, blank=True, null=True,
|
||||
default="css/fullbrutalism.css")
|
||||
tweaks_css = models.TextField(max_length=1024, blank=True, null=True)
|
||||
is_brutalist = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
class Preference(models.Model):
|
||||
theme = models.ForeignKey(Theme, models.SET_NULL, null=True)
|
||||
data_saver = models.BooleanField(default=False)
|
||||
|
Loading…
Reference in New Issue
Block a user