mirror of
https://gitlab.com/brutaldon/brutaldon.git
synced 2024-12-04 14:46:24 -05:00
Update fields in models for settings branch
This commit is contained in:
parent
daa90ebea7
commit
9cb40914d4
46
brutaldon/migrations/0009_auto_20180824_2241.py
Normal file
46
brutaldon/migrations/0009_auto_20180824_2241.py
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,8 @@
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from pytz import common_timezones
|
||||
|
||||
timezones = [(tz, tz) for tz in common_timezones]
|
||||
|
||||
class Client(models.Model):
|
||||
name = models.TextField(default = "brutaldon")
|
||||
@ -12,6 +15,7 @@ class Client(models.Model):
|
||||
|
||||
class Theme(models.Model):
|
||||
name = models.TextField(max_length=80, unique=True)
|
||||
prefix = models.TextField(max_length=40, null=True, default="default")
|
||||
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)
|
||||
@ -22,11 +26,14 @@ class Theme(models.Model):
|
||||
|
||||
class Preference(models.Model):
|
||||
theme = models.ForeignKey(Theme, models.SET_NULL, null=True)
|
||||
data_saver = models.BooleanField(default=False)
|
||||
fix_emojos = models.BooleanField(default=False)
|
||||
filter_replies = models.BooleanField(default=False)
|
||||
filter_boosts = models.BooleanField(default=False)
|
||||
timezone = models.TextField(max_length=80, blank=True, null=True,
|
||||
choices=timezones)
|
||||
|
||||
class Account(models.Model):
|
||||
username = models.EmailField()
|
||||
email = models.EmailField(null=True, blank=True)
|
||||
django_user = models.ForeignKey(settings.AUTH_USER_MODEL, models.CASCADE, null=True)
|
||||
access_token = models.TextField(null=True, blank=True)
|
||||
client= models.ForeignKey(Client, models.SET_NULL, null=True)
|
||||
|
@ -10,7 +10,6 @@ from brutaldon.models import Client, Account, Preference, Theme
|
||||
from mastodon import Mastodon, AttribAccessDict, MastodonError
|
||||
from urllib import parse
|
||||
from pdb import set_trace
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
class NotLoggedInException(Exception):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user