From 5443b41c0ed2e65b29542a0c1740968fa2b29afd Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Fri, 17 May 2019 13:07:11 -0400 Subject: [PATCH] Reformat everything with black --- brutaldon/forms.py | 114 +- brutaldon/middleware/timezone.py | 3 +- brutaldon/migrations/0001_initial.py | 25 +- brutaldon/migrations/0002_account.py | 29 +- .../migrations/0003_auto_20180424_1255.py | 20 +- .../migrations/0004_auto_20180424_1424.py | 10 +- .../migrations/0005_auto_20180618_2103.py | 63 +- .../migrations/0006_auto_20180618_2112.py | 14 +- .../migrations/0007_auto_20180618_2115.py | 95 +- .../migrations/0008_auto_20180618_2140.py | 10 +- .../migrations/0009_auto_20180824_2241.py | 492 +++++- .../migrations/0010_auto_20180825_1009.py | 504 +++++- .../migrations/0011_auto_20180825_1017.py | 467 +++++- .../migrations/0012_auto_20180826_1853.py | 10 +- .../migrations/0013_auto_20180826_1935.py | 16 +- .../migrations/0014_account_note_seen.py | 10 +- .../migrations/0015_auto_20181001_1812.py | 16 +- .../migrations/0016_auto_20181009_1805.py | 38 +- .../0017_preference_poll_frequency.py | 15 +- .../0018_preference_filter_notifications.py | 15 +- .../migrations/0019_auto_20190124_0813.py | 468 +++++- .../migrations/0020_auto_20190127_2159.py | 10 +- brutaldon/migrations/0021_client_version.py | 12 +- .../migrations/0022_auto_20190506_0938.py | 12 +- brutaldon/models.py | 59 +- brutaldon/settings.py | 213 +-- brutaldon/templatetags/humanetime.py | 10 +- brutaldon/templatetags/taglinks.py | 55 +- brutaldon/urls.py | 102 +- brutaldon/views.py | 1465 +++++++++++------ 30 files changed, 3351 insertions(+), 1021 deletions(-) diff --git a/brutaldon/forms.py b/brutaldon/forms.py index 1064fa6..dfc6bd1 100644 --- a/brutaldon/forms.py +++ b/brutaldon/forms.py @@ -5,69 +5,91 @@ from pytz import common_timezones from .models import Theme, Preference -PRIVACY_CHOICES = (('public', _('Public')), - ('unlisted', _('Unlisted')), - ('private', _('Private')), - ('direct', _('Direct'))) +PRIVACY_CHOICES = ( + ("public", _("Public")), + ("unlisted", _("Unlisted")), + ("private", _("Private")), + ("direct", _("Direct")), +) + +timezones = [(tz, tz) for tz in common_timezones] -timezones = [ (tz, tz) for tz in common_timezones] class LoginForm(forms.Form): - instance = forms.CharField(label=_("Instance"), - max_length=256) + instance = forms.CharField(label=_("Instance"), max_length=256) email = forms.EmailField(label=_("Email")) password = forms.CharField(widget=forms.PasswordInput()) + class OAuthLoginForm(forms.Form): - instance = forms.CharField(label=_("Instance"), - max_length=256) + instance = forms.CharField(label=_("Instance"), max_length=256) + class PreferencesForm(forms.ModelForm): class Meta: model = Preference - fields = ['theme', 'filter_replies', 'filter_boosts', 'timezone', - 'no_javascript', 'notifications', 'click_to_load', 'lightbox', - 'filter_notifications', 'poll_frequency'] + fields = [ + "theme", + "filter_replies", + "filter_boosts", + "timezone", + "no_javascript", + "notifications", + "click_to_load", + "lightbox", + "filter_notifications", + "poll_frequency", + ] + class PostForm(forms.Form): """def status_post(self, status, in_reply_to_id=None, media_ids=None, sensitive=False, visibility=None, spoiler_text=None):""" + status = forms.CharField(label="Toot", widget=forms.Textarea) - visibility = forms.ChoiceField(label=_("Toot visibility"), choices=PRIVACY_CHOICES, - required=False) - spoiler_text = forms.CharField(label=_("CW or Subject"), - required=False) - media_file_1 = forms.FileField(label = _("Media 1"), - required=False) - media_text_1 = forms.CharField(label=_("Describe media 1."), - required=False) - media_file_2 = forms.FileField(label = _("Media 2"), - required=False) - media_text_2 = forms.CharField(label=_("Describe media 2."), - required=False) - media_file_3 = forms.FileField(label = _("Media 3"), - required=False) - media_text_3 = forms.CharField(label=_("Describe media 3."), - required=False) - media_file_4 = forms.FileField(label = _("Media 4"), - required=False) - media_text_4 = forms.CharField(label=_("Describe media 4."), - required=False) + visibility = forms.ChoiceField( + label=_("Toot visibility"), choices=PRIVACY_CHOICES, required=False + ) + spoiler_text = forms.CharField(label=_("CW or Subject"), required=False) + media_file_1 = forms.FileField(label=_("Media 1"), required=False) + media_text_1 = forms.CharField(label=_("Describe media 1."), required=False) + media_file_2 = forms.FileField(label=_("Media 2"), required=False) + media_text_2 = forms.CharField(label=_("Describe media 2."), required=False) + media_file_3 = forms.FileField(label=_("Media 3"), required=False) + media_text_3 = forms.CharField(label=_("Describe media 3."), required=False) + media_file_4 = forms.FileField(label=_("Media 4"), required=False) + media_text_4 = forms.CharField(label=_("Describe media 4."), required=False) media_sensitive = forms.BooleanField(label=_("Sensitive media?"), required=False) + class FilterForm(forms.Form): phrase = forms.CharField(label=_("Word or phrase to filter")) - context_home = forms.BooleanField(label=_("In home timeline"), required=False, initial=True) - context_public = forms.BooleanField(label=_("In public timelines"), required=False, initial=True) - context_notes = forms.BooleanField(label=_("In notifications"), required=False, initial=True) - context_thread = forms.BooleanField(label=_("In thread contexts"), required=False, initial=True) - whole_word = forms.BooleanField(label=_("Whole words only"), required=False, initial=True) - expires_in = forms.TypedChoiceField(label=_("Expires in"), - choices=(("", "Never"), - ("1800", "30 minutes"), - ("3600", "1 hour"), - ("21600", "6 hours"), - ("43200", "12 hours"), - ("86400", "1 day"), - ("604800", "1 week")), - coerce=int, required=False) + context_home = forms.BooleanField( + label=_("In home timeline"), required=False, initial=True + ) + context_public = forms.BooleanField( + label=_("In public timelines"), required=False, initial=True + ) + context_notes = forms.BooleanField( + label=_("In notifications"), required=False, initial=True + ) + context_thread = forms.BooleanField( + label=_("In thread contexts"), required=False, initial=True + ) + whole_word = forms.BooleanField( + label=_("Whole words only"), required=False, initial=True + ) + expires_in = forms.TypedChoiceField( + label=_("Expires in"), + choices=( + ("", "Never"), + ("1800", "30 minutes"), + ("3600", "1 hour"), + ("21600", "6 hours"), + ("43200", "12 hours"), + ("86400", "1 day"), + ("604800", "1 week"), + ), + coerce=int, + required=False, + ) diff --git a/brutaldon/middleware/timezone.py b/brutaldon/middleware/timezone.py index 0cba5b6..397a4c9 100644 --- a/brutaldon/middleware/timezone.py +++ b/brutaldon/middleware/timezone.py @@ -3,9 +3,10 @@ import pytz from django.utils import timezone from django.utils.deprecation import MiddlewareMixin + class TimezoneMiddleware(MiddlewareMixin): def process_request(self, request): - tzname = request.session.get('timezone', "UTC") + tzname = request.session.get("timezone", "UTC") if tzname: timezone.activate(pytz.timezone(tzname)) else: diff --git a/brutaldon/migrations/0001_initial.py b/brutaldon/migrations/0001_initial.py index 83207f5..e161ce2 100644 --- a/brutaldon/migrations/0001_initial.py +++ b/brutaldon/migrations/0001_initial.py @@ -7,18 +7,25 @@ class Migration(migrations.Migration): initial = True - dependencies = [ - ] + dependencies = [] operations = [ migrations.CreateModel( - name='Client', + name="Client", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.TextField(default='brutaldon')), - ('api_base_id', models.URLField(default='mastodon.social')), - ('client_id', models.TextField(blank=True, null=True)), - ('client_secret', models.TextField(blank=True, null=True)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.TextField(default="brutaldon")), + ("api_base_id", models.URLField(default="mastodon.social")), + ("client_id", models.TextField(blank=True, null=True)), + ("client_secret", models.TextField(blank=True, null=True)), ], - ), + ) ] diff --git a/brutaldon/migrations/0002_account.py b/brutaldon/migrations/0002_account.py index f755886..147869b 100644 --- a/brutaldon/migrations/0002_account.py +++ b/brutaldon/migrations/0002_account.py @@ -9,17 +9,32 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('brutaldon', '0001_initial'), + ("brutaldon", "0001_initial"), ] operations = [ migrations.CreateModel( - name='Account', + name="Account", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('username', models.CharField(max_length=80)), - ('access_token', models.TextField(blank=True, null=True)), - ('django_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("username", models.CharField(max_length=80)), + ("access_token", models.TextField(blank=True, null=True)), + ( + "django_user", + models.ForeignKey( + null=True, + on_delete=django.db.models.deletion.CASCADE, + to=settings.AUTH_USER_MODEL, + ), + ), ], - ), + ) ] diff --git a/brutaldon/migrations/0003_auto_20180424_1255.py b/brutaldon/migrations/0003_auto_20180424_1255.py index d4b32bb..72571f1 100644 --- a/brutaldon/migrations/0003_auto_20180424_1255.py +++ b/brutaldon/migrations/0003_auto_20180424_1255.py @@ -6,19 +6,21 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0002_account'), - ] + dependencies = [("brutaldon", "0002_account")] operations = [ migrations.AddField( - model_name='account', - name='client', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='brutaldon.Client'), + model_name="account", + name="client", + field=models.ForeignKey( + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="brutaldon.Client", + ), ), migrations.AlterField( - model_name='client', - name='api_base_id', - field=models.URLField(default='https://mastodon.social'), + model_name="client", + name="api_base_id", + field=models.URLField(default="https://mastodon.social"), ), ] diff --git a/brutaldon/migrations/0004_auto_20180424_1424.py b/brutaldon/migrations/0004_auto_20180424_1424.py index 4f62141..13a194d 100644 --- a/brutaldon/migrations/0004_auto_20180424_1424.py +++ b/brutaldon/migrations/0004_auto_20180424_1424.py @@ -5,14 +5,12 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0003_auto_20180424_1255'), - ] + dependencies = [("brutaldon", "0003_auto_20180424_1255")] operations = [ migrations.AlterField( - model_name='account', - name='username', + model_name="account", + name="username", field=models.EmailField(max_length=254), - ), + ) ] diff --git a/brutaldon/migrations/0005_auto_20180618_2103.py b/brutaldon/migrations/0005_auto_20180618_2103.py index 112af5f..a0d839e 100644 --- a/brutaldon/migrations/0005_auto_20180618_2103.py +++ b/brutaldon/migrations/0005_auto_20180618_2103.py @@ -6,37 +6,62 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0004_auto_20180424_1424'), - ] + dependencies = [("brutaldon", "0004_auto_20180424_1424")] operations = [ migrations.CreateModel( - name='Preference', + name="Preference", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('data_saver', models.BooleanField(default=False)), - ('fix_emojos', models.BooleanField(default=False)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("data_saver", models.BooleanField(default=False)), + ("fix_emojos", models.BooleanField(default=False)), ], ), migrations.CreateModel( - name='Theme', + name="Theme", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.TextField(max_length=80)), - ('main_css', models.TextField(max_length=1024)), - ('tweaks_css', models.TextField(blank=True, max_length=1024, null=True)), - ('is_brutalist', models.BooleanField(default=False)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.TextField(max_length=80)), + ("main_css", models.TextField(max_length=1024)), + ( + "tweaks_css", + models.TextField(blank=True, max_length=1024, null=True), + ), + ("is_brutalist", models.BooleanField(default=False)), ], ), migrations.AddField( - model_name='preference', - name='theme', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='brutaldon.Theme'), + model_name="preference", + name="theme", + field=models.ForeignKey( + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="brutaldon.Theme", + ), ), migrations.AddField( - model_name='account', - name='preferences', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='brutaldon.Preference'), + model_name="account", + name="preferences", + field=models.ForeignKey( + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="brutaldon.Preference", + ), ), ] diff --git a/brutaldon/migrations/0006_auto_20180618_2112.py b/brutaldon/migrations/0006_auto_20180618_2112.py index 843bc18..d369c3f 100644 --- a/brutaldon/migrations/0006_auto_20180618_2112.py +++ b/brutaldon/migrations/0006_auto_20180618_2112.py @@ -5,14 +5,14 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0005_auto_20180618_2103'), - ] + dependencies = [("brutaldon", "0005_auto_20180618_2103")] operations = [ migrations.AlterField( - model_name='theme', - name='main_css', - field=models.TextField(blank=True, default='css/fullbrutalism.css', max_length=1024, null=True), - ), + model_name="theme", + name="main_css", + field=models.TextField( + blank=True, default="css/fullbrutalism.css", max_length=1024, null=True + ), + ) ] diff --git a/brutaldon/migrations/0007_auto_20180618_2115.py b/brutaldon/migrations/0007_auto_20180618_2115.py index 25b155d..3715d64 100644 --- a/brutaldon/migrations/0007_auto_20180618_2115.py +++ b/brutaldon/migrations/0007_auto_20180618_2115.py @@ -2,67 +2,80 @@ from django.db import migrations + def set_up_default_themes(apps, schema_editor): - Theme = apps.get_model('brutaldon', 'Theme') - default = Theme(name="default", - main_css="css/bulma.min.css", - tweaks_css="css/brutaldon.css", - is_brutalist=False) + Theme = apps.get_model("brutaldon", "Theme") + default = Theme( + name="default", + main_css="css/bulma.min.css", + tweaks_css="css/brutaldon.css", + is_brutalist=False, + ) default.save() - dark = Theme(name="default dark", - main_css="css/bulmaswatch-darkly.min.css", - tweaks_css="css/brutaldon-dark.css", - is_brutalist=False) + dark = Theme( + name="default dark", + main_css="css/bulmaswatch-darkly.min.css", + tweaks_css="css/brutaldon-dark.css", + is_brutalist=False, + ) dark.save() - lux = Theme(name="Lux", - main_css="css/bulmaswatch-lux.min.css", - tweaks_css="css/brutaldon.css", - is_brutalist=False) + lux = Theme( + name="Lux", + main_css="css/bulmaswatch-lux.min.css", + tweaks_css="css/brutaldon.css", + is_brutalist=False, + ) lux.save() - solar = Theme(name="Solar", - main_css="css/bulmaswatch-solar.min.css", - tweaks_css="css/brutaldon.css", - is_brutalist=False) + solar = Theme( + name="Solar", + main_css="css/bulmaswatch-solar.min.css", + tweaks_css="css/brutaldon.css", + is_brutalist=False, + ) solar.save() - brutalism = Theme(name="FULLBRUTALISM", - main_css="css/fullbrutalism.css", - is_brutalist=True) + brutalism = Theme( + name="FULLBRUTALISM", main_css="css/fullbrutalism.css", is_brutalist=True + ) brutalism.save() - brutstrap = Theme(name="Brutstrap", - main_css="css/brutstrap.css", - is_brutalist=True, - tweaks_css="css/brutstrap-tweaks.css") + brutstrap = Theme( + name="Brutstrap", + main_css="css/brutstrap.css", + is_brutalist=True, + tweaks_css="css/brutstrap-tweaks.css", + ) brutstrap.save() - large = Theme(name="Minimalist Large", main_css="css/minimal-large.css", - is_brutalist=True) + large = Theme( + name="Minimalist Large", main_css="css/minimal-large.css", is_brutalist=True + ) large.save() - small = Theme(name="Minimalist Small", main_css="css/minimal-small.css", - is_brutalist=True) + small = Theme( + name="Minimalist Small", main_css="css/minimal-small.css", is_brutalist=True + ) small.save() - dark2 = Theme(name="Minimalist Dark", main_css="css/minimal-dark.css", - is_brutalist=True) + dark2 = Theme( + name="Minimalist Dark", main_css="css/minimal-dark.css", is_brutalist=True + ) dark2.save() - vt240 = Theme(name="vt240 amber", main_css="css/vt240don-amber.css", - is_brutalist=True) + vt240 = Theme( + name="vt240 amber", main_css="css/vt240don-amber.css", is_brutalist=True + ) vt240.save() - vt240_green = Theme(name="vt240 green", main_css="css/vt240don-green.css", - is_brutalist=True) + vt240_green = Theme( + name="vt240 green", main_css="css/vt240don-green.css", is_brutalist=True + ) vt240_green.save() minimal = Theme(name="No styling at all", main_css=None, is_brutalist=True) minimal.save() + def delete_themes(apps, schema_editor): - Theme = apps.get_model('brutaldon' 'Theme') + Theme = apps.get_model("brutaldon" "Theme") for theme in Theme.objects.all(): theme.delete() class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0006_auto_20180618_2112'), - ] + dependencies = [("brutaldon", "0006_auto_20180618_2112")] - operations = [ - migrations.RunPython(set_up_default_themes, delete_themes) - ] + operations = [migrations.RunPython(set_up_default_themes, delete_themes)] diff --git a/brutaldon/migrations/0008_auto_20180618_2140.py b/brutaldon/migrations/0008_auto_20180618_2140.py index 16f1b2b..7086055 100644 --- a/brutaldon/migrations/0008_auto_20180618_2140.py +++ b/brutaldon/migrations/0008_auto_20180618_2140.py @@ -5,14 +5,12 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0007_auto_20180618_2115'), - ] + dependencies = [("brutaldon", "0007_auto_20180618_2115")] operations = [ migrations.AlterField( - model_name='theme', - name='name', + model_name="theme", + name="name", field=models.TextField(max_length=80, unique=True), - ), + ) ] diff --git a/brutaldon/migrations/0009_auto_20180824_2241.py b/brutaldon/migrations/0009_auto_20180824_2241.py index df8c32c..ed237b3 100644 --- a/brutaldon/migrations/0009_auto_20180824_2241.py +++ b/brutaldon/migrations/0009_auto_20180824_2241.py @@ -5,42 +5,488 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0008_auto_20180618_2140'), - ] + dependencies = [("brutaldon", "0008_auto_20180618_2140")] operations = [ - migrations.RemoveField( - model_name='preference', - name='data_saver', - ), - migrations.RemoveField( - model_name='preference', - name='fix_emojos', - ), + migrations.RemoveField(model_name="preference", name="data_saver"), + migrations.RemoveField(model_name="preference", name="fix_emojos"), migrations.AddField( - model_name='account', - name='email', + model_name="account", + name="email", field=models.EmailField(blank=True, max_length=254, null=True), ), migrations.AddField( - model_name='preference', - name='filter_boosts', + model_name="preference", + name="filter_boosts", field=models.BooleanField(default=False), ), migrations.AddField( - model_name='preference', - name='filter_replies', + model_name="preference", + name="filter_replies", field=models.BooleanField(default=False), ), migrations.AddField( - model_name='preference', - name='timezone', - field=models.TextField(blank=True, choices=[('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Godthab', 'America/Godthab'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/Kralendijk', 'America/Kralendijk'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Lower_Princes', 'America/Lower_Princes'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Marigot', 'America/Marigot'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Barthelemy', 'America/St_Barthelemy'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Arctic/Longyearbyen', 'Arctic/Longyearbyen'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Canada/Atlantic', 'Canada/Atlantic'), ('Canada/Central', 'Canada/Central'), ('Canada/Eastern', 'Canada/Eastern'), ('Canada/Mountain', 'Canada/Mountain'), ('Canada/Newfoundland', 'Canada/Newfoundland'), ('Canada/Pacific', 'Canada/Pacific'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Bratislava', 'Europe/Bratislava'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Busingen', 'Europe/Busingen'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Guernsey', 'Europe/Guernsey'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Isle_of_Man', 'Europe/Isle_of_Man'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Jersey', 'Europe/Jersey'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/Ljubljana', 'Europe/Ljubljana'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Mariehamn', 'Europe/Mariehamn'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Podgorica', 'Europe/Podgorica'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/San_Marino', 'Europe/San_Marino'), ('Europe/Sarajevo', 'Europe/Sarajevo'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Skopje', 'Europe/Skopje'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vatican', 'Europe/Vatican'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zagreb', 'Europe/Zagreb'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('US/Alaska', 'US/Alaska'), ('US/Arizona', 'US/Arizona'), ('US/Central', 'US/Central'), ('US/Eastern', 'US/Eastern'), ('US/Hawaii', 'US/Hawaii'), ('US/Mountain', 'US/Mountain'), ('US/Pacific', 'US/Pacific'), ('UTC', 'UTC')], max_length=80, null=True), + model_name="preference", + name="timezone", + field=models.TextField( + blank=True, + choices=[ + ("Africa/Abidjan", "Africa/Abidjan"), + ("Africa/Accra", "Africa/Accra"), + ("Africa/Addis_Ababa", "Africa/Addis_Ababa"), + ("Africa/Algiers", "Africa/Algiers"), + ("Africa/Asmara", "Africa/Asmara"), + ("Africa/Bamako", "Africa/Bamako"), + ("Africa/Bangui", "Africa/Bangui"), + ("Africa/Banjul", "Africa/Banjul"), + ("Africa/Bissau", "Africa/Bissau"), + ("Africa/Blantyre", "Africa/Blantyre"), + ("Africa/Brazzaville", "Africa/Brazzaville"), + ("Africa/Bujumbura", "Africa/Bujumbura"), + ("Africa/Cairo", "Africa/Cairo"), + ("Africa/Casablanca", "Africa/Casablanca"), + ("Africa/Ceuta", "Africa/Ceuta"), + ("Africa/Conakry", "Africa/Conakry"), + ("Africa/Dakar", "Africa/Dakar"), + ("Africa/Dar_es_Salaam", "Africa/Dar_es_Salaam"), + ("Africa/Djibouti", "Africa/Djibouti"), + ("Africa/Douala", "Africa/Douala"), + ("Africa/El_Aaiun", "Africa/El_Aaiun"), + ("Africa/Freetown", "Africa/Freetown"), + ("Africa/Gaborone", "Africa/Gaborone"), + ("Africa/Harare", "Africa/Harare"), + ("Africa/Johannesburg", "Africa/Johannesburg"), + ("Africa/Juba", "Africa/Juba"), + ("Africa/Kampala", "Africa/Kampala"), + ("Africa/Khartoum", "Africa/Khartoum"), + ("Africa/Kigali", "Africa/Kigali"), + ("Africa/Kinshasa", "Africa/Kinshasa"), + ("Africa/Lagos", "Africa/Lagos"), + ("Africa/Libreville", "Africa/Libreville"), + ("Africa/Lome", "Africa/Lome"), + ("Africa/Luanda", "Africa/Luanda"), + ("Africa/Lubumbashi", "Africa/Lubumbashi"), + ("Africa/Lusaka", "Africa/Lusaka"), + ("Africa/Malabo", "Africa/Malabo"), + ("Africa/Maputo", "Africa/Maputo"), + ("Africa/Maseru", "Africa/Maseru"), + ("Africa/Mbabane", "Africa/Mbabane"), + ("Africa/Mogadishu", "Africa/Mogadishu"), + ("Africa/Monrovia", "Africa/Monrovia"), + ("Africa/Nairobi", "Africa/Nairobi"), + ("Africa/Ndjamena", "Africa/Ndjamena"), + ("Africa/Niamey", "Africa/Niamey"), + ("Africa/Nouakchott", "Africa/Nouakchott"), + ("Africa/Ouagadougou", "Africa/Ouagadougou"), + ("Africa/Porto-Novo", "Africa/Porto-Novo"), + ("Africa/Sao_Tome", "Africa/Sao_Tome"), + ("Africa/Tripoli", "Africa/Tripoli"), + ("Africa/Tunis", "Africa/Tunis"), + ("Africa/Windhoek", "Africa/Windhoek"), + ("America/Adak", "America/Adak"), + ("America/Anchorage", "America/Anchorage"), + ("America/Anguilla", "America/Anguilla"), + ("America/Antigua", "America/Antigua"), + ("America/Araguaina", "America/Araguaina"), + ( + "America/Argentina/Buenos_Aires", + "America/Argentina/Buenos_Aires", + ), + ("America/Argentina/Catamarca", "America/Argentina/Catamarca"), + ("America/Argentina/Cordoba", "America/Argentina/Cordoba"), + ("America/Argentina/Jujuy", "America/Argentina/Jujuy"), + ("America/Argentina/La_Rioja", "America/Argentina/La_Rioja"), + ("America/Argentina/Mendoza", "America/Argentina/Mendoza"), + ( + "America/Argentina/Rio_Gallegos", + "America/Argentina/Rio_Gallegos", + ), + ("America/Argentina/Salta", "America/Argentina/Salta"), + ("America/Argentina/San_Juan", "America/Argentina/San_Juan"), + ("America/Argentina/San_Luis", "America/Argentina/San_Luis"), + ("America/Argentina/Tucuman", "America/Argentina/Tucuman"), + ("America/Argentina/Ushuaia", "America/Argentina/Ushuaia"), + ("America/Aruba", "America/Aruba"), + ("America/Asuncion", "America/Asuncion"), + ("America/Atikokan", "America/Atikokan"), + ("America/Bahia", "America/Bahia"), + ("America/Bahia_Banderas", "America/Bahia_Banderas"), + ("America/Barbados", "America/Barbados"), + ("America/Belem", "America/Belem"), + ("America/Belize", "America/Belize"), + ("America/Blanc-Sablon", "America/Blanc-Sablon"), + ("America/Boa_Vista", "America/Boa_Vista"), + ("America/Bogota", "America/Bogota"), + ("America/Boise", "America/Boise"), + ("America/Cambridge_Bay", "America/Cambridge_Bay"), + ("America/Campo_Grande", "America/Campo_Grande"), + ("America/Cancun", "America/Cancun"), + ("America/Caracas", "America/Caracas"), + ("America/Cayenne", "America/Cayenne"), + ("America/Cayman", "America/Cayman"), + ("America/Chicago", "America/Chicago"), + ("America/Chihuahua", "America/Chihuahua"), + ("America/Costa_Rica", "America/Costa_Rica"), + ("America/Creston", "America/Creston"), + ("America/Cuiaba", "America/Cuiaba"), + ("America/Curacao", "America/Curacao"), + ("America/Danmarkshavn", "America/Danmarkshavn"), + ("America/Dawson", "America/Dawson"), + ("America/Dawson_Creek", "America/Dawson_Creek"), + ("America/Denver", "America/Denver"), + ("America/Detroit", "America/Detroit"), + ("America/Dominica", "America/Dominica"), + ("America/Edmonton", "America/Edmonton"), + ("America/Eirunepe", "America/Eirunepe"), + ("America/El_Salvador", "America/El_Salvador"), + ("America/Fort_Nelson", "America/Fort_Nelson"), + ("America/Fortaleza", "America/Fortaleza"), + ("America/Glace_Bay", "America/Glace_Bay"), + ("America/Godthab", "America/Godthab"), + ("America/Goose_Bay", "America/Goose_Bay"), + ("America/Grand_Turk", "America/Grand_Turk"), + ("America/Grenada", "America/Grenada"), + ("America/Guadeloupe", "America/Guadeloupe"), + ("America/Guatemala", "America/Guatemala"), + ("America/Guayaquil", "America/Guayaquil"), + ("America/Guyana", "America/Guyana"), + ("America/Halifax", "America/Halifax"), + ("America/Havana", "America/Havana"), + ("America/Hermosillo", "America/Hermosillo"), + ("America/Indiana/Indianapolis", "America/Indiana/Indianapolis"), + ("America/Indiana/Knox", "America/Indiana/Knox"), + ("America/Indiana/Marengo", "America/Indiana/Marengo"), + ("America/Indiana/Petersburg", "America/Indiana/Petersburg"), + ("America/Indiana/Tell_City", "America/Indiana/Tell_City"), + ("America/Indiana/Vevay", "America/Indiana/Vevay"), + ("America/Indiana/Vincennes", "America/Indiana/Vincennes"), + ("America/Indiana/Winamac", "America/Indiana/Winamac"), + ("America/Inuvik", "America/Inuvik"), + ("America/Iqaluit", "America/Iqaluit"), + ("America/Jamaica", "America/Jamaica"), + ("America/Juneau", "America/Juneau"), + ("America/Kentucky/Louisville", "America/Kentucky/Louisville"), + ("America/Kentucky/Monticello", "America/Kentucky/Monticello"), + ("America/Kralendijk", "America/Kralendijk"), + ("America/La_Paz", "America/La_Paz"), + ("America/Lima", "America/Lima"), + ("America/Los_Angeles", "America/Los_Angeles"), + ("America/Lower_Princes", "America/Lower_Princes"), + ("America/Maceio", "America/Maceio"), + ("America/Managua", "America/Managua"), + ("America/Manaus", "America/Manaus"), + ("America/Marigot", "America/Marigot"), + ("America/Martinique", "America/Martinique"), + ("America/Matamoros", "America/Matamoros"), + ("America/Mazatlan", "America/Mazatlan"), + ("America/Menominee", "America/Menominee"), + ("America/Merida", "America/Merida"), + ("America/Metlakatla", "America/Metlakatla"), + ("America/Mexico_City", "America/Mexico_City"), + ("America/Miquelon", "America/Miquelon"), + ("America/Moncton", "America/Moncton"), + ("America/Monterrey", "America/Monterrey"), + ("America/Montevideo", "America/Montevideo"), + ("America/Montserrat", "America/Montserrat"), + ("America/Nassau", "America/Nassau"), + ("America/New_York", "America/New_York"), + ("America/Nipigon", "America/Nipigon"), + ("America/Nome", "America/Nome"), + ("America/Noronha", "America/Noronha"), + ("America/North_Dakota/Beulah", "America/North_Dakota/Beulah"), + ("America/North_Dakota/Center", "America/North_Dakota/Center"), + ( + "America/North_Dakota/New_Salem", + "America/North_Dakota/New_Salem", + ), + ("America/Ojinaga", "America/Ojinaga"), + ("America/Panama", "America/Panama"), + ("America/Pangnirtung", "America/Pangnirtung"), + ("America/Paramaribo", "America/Paramaribo"), + ("America/Phoenix", "America/Phoenix"), + ("America/Port-au-Prince", "America/Port-au-Prince"), + ("America/Port_of_Spain", "America/Port_of_Spain"), + ("America/Porto_Velho", "America/Porto_Velho"), + ("America/Puerto_Rico", "America/Puerto_Rico"), + ("America/Punta_Arenas", "America/Punta_Arenas"), + ("America/Rainy_River", "America/Rainy_River"), + ("America/Rankin_Inlet", "America/Rankin_Inlet"), + ("America/Recife", "America/Recife"), + ("America/Regina", "America/Regina"), + ("America/Resolute", "America/Resolute"), + ("America/Rio_Branco", "America/Rio_Branco"), + ("America/Santarem", "America/Santarem"), + ("America/Santiago", "America/Santiago"), + ("America/Santo_Domingo", "America/Santo_Domingo"), + ("America/Sao_Paulo", "America/Sao_Paulo"), + ("America/Scoresbysund", "America/Scoresbysund"), + ("America/Sitka", "America/Sitka"), + ("America/St_Barthelemy", "America/St_Barthelemy"), + ("America/St_Johns", "America/St_Johns"), + ("America/St_Kitts", "America/St_Kitts"), + ("America/St_Lucia", "America/St_Lucia"), + ("America/St_Thomas", "America/St_Thomas"), + ("America/St_Vincent", "America/St_Vincent"), + ("America/Swift_Current", "America/Swift_Current"), + ("America/Tegucigalpa", "America/Tegucigalpa"), + ("America/Thule", "America/Thule"), + ("America/Thunder_Bay", "America/Thunder_Bay"), + ("America/Tijuana", "America/Tijuana"), + ("America/Toronto", "America/Toronto"), + ("America/Tortola", "America/Tortola"), + ("America/Vancouver", "America/Vancouver"), + ("America/Whitehorse", "America/Whitehorse"), + ("America/Winnipeg", "America/Winnipeg"), + ("America/Yakutat", "America/Yakutat"), + ("America/Yellowknife", "America/Yellowknife"), + ("Antarctica/Casey", "Antarctica/Casey"), + ("Antarctica/Davis", "Antarctica/Davis"), + ("Antarctica/DumontDUrville", "Antarctica/DumontDUrville"), + ("Antarctica/Macquarie", "Antarctica/Macquarie"), + ("Antarctica/Mawson", "Antarctica/Mawson"), + ("Antarctica/McMurdo", "Antarctica/McMurdo"), + ("Antarctica/Palmer", "Antarctica/Palmer"), + ("Antarctica/Rothera", "Antarctica/Rothera"), + ("Antarctica/Syowa", "Antarctica/Syowa"), + ("Antarctica/Troll", "Antarctica/Troll"), + ("Antarctica/Vostok", "Antarctica/Vostok"), + ("Arctic/Longyearbyen", "Arctic/Longyearbyen"), + ("Asia/Aden", "Asia/Aden"), + ("Asia/Almaty", "Asia/Almaty"), + ("Asia/Amman", "Asia/Amman"), + ("Asia/Anadyr", "Asia/Anadyr"), + ("Asia/Aqtau", "Asia/Aqtau"), + ("Asia/Aqtobe", "Asia/Aqtobe"), + ("Asia/Ashgabat", "Asia/Ashgabat"), + ("Asia/Atyrau", "Asia/Atyrau"), + ("Asia/Baghdad", "Asia/Baghdad"), + ("Asia/Bahrain", "Asia/Bahrain"), + ("Asia/Baku", "Asia/Baku"), + ("Asia/Bangkok", "Asia/Bangkok"), + ("Asia/Barnaul", "Asia/Barnaul"), + ("Asia/Beirut", "Asia/Beirut"), + ("Asia/Bishkek", "Asia/Bishkek"), + ("Asia/Brunei", "Asia/Brunei"), + ("Asia/Chita", "Asia/Chita"), + ("Asia/Choibalsan", "Asia/Choibalsan"), + ("Asia/Colombo", "Asia/Colombo"), + ("Asia/Damascus", "Asia/Damascus"), + ("Asia/Dhaka", "Asia/Dhaka"), + ("Asia/Dili", "Asia/Dili"), + ("Asia/Dubai", "Asia/Dubai"), + ("Asia/Dushanbe", "Asia/Dushanbe"), + ("Asia/Famagusta", "Asia/Famagusta"), + ("Asia/Gaza", "Asia/Gaza"), + ("Asia/Hebron", "Asia/Hebron"), + ("Asia/Ho_Chi_Minh", "Asia/Ho_Chi_Minh"), + ("Asia/Hong_Kong", "Asia/Hong_Kong"), + ("Asia/Hovd", "Asia/Hovd"), + ("Asia/Irkutsk", "Asia/Irkutsk"), + ("Asia/Jakarta", "Asia/Jakarta"), + ("Asia/Jayapura", "Asia/Jayapura"), + ("Asia/Jerusalem", "Asia/Jerusalem"), + ("Asia/Kabul", "Asia/Kabul"), + ("Asia/Kamchatka", "Asia/Kamchatka"), + ("Asia/Karachi", "Asia/Karachi"), + ("Asia/Kathmandu", "Asia/Kathmandu"), + ("Asia/Khandyga", "Asia/Khandyga"), + ("Asia/Kolkata", "Asia/Kolkata"), + ("Asia/Krasnoyarsk", "Asia/Krasnoyarsk"), + ("Asia/Kuala_Lumpur", "Asia/Kuala_Lumpur"), + ("Asia/Kuching", "Asia/Kuching"), + ("Asia/Kuwait", "Asia/Kuwait"), + ("Asia/Macau", "Asia/Macau"), + ("Asia/Magadan", "Asia/Magadan"), + ("Asia/Makassar", "Asia/Makassar"), + ("Asia/Manila", "Asia/Manila"), + ("Asia/Muscat", "Asia/Muscat"), + ("Asia/Nicosia", "Asia/Nicosia"), + ("Asia/Novokuznetsk", "Asia/Novokuznetsk"), + ("Asia/Novosibirsk", "Asia/Novosibirsk"), + ("Asia/Omsk", "Asia/Omsk"), + ("Asia/Oral", "Asia/Oral"), + ("Asia/Phnom_Penh", "Asia/Phnom_Penh"), + ("Asia/Pontianak", "Asia/Pontianak"), + ("Asia/Pyongyang", "Asia/Pyongyang"), + ("Asia/Qatar", "Asia/Qatar"), + ("Asia/Qyzylorda", "Asia/Qyzylorda"), + ("Asia/Riyadh", "Asia/Riyadh"), + ("Asia/Sakhalin", "Asia/Sakhalin"), + ("Asia/Samarkand", "Asia/Samarkand"), + ("Asia/Seoul", "Asia/Seoul"), + ("Asia/Shanghai", "Asia/Shanghai"), + ("Asia/Singapore", "Asia/Singapore"), + ("Asia/Srednekolymsk", "Asia/Srednekolymsk"), + ("Asia/Taipei", "Asia/Taipei"), + ("Asia/Tashkent", "Asia/Tashkent"), + ("Asia/Tbilisi", "Asia/Tbilisi"), + ("Asia/Tehran", "Asia/Tehran"), + ("Asia/Thimphu", "Asia/Thimphu"), + ("Asia/Tokyo", "Asia/Tokyo"), + ("Asia/Tomsk", "Asia/Tomsk"), + ("Asia/Ulaanbaatar", "Asia/Ulaanbaatar"), + ("Asia/Urumqi", "Asia/Urumqi"), + ("Asia/Ust-Nera", "Asia/Ust-Nera"), + ("Asia/Vientiane", "Asia/Vientiane"), + ("Asia/Vladivostok", "Asia/Vladivostok"), + ("Asia/Yakutsk", "Asia/Yakutsk"), + ("Asia/Yangon", "Asia/Yangon"), + ("Asia/Yekaterinburg", "Asia/Yekaterinburg"), + ("Asia/Yerevan", "Asia/Yerevan"), + ("Atlantic/Azores", "Atlantic/Azores"), + ("Atlantic/Bermuda", "Atlantic/Bermuda"), + ("Atlantic/Canary", "Atlantic/Canary"), + ("Atlantic/Cape_Verde", "Atlantic/Cape_Verde"), + ("Atlantic/Faroe", "Atlantic/Faroe"), + ("Atlantic/Madeira", "Atlantic/Madeira"), + ("Atlantic/Reykjavik", "Atlantic/Reykjavik"), + ("Atlantic/South_Georgia", "Atlantic/South_Georgia"), + ("Atlantic/St_Helena", "Atlantic/St_Helena"), + ("Atlantic/Stanley", "Atlantic/Stanley"), + ("Australia/Adelaide", "Australia/Adelaide"), + ("Australia/Brisbane", "Australia/Brisbane"), + ("Australia/Broken_Hill", "Australia/Broken_Hill"), + ("Australia/Currie", "Australia/Currie"), + ("Australia/Darwin", "Australia/Darwin"), + ("Australia/Eucla", "Australia/Eucla"), + ("Australia/Hobart", "Australia/Hobart"), + ("Australia/Lindeman", "Australia/Lindeman"), + ("Australia/Lord_Howe", "Australia/Lord_Howe"), + ("Australia/Melbourne", "Australia/Melbourne"), + ("Australia/Perth", "Australia/Perth"), + ("Australia/Sydney", "Australia/Sydney"), + ("Canada/Atlantic", "Canada/Atlantic"), + ("Canada/Central", "Canada/Central"), + ("Canada/Eastern", "Canada/Eastern"), + ("Canada/Mountain", "Canada/Mountain"), + ("Canada/Newfoundland", "Canada/Newfoundland"), + ("Canada/Pacific", "Canada/Pacific"), + ("Europe/Amsterdam", "Europe/Amsterdam"), + ("Europe/Andorra", "Europe/Andorra"), + ("Europe/Astrakhan", "Europe/Astrakhan"), + ("Europe/Athens", "Europe/Athens"), + ("Europe/Belgrade", "Europe/Belgrade"), + ("Europe/Berlin", "Europe/Berlin"), + ("Europe/Bratislava", "Europe/Bratislava"), + ("Europe/Brussels", "Europe/Brussels"), + ("Europe/Bucharest", "Europe/Bucharest"), + ("Europe/Budapest", "Europe/Budapest"), + ("Europe/Busingen", "Europe/Busingen"), + ("Europe/Chisinau", "Europe/Chisinau"), + ("Europe/Copenhagen", "Europe/Copenhagen"), + ("Europe/Dublin", "Europe/Dublin"), + ("Europe/Gibraltar", "Europe/Gibraltar"), + ("Europe/Guernsey", "Europe/Guernsey"), + ("Europe/Helsinki", "Europe/Helsinki"), + ("Europe/Isle_of_Man", "Europe/Isle_of_Man"), + ("Europe/Istanbul", "Europe/Istanbul"), + ("Europe/Jersey", "Europe/Jersey"), + ("Europe/Kaliningrad", "Europe/Kaliningrad"), + ("Europe/Kiev", "Europe/Kiev"), + ("Europe/Kirov", "Europe/Kirov"), + ("Europe/Lisbon", "Europe/Lisbon"), + ("Europe/Ljubljana", "Europe/Ljubljana"), + ("Europe/London", "Europe/London"), + ("Europe/Luxembourg", "Europe/Luxembourg"), + ("Europe/Madrid", "Europe/Madrid"), + ("Europe/Malta", "Europe/Malta"), + ("Europe/Mariehamn", "Europe/Mariehamn"), + ("Europe/Minsk", "Europe/Minsk"), + ("Europe/Monaco", "Europe/Monaco"), + ("Europe/Moscow", "Europe/Moscow"), + ("Europe/Oslo", "Europe/Oslo"), + ("Europe/Paris", "Europe/Paris"), + ("Europe/Podgorica", "Europe/Podgorica"), + ("Europe/Prague", "Europe/Prague"), + ("Europe/Riga", "Europe/Riga"), + ("Europe/Rome", "Europe/Rome"), + ("Europe/Samara", "Europe/Samara"), + ("Europe/San_Marino", "Europe/San_Marino"), + ("Europe/Sarajevo", "Europe/Sarajevo"), + ("Europe/Saratov", "Europe/Saratov"), + ("Europe/Simferopol", "Europe/Simferopol"), + ("Europe/Skopje", "Europe/Skopje"), + ("Europe/Sofia", "Europe/Sofia"), + ("Europe/Stockholm", "Europe/Stockholm"), + ("Europe/Tallinn", "Europe/Tallinn"), + ("Europe/Tirane", "Europe/Tirane"), + ("Europe/Ulyanovsk", "Europe/Ulyanovsk"), + ("Europe/Uzhgorod", "Europe/Uzhgorod"), + ("Europe/Vaduz", "Europe/Vaduz"), + ("Europe/Vatican", "Europe/Vatican"), + ("Europe/Vienna", "Europe/Vienna"), + ("Europe/Vilnius", "Europe/Vilnius"), + ("Europe/Volgograd", "Europe/Volgograd"), + ("Europe/Warsaw", "Europe/Warsaw"), + ("Europe/Zagreb", "Europe/Zagreb"), + ("Europe/Zaporozhye", "Europe/Zaporozhye"), + ("Europe/Zurich", "Europe/Zurich"), + ("GMT", "GMT"), + ("Indian/Antananarivo", "Indian/Antananarivo"), + ("Indian/Chagos", "Indian/Chagos"), + ("Indian/Christmas", "Indian/Christmas"), + ("Indian/Cocos", "Indian/Cocos"), + ("Indian/Comoro", "Indian/Comoro"), + ("Indian/Kerguelen", "Indian/Kerguelen"), + ("Indian/Mahe", "Indian/Mahe"), + ("Indian/Maldives", "Indian/Maldives"), + ("Indian/Mauritius", "Indian/Mauritius"), + ("Indian/Mayotte", "Indian/Mayotte"), + ("Indian/Reunion", "Indian/Reunion"), + ("Pacific/Apia", "Pacific/Apia"), + ("Pacific/Auckland", "Pacific/Auckland"), + ("Pacific/Bougainville", "Pacific/Bougainville"), + ("Pacific/Chatham", "Pacific/Chatham"), + ("Pacific/Chuuk", "Pacific/Chuuk"), + ("Pacific/Easter", "Pacific/Easter"), + ("Pacific/Efate", "Pacific/Efate"), + ("Pacific/Enderbury", "Pacific/Enderbury"), + ("Pacific/Fakaofo", "Pacific/Fakaofo"), + ("Pacific/Fiji", "Pacific/Fiji"), + ("Pacific/Funafuti", "Pacific/Funafuti"), + ("Pacific/Galapagos", "Pacific/Galapagos"), + ("Pacific/Gambier", "Pacific/Gambier"), + ("Pacific/Guadalcanal", "Pacific/Guadalcanal"), + ("Pacific/Guam", "Pacific/Guam"), + ("Pacific/Honolulu", "Pacific/Honolulu"), + ("Pacific/Kiritimati", "Pacific/Kiritimati"), + ("Pacific/Kosrae", "Pacific/Kosrae"), + ("Pacific/Kwajalein", "Pacific/Kwajalein"), + ("Pacific/Majuro", "Pacific/Majuro"), + ("Pacific/Marquesas", "Pacific/Marquesas"), + ("Pacific/Midway", "Pacific/Midway"), + ("Pacific/Nauru", "Pacific/Nauru"), + ("Pacific/Niue", "Pacific/Niue"), + ("Pacific/Norfolk", "Pacific/Norfolk"), + ("Pacific/Noumea", "Pacific/Noumea"), + ("Pacific/Pago_Pago", "Pacific/Pago_Pago"), + ("Pacific/Palau", "Pacific/Palau"), + ("Pacific/Pitcairn", "Pacific/Pitcairn"), + ("Pacific/Pohnpei", "Pacific/Pohnpei"), + ("Pacific/Port_Moresby", "Pacific/Port_Moresby"), + ("Pacific/Rarotonga", "Pacific/Rarotonga"), + ("Pacific/Saipan", "Pacific/Saipan"), + ("Pacific/Tahiti", "Pacific/Tahiti"), + ("Pacific/Tarawa", "Pacific/Tarawa"), + ("Pacific/Tongatapu", "Pacific/Tongatapu"), + ("Pacific/Wake", "Pacific/Wake"), + ("Pacific/Wallis", "Pacific/Wallis"), + ("US/Alaska", "US/Alaska"), + ("US/Arizona", "US/Arizona"), + ("US/Central", "US/Central"), + ("US/Eastern", "US/Eastern"), + ("US/Hawaii", "US/Hawaii"), + ("US/Mountain", "US/Mountain"), + ("US/Pacific", "US/Pacific"), + ("UTC", "UTC"), + ], + max_length=80, + null=True, + ), ), migrations.AddField( - model_name='theme', - name='prefix', - field=models.TextField(default='default', max_length=40, null=True), + model_name="theme", + name="prefix", + field=models.TextField(default="default", max_length=40, null=True), ), ] diff --git a/brutaldon/migrations/0010_auto_20180825_1009.py b/brutaldon/migrations/0010_auto_20180825_1009.py index 5a4c64c..8933c9d 100644 --- a/brutaldon/migrations/0010_auto_20180825_1009.py +++ b/brutaldon/migrations/0010_auto_20180825_1009.py @@ -5,54 +5,508 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0009_auto_20180824_2241'), - ] + dependencies = [("brutaldon", "0009_auto_20180824_2241")] operations = [ migrations.AlterField( - model_name='account', - name='access_token', + model_name="account", + name="access_token", field=models.CharField(blank=True, max_length=2048, null=True), ), migrations.AlterField( - model_name='client', - name='client_id', + model_name="client", + name="client_id", field=models.CharField(blank=True, max_length=2048, null=True), ), migrations.AlterField( - model_name='client', - name='client_secret', + model_name="client", + name="client_secret", field=models.CharField(blank=True, max_length=2048, null=True), ), migrations.AlterField( - model_name='client', - name='name', - field=models.CharField(default='brutaldon', max_length=80), + model_name="client", + name="name", + field=models.CharField(default="brutaldon", max_length=80), ), migrations.AlterField( - model_name='preference', - name='timezone', - field=models.CharField(blank=True, choices=[('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Godthab', 'America/Godthab'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/Kralendijk', 'America/Kralendijk'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Lower_Princes', 'America/Lower_Princes'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Marigot', 'America/Marigot'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Barthelemy', 'America/St_Barthelemy'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Arctic/Longyearbyen', 'Arctic/Longyearbyen'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Canada/Atlantic', 'Canada/Atlantic'), ('Canada/Central', 'Canada/Central'), ('Canada/Eastern', 'Canada/Eastern'), ('Canada/Mountain', 'Canada/Mountain'), ('Canada/Newfoundland', 'Canada/Newfoundland'), ('Canada/Pacific', 'Canada/Pacific'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Bratislava', 'Europe/Bratislava'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Busingen', 'Europe/Busingen'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Guernsey', 'Europe/Guernsey'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Isle_of_Man', 'Europe/Isle_of_Man'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Jersey', 'Europe/Jersey'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/Ljubljana', 'Europe/Ljubljana'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Mariehamn', 'Europe/Mariehamn'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Podgorica', 'Europe/Podgorica'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/San_Marino', 'Europe/San_Marino'), ('Europe/Sarajevo', 'Europe/Sarajevo'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Skopje', 'Europe/Skopje'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vatican', 'Europe/Vatican'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zagreb', 'Europe/Zagreb'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('US/Alaska', 'US/Alaska'), ('US/Arizona', 'US/Arizona'), ('US/Central', 'US/Central'), ('US/Eastern', 'US/Eastern'), ('US/Hawaii', 'US/Hawaii'), ('US/Mountain', 'US/Mountain'), ('US/Pacific', 'US/Pacific'), ('UTC', 'UTC')], max_length=80, null=True), + model_name="preference", + name="timezone", + field=models.CharField( + blank=True, + choices=[ + ("Africa/Abidjan", "Africa/Abidjan"), + ("Africa/Accra", "Africa/Accra"), + ("Africa/Addis_Ababa", "Africa/Addis_Ababa"), + ("Africa/Algiers", "Africa/Algiers"), + ("Africa/Asmara", "Africa/Asmara"), + ("Africa/Bamako", "Africa/Bamako"), + ("Africa/Bangui", "Africa/Bangui"), + ("Africa/Banjul", "Africa/Banjul"), + ("Africa/Bissau", "Africa/Bissau"), + ("Africa/Blantyre", "Africa/Blantyre"), + ("Africa/Brazzaville", "Africa/Brazzaville"), + ("Africa/Bujumbura", "Africa/Bujumbura"), + ("Africa/Cairo", "Africa/Cairo"), + ("Africa/Casablanca", "Africa/Casablanca"), + ("Africa/Ceuta", "Africa/Ceuta"), + ("Africa/Conakry", "Africa/Conakry"), + ("Africa/Dakar", "Africa/Dakar"), + ("Africa/Dar_es_Salaam", "Africa/Dar_es_Salaam"), + ("Africa/Djibouti", "Africa/Djibouti"), + ("Africa/Douala", "Africa/Douala"), + ("Africa/El_Aaiun", "Africa/El_Aaiun"), + ("Africa/Freetown", "Africa/Freetown"), + ("Africa/Gaborone", "Africa/Gaborone"), + ("Africa/Harare", "Africa/Harare"), + ("Africa/Johannesburg", "Africa/Johannesburg"), + ("Africa/Juba", "Africa/Juba"), + ("Africa/Kampala", "Africa/Kampala"), + ("Africa/Khartoum", "Africa/Khartoum"), + ("Africa/Kigali", "Africa/Kigali"), + ("Africa/Kinshasa", "Africa/Kinshasa"), + ("Africa/Lagos", "Africa/Lagos"), + ("Africa/Libreville", "Africa/Libreville"), + ("Africa/Lome", "Africa/Lome"), + ("Africa/Luanda", "Africa/Luanda"), + ("Africa/Lubumbashi", "Africa/Lubumbashi"), + ("Africa/Lusaka", "Africa/Lusaka"), + ("Africa/Malabo", "Africa/Malabo"), + ("Africa/Maputo", "Africa/Maputo"), + ("Africa/Maseru", "Africa/Maseru"), + ("Africa/Mbabane", "Africa/Mbabane"), + ("Africa/Mogadishu", "Africa/Mogadishu"), + ("Africa/Monrovia", "Africa/Monrovia"), + ("Africa/Nairobi", "Africa/Nairobi"), + ("Africa/Ndjamena", "Africa/Ndjamena"), + ("Africa/Niamey", "Africa/Niamey"), + ("Africa/Nouakchott", "Africa/Nouakchott"), + ("Africa/Ouagadougou", "Africa/Ouagadougou"), + ("Africa/Porto-Novo", "Africa/Porto-Novo"), + ("Africa/Sao_Tome", "Africa/Sao_Tome"), + ("Africa/Tripoli", "Africa/Tripoli"), + ("Africa/Tunis", "Africa/Tunis"), + ("Africa/Windhoek", "Africa/Windhoek"), + ("America/Adak", "America/Adak"), + ("America/Anchorage", "America/Anchorage"), + ("America/Anguilla", "America/Anguilla"), + ("America/Antigua", "America/Antigua"), + ("America/Araguaina", "America/Araguaina"), + ( + "America/Argentina/Buenos_Aires", + "America/Argentina/Buenos_Aires", + ), + ("America/Argentina/Catamarca", "America/Argentina/Catamarca"), + ("America/Argentina/Cordoba", "America/Argentina/Cordoba"), + ("America/Argentina/Jujuy", "America/Argentina/Jujuy"), + ("America/Argentina/La_Rioja", "America/Argentina/La_Rioja"), + ("America/Argentina/Mendoza", "America/Argentina/Mendoza"), + ( + "America/Argentina/Rio_Gallegos", + "America/Argentina/Rio_Gallegos", + ), + ("America/Argentina/Salta", "America/Argentina/Salta"), + ("America/Argentina/San_Juan", "America/Argentina/San_Juan"), + ("America/Argentina/San_Luis", "America/Argentina/San_Luis"), + ("America/Argentina/Tucuman", "America/Argentina/Tucuman"), + ("America/Argentina/Ushuaia", "America/Argentina/Ushuaia"), + ("America/Aruba", "America/Aruba"), + ("America/Asuncion", "America/Asuncion"), + ("America/Atikokan", "America/Atikokan"), + ("America/Bahia", "America/Bahia"), + ("America/Bahia_Banderas", "America/Bahia_Banderas"), + ("America/Barbados", "America/Barbados"), + ("America/Belem", "America/Belem"), + ("America/Belize", "America/Belize"), + ("America/Blanc-Sablon", "America/Blanc-Sablon"), + ("America/Boa_Vista", "America/Boa_Vista"), + ("America/Bogota", "America/Bogota"), + ("America/Boise", "America/Boise"), + ("America/Cambridge_Bay", "America/Cambridge_Bay"), + ("America/Campo_Grande", "America/Campo_Grande"), + ("America/Cancun", "America/Cancun"), + ("America/Caracas", "America/Caracas"), + ("America/Cayenne", "America/Cayenne"), + ("America/Cayman", "America/Cayman"), + ("America/Chicago", "America/Chicago"), + ("America/Chihuahua", "America/Chihuahua"), + ("America/Costa_Rica", "America/Costa_Rica"), + ("America/Creston", "America/Creston"), + ("America/Cuiaba", "America/Cuiaba"), + ("America/Curacao", "America/Curacao"), + ("America/Danmarkshavn", "America/Danmarkshavn"), + ("America/Dawson", "America/Dawson"), + ("America/Dawson_Creek", "America/Dawson_Creek"), + ("America/Denver", "America/Denver"), + ("America/Detroit", "America/Detroit"), + ("America/Dominica", "America/Dominica"), + ("America/Edmonton", "America/Edmonton"), + ("America/Eirunepe", "America/Eirunepe"), + ("America/El_Salvador", "America/El_Salvador"), + ("America/Fort_Nelson", "America/Fort_Nelson"), + ("America/Fortaleza", "America/Fortaleza"), + ("America/Glace_Bay", "America/Glace_Bay"), + ("America/Godthab", "America/Godthab"), + ("America/Goose_Bay", "America/Goose_Bay"), + ("America/Grand_Turk", "America/Grand_Turk"), + ("America/Grenada", "America/Grenada"), + ("America/Guadeloupe", "America/Guadeloupe"), + ("America/Guatemala", "America/Guatemala"), + ("America/Guayaquil", "America/Guayaquil"), + ("America/Guyana", "America/Guyana"), + ("America/Halifax", "America/Halifax"), + ("America/Havana", "America/Havana"), + ("America/Hermosillo", "America/Hermosillo"), + ("America/Indiana/Indianapolis", "America/Indiana/Indianapolis"), + ("America/Indiana/Knox", "America/Indiana/Knox"), + ("America/Indiana/Marengo", "America/Indiana/Marengo"), + ("America/Indiana/Petersburg", "America/Indiana/Petersburg"), + ("America/Indiana/Tell_City", "America/Indiana/Tell_City"), + ("America/Indiana/Vevay", "America/Indiana/Vevay"), + ("America/Indiana/Vincennes", "America/Indiana/Vincennes"), + ("America/Indiana/Winamac", "America/Indiana/Winamac"), + ("America/Inuvik", "America/Inuvik"), + ("America/Iqaluit", "America/Iqaluit"), + ("America/Jamaica", "America/Jamaica"), + ("America/Juneau", "America/Juneau"), + ("America/Kentucky/Louisville", "America/Kentucky/Louisville"), + ("America/Kentucky/Monticello", "America/Kentucky/Monticello"), + ("America/Kralendijk", "America/Kralendijk"), + ("America/La_Paz", "America/La_Paz"), + ("America/Lima", "America/Lima"), + ("America/Los_Angeles", "America/Los_Angeles"), + ("America/Lower_Princes", "America/Lower_Princes"), + ("America/Maceio", "America/Maceio"), + ("America/Managua", "America/Managua"), + ("America/Manaus", "America/Manaus"), + ("America/Marigot", "America/Marigot"), + ("America/Martinique", "America/Martinique"), + ("America/Matamoros", "America/Matamoros"), + ("America/Mazatlan", "America/Mazatlan"), + ("America/Menominee", "America/Menominee"), + ("America/Merida", "America/Merida"), + ("America/Metlakatla", "America/Metlakatla"), + ("America/Mexico_City", "America/Mexico_City"), + ("America/Miquelon", "America/Miquelon"), + ("America/Moncton", "America/Moncton"), + ("America/Monterrey", "America/Monterrey"), + ("America/Montevideo", "America/Montevideo"), + ("America/Montserrat", "America/Montserrat"), + ("America/Nassau", "America/Nassau"), + ("America/New_York", "America/New_York"), + ("America/Nipigon", "America/Nipigon"), + ("America/Nome", "America/Nome"), + ("America/Noronha", "America/Noronha"), + ("America/North_Dakota/Beulah", "America/North_Dakota/Beulah"), + ("America/North_Dakota/Center", "America/North_Dakota/Center"), + ( + "America/North_Dakota/New_Salem", + "America/North_Dakota/New_Salem", + ), + ("America/Ojinaga", "America/Ojinaga"), + ("America/Panama", "America/Panama"), + ("America/Pangnirtung", "America/Pangnirtung"), + ("America/Paramaribo", "America/Paramaribo"), + ("America/Phoenix", "America/Phoenix"), + ("America/Port-au-Prince", "America/Port-au-Prince"), + ("America/Port_of_Spain", "America/Port_of_Spain"), + ("America/Porto_Velho", "America/Porto_Velho"), + ("America/Puerto_Rico", "America/Puerto_Rico"), + ("America/Punta_Arenas", "America/Punta_Arenas"), + ("America/Rainy_River", "America/Rainy_River"), + ("America/Rankin_Inlet", "America/Rankin_Inlet"), + ("America/Recife", "America/Recife"), + ("America/Regina", "America/Regina"), + ("America/Resolute", "America/Resolute"), + ("America/Rio_Branco", "America/Rio_Branco"), + ("America/Santarem", "America/Santarem"), + ("America/Santiago", "America/Santiago"), + ("America/Santo_Domingo", "America/Santo_Domingo"), + ("America/Sao_Paulo", "America/Sao_Paulo"), + ("America/Scoresbysund", "America/Scoresbysund"), + ("America/Sitka", "America/Sitka"), + ("America/St_Barthelemy", "America/St_Barthelemy"), + ("America/St_Johns", "America/St_Johns"), + ("America/St_Kitts", "America/St_Kitts"), + ("America/St_Lucia", "America/St_Lucia"), + ("America/St_Thomas", "America/St_Thomas"), + ("America/St_Vincent", "America/St_Vincent"), + ("America/Swift_Current", "America/Swift_Current"), + ("America/Tegucigalpa", "America/Tegucigalpa"), + ("America/Thule", "America/Thule"), + ("America/Thunder_Bay", "America/Thunder_Bay"), + ("America/Tijuana", "America/Tijuana"), + ("America/Toronto", "America/Toronto"), + ("America/Tortola", "America/Tortola"), + ("America/Vancouver", "America/Vancouver"), + ("America/Whitehorse", "America/Whitehorse"), + ("America/Winnipeg", "America/Winnipeg"), + ("America/Yakutat", "America/Yakutat"), + ("America/Yellowknife", "America/Yellowknife"), + ("Antarctica/Casey", "Antarctica/Casey"), + ("Antarctica/Davis", "Antarctica/Davis"), + ("Antarctica/DumontDUrville", "Antarctica/DumontDUrville"), + ("Antarctica/Macquarie", "Antarctica/Macquarie"), + ("Antarctica/Mawson", "Antarctica/Mawson"), + ("Antarctica/McMurdo", "Antarctica/McMurdo"), + ("Antarctica/Palmer", "Antarctica/Palmer"), + ("Antarctica/Rothera", "Antarctica/Rothera"), + ("Antarctica/Syowa", "Antarctica/Syowa"), + ("Antarctica/Troll", "Antarctica/Troll"), + ("Antarctica/Vostok", "Antarctica/Vostok"), + ("Arctic/Longyearbyen", "Arctic/Longyearbyen"), + ("Asia/Aden", "Asia/Aden"), + ("Asia/Almaty", "Asia/Almaty"), + ("Asia/Amman", "Asia/Amman"), + ("Asia/Anadyr", "Asia/Anadyr"), + ("Asia/Aqtau", "Asia/Aqtau"), + ("Asia/Aqtobe", "Asia/Aqtobe"), + ("Asia/Ashgabat", "Asia/Ashgabat"), + ("Asia/Atyrau", "Asia/Atyrau"), + ("Asia/Baghdad", "Asia/Baghdad"), + ("Asia/Bahrain", "Asia/Bahrain"), + ("Asia/Baku", "Asia/Baku"), + ("Asia/Bangkok", "Asia/Bangkok"), + ("Asia/Barnaul", "Asia/Barnaul"), + ("Asia/Beirut", "Asia/Beirut"), + ("Asia/Bishkek", "Asia/Bishkek"), + ("Asia/Brunei", "Asia/Brunei"), + ("Asia/Chita", "Asia/Chita"), + ("Asia/Choibalsan", "Asia/Choibalsan"), + ("Asia/Colombo", "Asia/Colombo"), + ("Asia/Damascus", "Asia/Damascus"), + ("Asia/Dhaka", "Asia/Dhaka"), + ("Asia/Dili", "Asia/Dili"), + ("Asia/Dubai", "Asia/Dubai"), + ("Asia/Dushanbe", "Asia/Dushanbe"), + ("Asia/Famagusta", "Asia/Famagusta"), + ("Asia/Gaza", "Asia/Gaza"), + ("Asia/Hebron", "Asia/Hebron"), + ("Asia/Ho_Chi_Minh", "Asia/Ho_Chi_Minh"), + ("Asia/Hong_Kong", "Asia/Hong_Kong"), + ("Asia/Hovd", "Asia/Hovd"), + ("Asia/Irkutsk", "Asia/Irkutsk"), + ("Asia/Jakarta", "Asia/Jakarta"), + ("Asia/Jayapura", "Asia/Jayapura"), + ("Asia/Jerusalem", "Asia/Jerusalem"), + ("Asia/Kabul", "Asia/Kabul"), + ("Asia/Kamchatka", "Asia/Kamchatka"), + ("Asia/Karachi", "Asia/Karachi"), + ("Asia/Kathmandu", "Asia/Kathmandu"), + ("Asia/Khandyga", "Asia/Khandyga"), + ("Asia/Kolkata", "Asia/Kolkata"), + ("Asia/Krasnoyarsk", "Asia/Krasnoyarsk"), + ("Asia/Kuala_Lumpur", "Asia/Kuala_Lumpur"), + ("Asia/Kuching", "Asia/Kuching"), + ("Asia/Kuwait", "Asia/Kuwait"), + ("Asia/Macau", "Asia/Macau"), + ("Asia/Magadan", "Asia/Magadan"), + ("Asia/Makassar", "Asia/Makassar"), + ("Asia/Manila", "Asia/Manila"), + ("Asia/Muscat", "Asia/Muscat"), + ("Asia/Nicosia", "Asia/Nicosia"), + ("Asia/Novokuznetsk", "Asia/Novokuznetsk"), + ("Asia/Novosibirsk", "Asia/Novosibirsk"), + ("Asia/Omsk", "Asia/Omsk"), + ("Asia/Oral", "Asia/Oral"), + ("Asia/Phnom_Penh", "Asia/Phnom_Penh"), + ("Asia/Pontianak", "Asia/Pontianak"), + ("Asia/Pyongyang", "Asia/Pyongyang"), + ("Asia/Qatar", "Asia/Qatar"), + ("Asia/Qyzylorda", "Asia/Qyzylorda"), + ("Asia/Riyadh", "Asia/Riyadh"), + ("Asia/Sakhalin", "Asia/Sakhalin"), + ("Asia/Samarkand", "Asia/Samarkand"), + ("Asia/Seoul", "Asia/Seoul"), + ("Asia/Shanghai", "Asia/Shanghai"), + ("Asia/Singapore", "Asia/Singapore"), + ("Asia/Srednekolymsk", "Asia/Srednekolymsk"), + ("Asia/Taipei", "Asia/Taipei"), + ("Asia/Tashkent", "Asia/Tashkent"), + ("Asia/Tbilisi", "Asia/Tbilisi"), + ("Asia/Tehran", "Asia/Tehran"), + ("Asia/Thimphu", "Asia/Thimphu"), + ("Asia/Tokyo", "Asia/Tokyo"), + ("Asia/Tomsk", "Asia/Tomsk"), + ("Asia/Ulaanbaatar", "Asia/Ulaanbaatar"), + ("Asia/Urumqi", "Asia/Urumqi"), + ("Asia/Ust-Nera", "Asia/Ust-Nera"), + ("Asia/Vientiane", "Asia/Vientiane"), + ("Asia/Vladivostok", "Asia/Vladivostok"), + ("Asia/Yakutsk", "Asia/Yakutsk"), + ("Asia/Yangon", "Asia/Yangon"), + ("Asia/Yekaterinburg", "Asia/Yekaterinburg"), + ("Asia/Yerevan", "Asia/Yerevan"), + ("Atlantic/Azores", "Atlantic/Azores"), + ("Atlantic/Bermuda", "Atlantic/Bermuda"), + ("Atlantic/Canary", "Atlantic/Canary"), + ("Atlantic/Cape_Verde", "Atlantic/Cape_Verde"), + ("Atlantic/Faroe", "Atlantic/Faroe"), + ("Atlantic/Madeira", "Atlantic/Madeira"), + ("Atlantic/Reykjavik", "Atlantic/Reykjavik"), + ("Atlantic/South_Georgia", "Atlantic/South_Georgia"), + ("Atlantic/St_Helena", "Atlantic/St_Helena"), + ("Atlantic/Stanley", "Atlantic/Stanley"), + ("Australia/Adelaide", "Australia/Adelaide"), + ("Australia/Brisbane", "Australia/Brisbane"), + ("Australia/Broken_Hill", "Australia/Broken_Hill"), + ("Australia/Currie", "Australia/Currie"), + ("Australia/Darwin", "Australia/Darwin"), + ("Australia/Eucla", "Australia/Eucla"), + ("Australia/Hobart", "Australia/Hobart"), + ("Australia/Lindeman", "Australia/Lindeman"), + ("Australia/Lord_Howe", "Australia/Lord_Howe"), + ("Australia/Melbourne", "Australia/Melbourne"), + ("Australia/Perth", "Australia/Perth"), + ("Australia/Sydney", "Australia/Sydney"), + ("Canada/Atlantic", "Canada/Atlantic"), + ("Canada/Central", "Canada/Central"), + ("Canada/Eastern", "Canada/Eastern"), + ("Canada/Mountain", "Canada/Mountain"), + ("Canada/Newfoundland", "Canada/Newfoundland"), + ("Canada/Pacific", "Canada/Pacific"), + ("Europe/Amsterdam", "Europe/Amsterdam"), + ("Europe/Andorra", "Europe/Andorra"), + ("Europe/Astrakhan", "Europe/Astrakhan"), + ("Europe/Athens", "Europe/Athens"), + ("Europe/Belgrade", "Europe/Belgrade"), + ("Europe/Berlin", "Europe/Berlin"), + ("Europe/Bratislava", "Europe/Bratislava"), + ("Europe/Brussels", "Europe/Brussels"), + ("Europe/Bucharest", "Europe/Bucharest"), + ("Europe/Budapest", "Europe/Budapest"), + ("Europe/Busingen", "Europe/Busingen"), + ("Europe/Chisinau", "Europe/Chisinau"), + ("Europe/Copenhagen", "Europe/Copenhagen"), + ("Europe/Dublin", "Europe/Dublin"), + ("Europe/Gibraltar", "Europe/Gibraltar"), + ("Europe/Guernsey", "Europe/Guernsey"), + ("Europe/Helsinki", "Europe/Helsinki"), + ("Europe/Isle_of_Man", "Europe/Isle_of_Man"), + ("Europe/Istanbul", "Europe/Istanbul"), + ("Europe/Jersey", "Europe/Jersey"), + ("Europe/Kaliningrad", "Europe/Kaliningrad"), + ("Europe/Kiev", "Europe/Kiev"), + ("Europe/Kirov", "Europe/Kirov"), + ("Europe/Lisbon", "Europe/Lisbon"), + ("Europe/Ljubljana", "Europe/Ljubljana"), + ("Europe/London", "Europe/London"), + ("Europe/Luxembourg", "Europe/Luxembourg"), + ("Europe/Madrid", "Europe/Madrid"), + ("Europe/Malta", "Europe/Malta"), + ("Europe/Mariehamn", "Europe/Mariehamn"), + ("Europe/Minsk", "Europe/Minsk"), + ("Europe/Monaco", "Europe/Monaco"), + ("Europe/Moscow", "Europe/Moscow"), + ("Europe/Oslo", "Europe/Oslo"), + ("Europe/Paris", "Europe/Paris"), + ("Europe/Podgorica", "Europe/Podgorica"), + ("Europe/Prague", "Europe/Prague"), + ("Europe/Riga", "Europe/Riga"), + ("Europe/Rome", "Europe/Rome"), + ("Europe/Samara", "Europe/Samara"), + ("Europe/San_Marino", "Europe/San_Marino"), + ("Europe/Sarajevo", "Europe/Sarajevo"), + ("Europe/Saratov", "Europe/Saratov"), + ("Europe/Simferopol", "Europe/Simferopol"), + ("Europe/Skopje", "Europe/Skopje"), + ("Europe/Sofia", "Europe/Sofia"), + ("Europe/Stockholm", "Europe/Stockholm"), + ("Europe/Tallinn", "Europe/Tallinn"), + ("Europe/Tirane", "Europe/Tirane"), + ("Europe/Ulyanovsk", "Europe/Ulyanovsk"), + ("Europe/Uzhgorod", "Europe/Uzhgorod"), + ("Europe/Vaduz", "Europe/Vaduz"), + ("Europe/Vatican", "Europe/Vatican"), + ("Europe/Vienna", "Europe/Vienna"), + ("Europe/Vilnius", "Europe/Vilnius"), + ("Europe/Volgograd", "Europe/Volgograd"), + ("Europe/Warsaw", "Europe/Warsaw"), + ("Europe/Zagreb", "Europe/Zagreb"), + ("Europe/Zaporozhye", "Europe/Zaporozhye"), + ("Europe/Zurich", "Europe/Zurich"), + ("GMT", "GMT"), + ("Indian/Antananarivo", "Indian/Antananarivo"), + ("Indian/Chagos", "Indian/Chagos"), + ("Indian/Christmas", "Indian/Christmas"), + ("Indian/Cocos", "Indian/Cocos"), + ("Indian/Comoro", "Indian/Comoro"), + ("Indian/Kerguelen", "Indian/Kerguelen"), + ("Indian/Mahe", "Indian/Mahe"), + ("Indian/Maldives", "Indian/Maldives"), + ("Indian/Mauritius", "Indian/Mauritius"), + ("Indian/Mayotte", "Indian/Mayotte"), + ("Indian/Reunion", "Indian/Reunion"), + ("Pacific/Apia", "Pacific/Apia"), + ("Pacific/Auckland", "Pacific/Auckland"), + ("Pacific/Bougainville", "Pacific/Bougainville"), + ("Pacific/Chatham", "Pacific/Chatham"), + ("Pacific/Chuuk", "Pacific/Chuuk"), + ("Pacific/Easter", "Pacific/Easter"), + ("Pacific/Efate", "Pacific/Efate"), + ("Pacific/Enderbury", "Pacific/Enderbury"), + ("Pacific/Fakaofo", "Pacific/Fakaofo"), + ("Pacific/Fiji", "Pacific/Fiji"), + ("Pacific/Funafuti", "Pacific/Funafuti"), + ("Pacific/Galapagos", "Pacific/Galapagos"), + ("Pacific/Gambier", "Pacific/Gambier"), + ("Pacific/Guadalcanal", "Pacific/Guadalcanal"), + ("Pacific/Guam", "Pacific/Guam"), + ("Pacific/Honolulu", "Pacific/Honolulu"), + ("Pacific/Kiritimati", "Pacific/Kiritimati"), + ("Pacific/Kosrae", "Pacific/Kosrae"), + ("Pacific/Kwajalein", "Pacific/Kwajalein"), + ("Pacific/Majuro", "Pacific/Majuro"), + ("Pacific/Marquesas", "Pacific/Marquesas"), + ("Pacific/Midway", "Pacific/Midway"), + ("Pacific/Nauru", "Pacific/Nauru"), + ("Pacific/Niue", "Pacific/Niue"), + ("Pacific/Norfolk", "Pacific/Norfolk"), + ("Pacific/Noumea", "Pacific/Noumea"), + ("Pacific/Pago_Pago", "Pacific/Pago_Pago"), + ("Pacific/Palau", "Pacific/Palau"), + ("Pacific/Pitcairn", "Pacific/Pitcairn"), + ("Pacific/Pohnpei", "Pacific/Pohnpei"), + ("Pacific/Port_Moresby", "Pacific/Port_Moresby"), + ("Pacific/Rarotonga", "Pacific/Rarotonga"), + ("Pacific/Saipan", "Pacific/Saipan"), + ("Pacific/Tahiti", "Pacific/Tahiti"), + ("Pacific/Tarawa", "Pacific/Tarawa"), + ("Pacific/Tongatapu", "Pacific/Tongatapu"), + ("Pacific/Wake", "Pacific/Wake"), + ("Pacific/Wallis", "Pacific/Wallis"), + ("US/Alaska", "US/Alaska"), + ("US/Arizona", "US/Arizona"), + ("US/Central", "US/Central"), + ("US/Eastern", "US/Eastern"), + ("US/Hawaii", "US/Hawaii"), + ("US/Mountain", "US/Mountain"), + ("US/Pacific", "US/Pacific"), + ("UTC", "UTC"), + ], + max_length=80, + null=True, + ), ), migrations.AlterField( - model_name='theme', - name='main_css', - field=models.CharField(blank=True, default='css/fullbrutalism.css', max_length=1024, null=True), + model_name="theme", + name="main_css", + field=models.CharField( + blank=True, default="css/fullbrutalism.css", max_length=1024, null=True + ), ), migrations.AlterField( - model_name='theme', - name='name', + model_name="theme", + name="name", field=models.CharField(max_length=80, unique=True), ), migrations.AlterField( - model_name='theme', - name='prefix', - field=models.CharField(default='default', max_length=40, null=True), + model_name="theme", + name="prefix", + field=models.CharField(default="default", max_length=40, null=True), ), migrations.AlterField( - model_name='theme', - name='tweaks_css', + model_name="theme", + name="tweaks_css", field=models.CharField(blank=True, max_length=1024, null=True), ), ] diff --git a/brutaldon/migrations/0011_auto_20180825_1017.py b/brutaldon/migrations/0011_auto_20180825_1017.py index cc3664f..669ad27 100644 --- a/brutaldon/migrations/0011_auto_20180825_1017.py +++ b/brutaldon/migrations/0011_auto_20180825_1017.py @@ -5,14 +5,467 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0010_auto_20180825_1009'), - ] + dependencies = [("brutaldon", "0010_auto_20180825_1009")] operations = [ migrations.AlterField( - model_name='preference', - name='timezone', - field=models.CharField(blank=True, choices=[('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Godthab', 'America/Godthab'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/Kralendijk', 'America/Kralendijk'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Lower_Princes', 'America/Lower_Princes'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Marigot', 'America/Marigot'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Barthelemy', 'America/St_Barthelemy'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Arctic/Longyearbyen', 'Arctic/Longyearbyen'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Canada/Atlantic', 'Canada/Atlantic'), ('Canada/Central', 'Canada/Central'), ('Canada/Eastern', 'Canada/Eastern'), ('Canada/Mountain', 'Canada/Mountain'), ('Canada/Newfoundland', 'Canada/Newfoundland'), ('Canada/Pacific', 'Canada/Pacific'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Bratislava', 'Europe/Bratislava'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Busingen', 'Europe/Busingen'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Guernsey', 'Europe/Guernsey'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Isle_of_Man', 'Europe/Isle_of_Man'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Jersey', 'Europe/Jersey'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/Ljubljana', 'Europe/Ljubljana'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Mariehamn', 'Europe/Mariehamn'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Podgorica', 'Europe/Podgorica'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/San_Marino', 'Europe/San_Marino'), ('Europe/Sarajevo', 'Europe/Sarajevo'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Skopje', 'Europe/Skopje'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vatican', 'Europe/Vatican'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zagreb', 'Europe/Zagreb'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('US/Alaska', 'US/Alaska'), ('US/Arizona', 'US/Arizona'), ('US/Central', 'US/Central'), ('US/Eastern', 'US/Eastern'), ('US/Hawaii', 'US/Hawaii'), ('US/Mountain', 'US/Mountain'), ('US/Pacific', 'US/Pacific'), ('UTC', 'UTC')], default='UTC', max_length=80, null=True), - ), + model_name="preference", + name="timezone", + field=models.CharField( + blank=True, + choices=[ + ("Africa/Abidjan", "Africa/Abidjan"), + ("Africa/Accra", "Africa/Accra"), + ("Africa/Addis_Ababa", "Africa/Addis_Ababa"), + ("Africa/Algiers", "Africa/Algiers"), + ("Africa/Asmara", "Africa/Asmara"), + ("Africa/Bamako", "Africa/Bamako"), + ("Africa/Bangui", "Africa/Bangui"), + ("Africa/Banjul", "Africa/Banjul"), + ("Africa/Bissau", "Africa/Bissau"), + ("Africa/Blantyre", "Africa/Blantyre"), + ("Africa/Brazzaville", "Africa/Brazzaville"), + ("Africa/Bujumbura", "Africa/Bujumbura"), + ("Africa/Cairo", "Africa/Cairo"), + ("Africa/Casablanca", "Africa/Casablanca"), + ("Africa/Ceuta", "Africa/Ceuta"), + ("Africa/Conakry", "Africa/Conakry"), + ("Africa/Dakar", "Africa/Dakar"), + ("Africa/Dar_es_Salaam", "Africa/Dar_es_Salaam"), + ("Africa/Djibouti", "Africa/Djibouti"), + ("Africa/Douala", "Africa/Douala"), + ("Africa/El_Aaiun", "Africa/El_Aaiun"), + ("Africa/Freetown", "Africa/Freetown"), + ("Africa/Gaborone", "Africa/Gaborone"), + ("Africa/Harare", "Africa/Harare"), + ("Africa/Johannesburg", "Africa/Johannesburg"), + ("Africa/Juba", "Africa/Juba"), + ("Africa/Kampala", "Africa/Kampala"), + ("Africa/Khartoum", "Africa/Khartoum"), + ("Africa/Kigali", "Africa/Kigali"), + ("Africa/Kinshasa", "Africa/Kinshasa"), + ("Africa/Lagos", "Africa/Lagos"), + ("Africa/Libreville", "Africa/Libreville"), + ("Africa/Lome", "Africa/Lome"), + ("Africa/Luanda", "Africa/Luanda"), + ("Africa/Lubumbashi", "Africa/Lubumbashi"), + ("Africa/Lusaka", "Africa/Lusaka"), + ("Africa/Malabo", "Africa/Malabo"), + ("Africa/Maputo", "Africa/Maputo"), + ("Africa/Maseru", "Africa/Maseru"), + ("Africa/Mbabane", "Africa/Mbabane"), + ("Africa/Mogadishu", "Africa/Mogadishu"), + ("Africa/Monrovia", "Africa/Monrovia"), + ("Africa/Nairobi", "Africa/Nairobi"), + ("Africa/Ndjamena", "Africa/Ndjamena"), + ("Africa/Niamey", "Africa/Niamey"), + ("Africa/Nouakchott", "Africa/Nouakchott"), + ("Africa/Ouagadougou", "Africa/Ouagadougou"), + ("Africa/Porto-Novo", "Africa/Porto-Novo"), + ("Africa/Sao_Tome", "Africa/Sao_Tome"), + ("Africa/Tripoli", "Africa/Tripoli"), + ("Africa/Tunis", "Africa/Tunis"), + ("Africa/Windhoek", "Africa/Windhoek"), + ("America/Adak", "America/Adak"), + ("America/Anchorage", "America/Anchorage"), + ("America/Anguilla", "America/Anguilla"), + ("America/Antigua", "America/Antigua"), + ("America/Araguaina", "America/Araguaina"), + ( + "America/Argentina/Buenos_Aires", + "America/Argentina/Buenos_Aires", + ), + ("America/Argentina/Catamarca", "America/Argentina/Catamarca"), + ("America/Argentina/Cordoba", "America/Argentina/Cordoba"), + ("America/Argentina/Jujuy", "America/Argentina/Jujuy"), + ("America/Argentina/La_Rioja", "America/Argentina/La_Rioja"), + ("America/Argentina/Mendoza", "America/Argentina/Mendoza"), + ( + "America/Argentina/Rio_Gallegos", + "America/Argentina/Rio_Gallegos", + ), + ("America/Argentina/Salta", "America/Argentina/Salta"), + ("America/Argentina/San_Juan", "America/Argentina/San_Juan"), + ("America/Argentina/San_Luis", "America/Argentina/San_Luis"), + ("America/Argentina/Tucuman", "America/Argentina/Tucuman"), + ("America/Argentina/Ushuaia", "America/Argentina/Ushuaia"), + ("America/Aruba", "America/Aruba"), + ("America/Asuncion", "America/Asuncion"), + ("America/Atikokan", "America/Atikokan"), + ("America/Bahia", "America/Bahia"), + ("America/Bahia_Banderas", "America/Bahia_Banderas"), + ("America/Barbados", "America/Barbados"), + ("America/Belem", "America/Belem"), + ("America/Belize", "America/Belize"), + ("America/Blanc-Sablon", "America/Blanc-Sablon"), + ("America/Boa_Vista", "America/Boa_Vista"), + ("America/Bogota", "America/Bogota"), + ("America/Boise", "America/Boise"), + ("America/Cambridge_Bay", "America/Cambridge_Bay"), + ("America/Campo_Grande", "America/Campo_Grande"), + ("America/Cancun", "America/Cancun"), + ("America/Caracas", "America/Caracas"), + ("America/Cayenne", "America/Cayenne"), + ("America/Cayman", "America/Cayman"), + ("America/Chicago", "America/Chicago"), + ("America/Chihuahua", "America/Chihuahua"), + ("America/Costa_Rica", "America/Costa_Rica"), + ("America/Creston", "America/Creston"), + ("America/Cuiaba", "America/Cuiaba"), + ("America/Curacao", "America/Curacao"), + ("America/Danmarkshavn", "America/Danmarkshavn"), + ("America/Dawson", "America/Dawson"), + ("America/Dawson_Creek", "America/Dawson_Creek"), + ("America/Denver", "America/Denver"), + ("America/Detroit", "America/Detroit"), + ("America/Dominica", "America/Dominica"), + ("America/Edmonton", "America/Edmonton"), + ("America/Eirunepe", "America/Eirunepe"), + ("America/El_Salvador", "America/El_Salvador"), + ("America/Fort_Nelson", "America/Fort_Nelson"), + ("America/Fortaleza", "America/Fortaleza"), + ("America/Glace_Bay", "America/Glace_Bay"), + ("America/Godthab", "America/Godthab"), + ("America/Goose_Bay", "America/Goose_Bay"), + ("America/Grand_Turk", "America/Grand_Turk"), + ("America/Grenada", "America/Grenada"), + ("America/Guadeloupe", "America/Guadeloupe"), + ("America/Guatemala", "America/Guatemala"), + ("America/Guayaquil", "America/Guayaquil"), + ("America/Guyana", "America/Guyana"), + ("America/Halifax", "America/Halifax"), + ("America/Havana", "America/Havana"), + ("America/Hermosillo", "America/Hermosillo"), + ("America/Indiana/Indianapolis", "America/Indiana/Indianapolis"), + ("America/Indiana/Knox", "America/Indiana/Knox"), + ("America/Indiana/Marengo", "America/Indiana/Marengo"), + ("America/Indiana/Petersburg", "America/Indiana/Petersburg"), + ("America/Indiana/Tell_City", "America/Indiana/Tell_City"), + ("America/Indiana/Vevay", "America/Indiana/Vevay"), + ("America/Indiana/Vincennes", "America/Indiana/Vincennes"), + ("America/Indiana/Winamac", "America/Indiana/Winamac"), + ("America/Inuvik", "America/Inuvik"), + ("America/Iqaluit", "America/Iqaluit"), + ("America/Jamaica", "America/Jamaica"), + ("America/Juneau", "America/Juneau"), + ("America/Kentucky/Louisville", "America/Kentucky/Louisville"), + ("America/Kentucky/Monticello", "America/Kentucky/Monticello"), + ("America/Kralendijk", "America/Kralendijk"), + ("America/La_Paz", "America/La_Paz"), + ("America/Lima", "America/Lima"), + ("America/Los_Angeles", "America/Los_Angeles"), + ("America/Lower_Princes", "America/Lower_Princes"), + ("America/Maceio", "America/Maceio"), + ("America/Managua", "America/Managua"), + ("America/Manaus", "America/Manaus"), + ("America/Marigot", "America/Marigot"), + ("America/Martinique", "America/Martinique"), + ("America/Matamoros", "America/Matamoros"), + ("America/Mazatlan", "America/Mazatlan"), + ("America/Menominee", "America/Menominee"), + ("America/Merida", "America/Merida"), + ("America/Metlakatla", "America/Metlakatla"), + ("America/Mexico_City", "America/Mexico_City"), + ("America/Miquelon", "America/Miquelon"), + ("America/Moncton", "America/Moncton"), + ("America/Monterrey", "America/Monterrey"), + ("America/Montevideo", "America/Montevideo"), + ("America/Montserrat", "America/Montserrat"), + ("America/Nassau", "America/Nassau"), + ("America/New_York", "America/New_York"), + ("America/Nipigon", "America/Nipigon"), + ("America/Nome", "America/Nome"), + ("America/Noronha", "America/Noronha"), + ("America/North_Dakota/Beulah", "America/North_Dakota/Beulah"), + ("America/North_Dakota/Center", "America/North_Dakota/Center"), + ( + "America/North_Dakota/New_Salem", + "America/North_Dakota/New_Salem", + ), + ("America/Ojinaga", "America/Ojinaga"), + ("America/Panama", "America/Panama"), + ("America/Pangnirtung", "America/Pangnirtung"), + ("America/Paramaribo", "America/Paramaribo"), + ("America/Phoenix", "America/Phoenix"), + ("America/Port-au-Prince", "America/Port-au-Prince"), + ("America/Port_of_Spain", "America/Port_of_Spain"), + ("America/Porto_Velho", "America/Porto_Velho"), + ("America/Puerto_Rico", "America/Puerto_Rico"), + ("America/Punta_Arenas", "America/Punta_Arenas"), + ("America/Rainy_River", "America/Rainy_River"), + ("America/Rankin_Inlet", "America/Rankin_Inlet"), + ("America/Recife", "America/Recife"), + ("America/Regina", "America/Regina"), + ("America/Resolute", "America/Resolute"), + ("America/Rio_Branco", "America/Rio_Branco"), + ("America/Santarem", "America/Santarem"), + ("America/Santiago", "America/Santiago"), + ("America/Santo_Domingo", "America/Santo_Domingo"), + ("America/Sao_Paulo", "America/Sao_Paulo"), + ("America/Scoresbysund", "America/Scoresbysund"), + ("America/Sitka", "America/Sitka"), + ("America/St_Barthelemy", "America/St_Barthelemy"), + ("America/St_Johns", "America/St_Johns"), + ("America/St_Kitts", "America/St_Kitts"), + ("America/St_Lucia", "America/St_Lucia"), + ("America/St_Thomas", "America/St_Thomas"), + ("America/St_Vincent", "America/St_Vincent"), + ("America/Swift_Current", "America/Swift_Current"), + ("America/Tegucigalpa", "America/Tegucigalpa"), + ("America/Thule", "America/Thule"), + ("America/Thunder_Bay", "America/Thunder_Bay"), + ("America/Tijuana", "America/Tijuana"), + ("America/Toronto", "America/Toronto"), + ("America/Tortola", "America/Tortola"), + ("America/Vancouver", "America/Vancouver"), + ("America/Whitehorse", "America/Whitehorse"), + ("America/Winnipeg", "America/Winnipeg"), + ("America/Yakutat", "America/Yakutat"), + ("America/Yellowknife", "America/Yellowknife"), + ("Antarctica/Casey", "Antarctica/Casey"), + ("Antarctica/Davis", "Antarctica/Davis"), + ("Antarctica/DumontDUrville", "Antarctica/DumontDUrville"), + ("Antarctica/Macquarie", "Antarctica/Macquarie"), + ("Antarctica/Mawson", "Antarctica/Mawson"), + ("Antarctica/McMurdo", "Antarctica/McMurdo"), + ("Antarctica/Palmer", "Antarctica/Palmer"), + ("Antarctica/Rothera", "Antarctica/Rothera"), + ("Antarctica/Syowa", "Antarctica/Syowa"), + ("Antarctica/Troll", "Antarctica/Troll"), + ("Antarctica/Vostok", "Antarctica/Vostok"), + ("Arctic/Longyearbyen", "Arctic/Longyearbyen"), + ("Asia/Aden", "Asia/Aden"), + ("Asia/Almaty", "Asia/Almaty"), + ("Asia/Amman", "Asia/Amman"), + ("Asia/Anadyr", "Asia/Anadyr"), + ("Asia/Aqtau", "Asia/Aqtau"), + ("Asia/Aqtobe", "Asia/Aqtobe"), + ("Asia/Ashgabat", "Asia/Ashgabat"), + ("Asia/Atyrau", "Asia/Atyrau"), + ("Asia/Baghdad", "Asia/Baghdad"), + ("Asia/Bahrain", "Asia/Bahrain"), + ("Asia/Baku", "Asia/Baku"), + ("Asia/Bangkok", "Asia/Bangkok"), + ("Asia/Barnaul", "Asia/Barnaul"), + ("Asia/Beirut", "Asia/Beirut"), + ("Asia/Bishkek", "Asia/Bishkek"), + ("Asia/Brunei", "Asia/Brunei"), + ("Asia/Chita", "Asia/Chita"), + ("Asia/Choibalsan", "Asia/Choibalsan"), + ("Asia/Colombo", "Asia/Colombo"), + ("Asia/Damascus", "Asia/Damascus"), + ("Asia/Dhaka", "Asia/Dhaka"), + ("Asia/Dili", "Asia/Dili"), + ("Asia/Dubai", "Asia/Dubai"), + ("Asia/Dushanbe", "Asia/Dushanbe"), + ("Asia/Famagusta", "Asia/Famagusta"), + ("Asia/Gaza", "Asia/Gaza"), + ("Asia/Hebron", "Asia/Hebron"), + ("Asia/Ho_Chi_Minh", "Asia/Ho_Chi_Minh"), + ("Asia/Hong_Kong", "Asia/Hong_Kong"), + ("Asia/Hovd", "Asia/Hovd"), + ("Asia/Irkutsk", "Asia/Irkutsk"), + ("Asia/Jakarta", "Asia/Jakarta"), + ("Asia/Jayapura", "Asia/Jayapura"), + ("Asia/Jerusalem", "Asia/Jerusalem"), + ("Asia/Kabul", "Asia/Kabul"), + ("Asia/Kamchatka", "Asia/Kamchatka"), + ("Asia/Karachi", "Asia/Karachi"), + ("Asia/Kathmandu", "Asia/Kathmandu"), + ("Asia/Khandyga", "Asia/Khandyga"), + ("Asia/Kolkata", "Asia/Kolkata"), + ("Asia/Krasnoyarsk", "Asia/Krasnoyarsk"), + ("Asia/Kuala_Lumpur", "Asia/Kuala_Lumpur"), + ("Asia/Kuching", "Asia/Kuching"), + ("Asia/Kuwait", "Asia/Kuwait"), + ("Asia/Macau", "Asia/Macau"), + ("Asia/Magadan", "Asia/Magadan"), + ("Asia/Makassar", "Asia/Makassar"), + ("Asia/Manila", "Asia/Manila"), + ("Asia/Muscat", "Asia/Muscat"), + ("Asia/Nicosia", "Asia/Nicosia"), + ("Asia/Novokuznetsk", "Asia/Novokuznetsk"), + ("Asia/Novosibirsk", "Asia/Novosibirsk"), + ("Asia/Omsk", "Asia/Omsk"), + ("Asia/Oral", "Asia/Oral"), + ("Asia/Phnom_Penh", "Asia/Phnom_Penh"), + ("Asia/Pontianak", "Asia/Pontianak"), + ("Asia/Pyongyang", "Asia/Pyongyang"), + ("Asia/Qatar", "Asia/Qatar"), + ("Asia/Qyzylorda", "Asia/Qyzylorda"), + ("Asia/Riyadh", "Asia/Riyadh"), + ("Asia/Sakhalin", "Asia/Sakhalin"), + ("Asia/Samarkand", "Asia/Samarkand"), + ("Asia/Seoul", "Asia/Seoul"), + ("Asia/Shanghai", "Asia/Shanghai"), + ("Asia/Singapore", "Asia/Singapore"), + ("Asia/Srednekolymsk", "Asia/Srednekolymsk"), + ("Asia/Taipei", "Asia/Taipei"), + ("Asia/Tashkent", "Asia/Tashkent"), + ("Asia/Tbilisi", "Asia/Tbilisi"), + ("Asia/Tehran", "Asia/Tehran"), + ("Asia/Thimphu", "Asia/Thimphu"), + ("Asia/Tokyo", "Asia/Tokyo"), + ("Asia/Tomsk", "Asia/Tomsk"), + ("Asia/Ulaanbaatar", "Asia/Ulaanbaatar"), + ("Asia/Urumqi", "Asia/Urumqi"), + ("Asia/Ust-Nera", "Asia/Ust-Nera"), + ("Asia/Vientiane", "Asia/Vientiane"), + ("Asia/Vladivostok", "Asia/Vladivostok"), + ("Asia/Yakutsk", "Asia/Yakutsk"), + ("Asia/Yangon", "Asia/Yangon"), + ("Asia/Yekaterinburg", "Asia/Yekaterinburg"), + ("Asia/Yerevan", "Asia/Yerevan"), + ("Atlantic/Azores", "Atlantic/Azores"), + ("Atlantic/Bermuda", "Atlantic/Bermuda"), + ("Atlantic/Canary", "Atlantic/Canary"), + ("Atlantic/Cape_Verde", "Atlantic/Cape_Verde"), + ("Atlantic/Faroe", "Atlantic/Faroe"), + ("Atlantic/Madeira", "Atlantic/Madeira"), + ("Atlantic/Reykjavik", "Atlantic/Reykjavik"), + ("Atlantic/South_Georgia", "Atlantic/South_Georgia"), + ("Atlantic/St_Helena", "Atlantic/St_Helena"), + ("Atlantic/Stanley", "Atlantic/Stanley"), + ("Australia/Adelaide", "Australia/Adelaide"), + ("Australia/Brisbane", "Australia/Brisbane"), + ("Australia/Broken_Hill", "Australia/Broken_Hill"), + ("Australia/Currie", "Australia/Currie"), + ("Australia/Darwin", "Australia/Darwin"), + ("Australia/Eucla", "Australia/Eucla"), + ("Australia/Hobart", "Australia/Hobart"), + ("Australia/Lindeman", "Australia/Lindeman"), + ("Australia/Lord_Howe", "Australia/Lord_Howe"), + ("Australia/Melbourne", "Australia/Melbourne"), + ("Australia/Perth", "Australia/Perth"), + ("Australia/Sydney", "Australia/Sydney"), + ("Canada/Atlantic", "Canada/Atlantic"), + ("Canada/Central", "Canada/Central"), + ("Canada/Eastern", "Canada/Eastern"), + ("Canada/Mountain", "Canada/Mountain"), + ("Canada/Newfoundland", "Canada/Newfoundland"), + ("Canada/Pacific", "Canada/Pacific"), + ("Europe/Amsterdam", "Europe/Amsterdam"), + ("Europe/Andorra", "Europe/Andorra"), + ("Europe/Astrakhan", "Europe/Astrakhan"), + ("Europe/Athens", "Europe/Athens"), + ("Europe/Belgrade", "Europe/Belgrade"), + ("Europe/Berlin", "Europe/Berlin"), + ("Europe/Bratislava", "Europe/Bratislava"), + ("Europe/Brussels", "Europe/Brussels"), + ("Europe/Bucharest", "Europe/Bucharest"), + ("Europe/Budapest", "Europe/Budapest"), + ("Europe/Busingen", "Europe/Busingen"), + ("Europe/Chisinau", "Europe/Chisinau"), + ("Europe/Copenhagen", "Europe/Copenhagen"), + ("Europe/Dublin", "Europe/Dublin"), + ("Europe/Gibraltar", "Europe/Gibraltar"), + ("Europe/Guernsey", "Europe/Guernsey"), + ("Europe/Helsinki", "Europe/Helsinki"), + ("Europe/Isle_of_Man", "Europe/Isle_of_Man"), + ("Europe/Istanbul", "Europe/Istanbul"), + ("Europe/Jersey", "Europe/Jersey"), + ("Europe/Kaliningrad", "Europe/Kaliningrad"), + ("Europe/Kiev", "Europe/Kiev"), + ("Europe/Kirov", "Europe/Kirov"), + ("Europe/Lisbon", "Europe/Lisbon"), + ("Europe/Ljubljana", "Europe/Ljubljana"), + ("Europe/London", "Europe/London"), + ("Europe/Luxembourg", "Europe/Luxembourg"), + ("Europe/Madrid", "Europe/Madrid"), + ("Europe/Malta", "Europe/Malta"), + ("Europe/Mariehamn", "Europe/Mariehamn"), + ("Europe/Minsk", "Europe/Minsk"), + ("Europe/Monaco", "Europe/Monaco"), + ("Europe/Moscow", "Europe/Moscow"), + ("Europe/Oslo", "Europe/Oslo"), + ("Europe/Paris", "Europe/Paris"), + ("Europe/Podgorica", "Europe/Podgorica"), + ("Europe/Prague", "Europe/Prague"), + ("Europe/Riga", "Europe/Riga"), + ("Europe/Rome", "Europe/Rome"), + ("Europe/Samara", "Europe/Samara"), + ("Europe/San_Marino", "Europe/San_Marino"), + ("Europe/Sarajevo", "Europe/Sarajevo"), + ("Europe/Saratov", "Europe/Saratov"), + ("Europe/Simferopol", "Europe/Simferopol"), + ("Europe/Skopje", "Europe/Skopje"), + ("Europe/Sofia", "Europe/Sofia"), + ("Europe/Stockholm", "Europe/Stockholm"), + ("Europe/Tallinn", "Europe/Tallinn"), + ("Europe/Tirane", "Europe/Tirane"), + ("Europe/Ulyanovsk", "Europe/Ulyanovsk"), + ("Europe/Uzhgorod", "Europe/Uzhgorod"), + ("Europe/Vaduz", "Europe/Vaduz"), + ("Europe/Vatican", "Europe/Vatican"), + ("Europe/Vienna", "Europe/Vienna"), + ("Europe/Vilnius", "Europe/Vilnius"), + ("Europe/Volgograd", "Europe/Volgograd"), + ("Europe/Warsaw", "Europe/Warsaw"), + ("Europe/Zagreb", "Europe/Zagreb"), + ("Europe/Zaporozhye", "Europe/Zaporozhye"), + ("Europe/Zurich", "Europe/Zurich"), + ("GMT", "GMT"), + ("Indian/Antananarivo", "Indian/Antananarivo"), + ("Indian/Chagos", "Indian/Chagos"), + ("Indian/Christmas", "Indian/Christmas"), + ("Indian/Cocos", "Indian/Cocos"), + ("Indian/Comoro", "Indian/Comoro"), + ("Indian/Kerguelen", "Indian/Kerguelen"), + ("Indian/Mahe", "Indian/Mahe"), + ("Indian/Maldives", "Indian/Maldives"), + ("Indian/Mauritius", "Indian/Mauritius"), + ("Indian/Mayotte", "Indian/Mayotte"), + ("Indian/Reunion", "Indian/Reunion"), + ("Pacific/Apia", "Pacific/Apia"), + ("Pacific/Auckland", "Pacific/Auckland"), + ("Pacific/Bougainville", "Pacific/Bougainville"), + ("Pacific/Chatham", "Pacific/Chatham"), + ("Pacific/Chuuk", "Pacific/Chuuk"), + ("Pacific/Easter", "Pacific/Easter"), + ("Pacific/Efate", "Pacific/Efate"), + ("Pacific/Enderbury", "Pacific/Enderbury"), + ("Pacific/Fakaofo", "Pacific/Fakaofo"), + ("Pacific/Fiji", "Pacific/Fiji"), + ("Pacific/Funafuti", "Pacific/Funafuti"), + ("Pacific/Galapagos", "Pacific/Galapagos"), + ("Pacific/Gambier", "Pacific/Gambier"), + ("Pacific/Guadalcanal", "Pacific/Guadalcanal"), + ("Pacific/Guam", "Pacific/Guam"), + ("Pacific/Honolulu", "Pacific/Honolulu"), + ("Pacific/Kiritimati", "Pacific/Kiritimati"), + ("Pacific/Kosrae", "Pacific/Kosrae"), + ("Pacific/Kwajalein", "Pacific/Kwajalein"), + ("Pacific/Majuro", "Pacific/Majuro"), + ("Pacific/Marquesas", "Pacific/Marquesas"), + ("Pacific/Midway", "Pacific/Midway"), + ("Pacific/Nauru", "Pacific/Nauru"), + ("Pacific/Niue", "Pacific/Niue"), + ("Pacific/Norfolk", "Pacific/Norfolk"), + ("Pacific/Noumea", "Pacific/Noumea"), + ("Pacific/Pago_Pago", "Pacific/Pago_Pago"), + ("Pacific/Palau", "Pacific/Palau"), + ("Pacific/Pitcairn", "Pacific/Pitcairn"), + ("Pacific/Pohnpei", "Pacific/Pohnpei"), + ("Pacific/Port_Moresby", "Pacific/Port_Moresby"), + ("Pacific/Rarotonga", "Pacific/Rarotonga"), + ("Pacific/Saipan", "Pacific/Saipan"), + ("Pacific/Tahiti", "Pacific/Tahiti"), + ("Pacific/Tarawa", "Pacific/Tarawa"), + ("Pacific/Tongatapu", "Pacific/Tongatapu"), + ("Pacific/Wake", "Pacific/Wake"), + ("Pacific/Wallis", "Pacific/Wallis"), + ("US/Alaska", "US/Alaska"), + ("US/Arizona", "US/Arizona"), + ("US/Central", "US/Central"), + ("US/Eastern", "US/Eastern"), + ("US/Hawaii", "US/Hawaii"), + ("US/Mountain", "US/Mountain"), + ("US/Pacific", "US/Pacific"), + ("UTC", "UTC"), + ], + default="UTC", + max_length=80, + null=True, + ), + ) ] diff --git a/brutaldon/migrations/0012_auto_20180826_1853.py b/brutaldon/migrations/0012_auto_20180826_1853.py index d407a46..3b3577e 100644 --- a/brutaldon/migrations/0012_auto_20180826_1853.py +++ b/brutaldon/migrations/0012_auto_20180826_1853.py @@ -5,14 +5,12 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0011_auto_20180825_1017'), - ] + dependencies = [("brutaldon", "0011_auto_20180825_1017")] operations = [ migrations.AlterField( - model_name='account', - name='username', + model_name="account", + name="username", field=models.EmailField(max_length=254, unique=True), - ), + ) ] diff --git a/brutaldon/migrations/0013_auto_20180826_1935.py b/brutaldon/migrations/0013_auto_20180826_1935.py index e048094..431db9a 100644 --- a/brutaldon/migrations/0013_auto_20180826_1935.py +++ b/brutaldon/migrations/0013_auto_20180826_1935.py @@ -6,14 +6,16 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0012_auto_20180826_1853'), - ] + dependencies = [("brutaldon", "0012_auto_20180826_1853")] operations = [ migrations.AlterField( - model_name='preference', - name='theme', - field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='brutaldon.Theme'), - ), + model_name="preference", + name="theme", + field=models.ForeignKey( + default=1, + on_delete=django.db.models.deletion.CASCADE, + to="brutaldon.Theme", + ), + ) ] diff --git a/brutaldon/migrations/0014_account_note_seen.py b/brutaldon/migrations/0014_account_note_seen.py index 10e8670..d8a0386 100644 --- a/brutaldon/migrations/0014_account_note_seen.py +++ b/brutaldon/migrations/0014_account_note_seen.py @@ -5,14 +5,10 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0013_auto_20180826_1935'), - ] + dependencies = [("brutaldon", "0013_auto_20180826_1935")] operations = [ migrations.AddField( - model_name='account', - name='note_seen', - field=models.IntegerField(null=True), - ), + model_name="account", name="note_seen", field=models.IntegerField(null=True) + ) ] diff --git a/brutaldon/migrations/0015_auto_20181001_1812.py b/brutaldon/migrations/0015_auto_20181001_1812.py index 5a9b38b..dc1e8dd 100644 --- a/brutaldon/migrations/0015_auto_20181001_1812.py +++ b/brutaldon/migrations/0015_auto_20181001_1812.py @@ -5,24 +5,22 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0014_account_note_seen'), - ] + dependencies = [("brutaldon", "0014_account_note_seen")] operations = [ migrations.AddField( - model_name='preference', - name='click_to_load', + model_name="preference", + name="click_to_load", field=models.BooleanField(default=False), ), migrations.AddField( - model_name='preference', - name='no_javascript', + model_name="preference", + name="no_javascript", field=models.BooleanField(default=False), ), migrations.AddField( - model_name='preference', - name='notifications', + model_name="preference", + name="notifications", field=models.BooleanField(default=True), ), ] diff --git a/brutaldon/migrations/0016_auto_20181009_1805.py b/brutaldon/migrations/0016_auto_20181009_1805.py index c3fba21..0c07acf 100644 --- a/brutaldon/migrations/0016_auto_20181009_1805.py +++ b/brutaldon/migrations/0016_auto_20181009_1805.py @@ -5,29 +5,37 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0015_auto_20181001_1812'), - ] + dependencies = [("brutaldon", "0015_auto_20181001_1812")] operations = [ migrations.AddField( - model_name='preference', - name='lightbox', - field=models.BooleanField(default=False, help_text='Use a JavaScript lightbox to display media.'), + model_name="preference", + name="lightbox", + field=models.BooleanField( + default=False, help_text="Use a JavaScript lightbox to display media." + ), ), migrations.AlterField( - model_name='preference', - name='click_to_load', - field=models.BooleanField(default=False, help_text='Click to load more toots in the same page, rather than using pagination.'), + model_name="preference", + name="click_to_load", + field=models.BooleanField( + default=False, + help_text="Click to load more toots in the same page, rather than using pagination.", + ), ), migrations.AlterField( - model_name='preference', - name='no_javascript', - field=models.BooleanField(default=False, help_text='Disable all JavaScript. Overrides all other JavaScript options.'), + model_name="preference", + name="no_javascript", + field=models.BooleanField( + default=False, + help_text="Disable all JavaScript. Overrides all other JavaScript options.", + ), ), migrations.AlterField( - model_name='preference', - name='notifications', - field=models.BooleanField(default=True, help_text='Display live notifications in header.'), + model_name="preference", + name="notifications", + field=models.BooleanField( + default=True, help_text="Display live notifications in header." + ), ), ] diff --git a/brutaldon/migrations/0017_preference_poll_frequency.py b/brutaldon/migrations/0017_preference_poll_frequency.py index dac1672..be31208 100644 --- a/brutaldon/migrations/0017_preference_poll_frequency.py +++ b/brutaldon/migrations/0017_preference_poll_frequency.py @@ -5,14 +5,15 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0016_auto_20181009_1805'), - ] + dependencies = [("brutaldon", "0016_auto_20181009_1805")] operations = [ migrations.AddField( - model_name='preference', - name='poll_frequency', - field=models.IntegerField(default=300, help_text='Number of seconds to wait between checking notifications. Default: 300'), - ), + model_name="preference", + name="poll_frequency", + field=models.IntegerField( + default=300, + help_text="Number of seconds to wait between checking notifications. Default: 300", + ), + ) ] diff --git a/brutaldon/migrations/0018_preference_filter_notifications.py b/brutaldon/migrations/0018_preference_filter_notifications.py index 741515d..b403317 100644 --- a/brutaldon/migrations/0018_preference_filter_notifications.py +++ b/brutaldon/migrations/0018_preference_filter_notifications.py @@ -5,14 +5,15 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0017_preference_poll_frequency'), - ] + dependencies = [("brutaldon", "0017_preference_poll_frequency")] operations = [ migrations.AddField( - model_name='preference', - name='filter_notifications', - field=models.BooleanField(default=False, help_text='Exclude boosts and favs from your notifications.'), - ), + model_name="preference", + name="filter_notifications", + field=models.BooleanField( + default=False, + help_text="Exclude boosts and favs from your notifications.", + ), + ) ] diff --git a/brutaldon/migrations/0019_auto_20190124_0813.py b/brutaldon/migrations/0019_auto_20190124_0813.py index 4aea3f9..c77254f 100644 --- a/brutaldon/migrations/0019_auto_20190124_0813.py +++ b/brutaldon/migrations/0019_auto_20190124_0813.py @@ -5,14 +5,468 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0018_preference_filter_notifications'), - ] + dependencies = [("brutaldon", "0018_preference_filter_notifications")] operations = [ migrations.AlterField( - model_name='preference', - name='timezone', - field=models.CharField(blank=True, choices=[('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Godthab', 'America/Godthab'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/Kralendijk', 'America/Kralendijk'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Lower_Princes', 'America/Lower_Princes'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Marigot', 'America/Marigot'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Barthelemy', 'America/St_Barthelemy'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Arctic/Longyearbyen', 'Arctic/Longyearbyen'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Canada/Atlantic', 'Canada/Atlantic'), ('Canada/Central', 'Canada/Central'), ('Canada/Eastern', 'Canada/Eastern'), ('Canada/Mountain', 'Canada/Mountain'), ('Canada/Newfoundland', 'Canada/Newfoundland'), ('Canada/Pacific', 'Canada/Pacific'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Bratislava', 'Europe/Bratislava'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Busingen', 'Europe/Busingen'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Guernsey', 'Europe/Guernsey'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Isle_of_Man', 'Europe/Isle_of_Man'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Jersey', 'Europe/Jersey'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/Ljubljana', 'Europe/Ljubljana'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Mariehamn', 'Europe/Mariehamn'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Podgorica', 'Europe/Podgorica'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/San_Marino', 'Europe/San_Marino'), ('Europe/Sarajevo', 'Europe/Sarajevo'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Skopje', 'Europe/Skopje'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vatican', 'Europe/Vatican'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zagreb', 'Europe/Zagreb'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('US/Alaska', 'US/Alaska'), ('US/Arizona', 'US/Arizona'), ('US/Central', 'US/Central'), ('US/Eastern', 'US/Eastern'), ('US/Hawaii', 'US/Hawaii'), ('US/Mountain', 'US/Mountain'), ('US/Pacific', 'US/Pacific'), ('UTC', 'UTC')], default='UTC', max_length=80, null=True), - ), + model_name="preference", + name="timezone", + field=models.CharField( + blank=True, + choices=[ + ("Africa/Abidjan", "Africa/Abidjan"), + ("Africa/Accra", "Africa/Accra"), + ("Africa/Addis_Ababa", "Africa/Addis_Ababa"), + ("Africa/Algiers", "Africa/Algiers"), + ("Africa/Asmara", "Africa/Asmara"), + ("Africa/Bamako", "Africa/Bamako"), + ("Africa/Bangui", "Africa/Bangui"), + ("Africa/Banjul", "Africa/Banjul"), + ("Africa/Bissau", "Africa/Bissau"), + ("Africa/Blantyre", "Africa/Blantyre"), + ("Africa/Brazzaville", "Africa/Brazzaville"), + ("Africa/Bujumbura", "Africa/Bujumbura"), + ("Africa/Cairo", "Africa/Cairo"), + ("Africa/Casablanca", "Africa/Casablanca"), + ("Africa/Ceuta", "Africa/Ceuta"), + ("Africa/Conakry", "Africa/Conakry"), + ("Africa/Dakar", "Africa/Dakar"), + ("Africa/Dar_es_Salaam", "Africa/Dar_es_Salaam"), + ("Africa/Djibouti", "Africa/Djibouti"), + ("Africa/Douala", "Africa/Douala"), + ("Africa/El_Aaiun", "Africa/El_Aaiun"), + ("Africa/Freetown", "Africa/Freetown"), + ("Africa/Gaborone", "Africa/Gaborone"), + ("Africa/Harare", "Africa/Harare"), + ("Africa/Johannesburg", "Africa/Johannesburg"), + ("Africa/Juba", "Africa/Juba"), + ("Africa/Kampala", "Africa/Kampala"), + ("Africa/Khartoum", "Africa/Khartoum"), + ("Africa/Kigali", "Africa/Kigali"), + ("Africa/Kinshasa", "Africa/Kinshasa"), + ("Africa/Lagos", "Africa/Lagos"), + ("Africa/Libreville", "Africa/Libreville"), + ("Africa/Lome", "Africa/Lome"), + ("Africa/Luanda", "Africa/Luanda"), + ("Africa/Lubumbashi", "Africa/Lubumbashi"), + ("Africa/Lusaka", "Africa/Lusaka"), + ("Africa/Malabo", "Africa/Malabo"), + ("Africa/Maputo", "Africa/Maputo"), + ("Africa/Maseru", "Africa/Maseru"), + ("Africa/Mbabane", "Africa/Mbabane"), + ("Africa/Mogadishu", "Africa/Mogadishu"), + ("Africa/Monrovia", "Africa/Monrovia"), + ("Africa/Nairobi", "Africa/Nairobi"), + ("Africa/Ndjamena", "Africa/Ndjamena"), + ("Africa/Niamey", "Africa/Niamey"), + ("Africa/Nouakchott", "Africa/Nouakchott"), + ("Africa/Ouagadougou", "Africa/Ouagadougou"), + ("Africa/Porto-Novo", "Africa/Porto-Novo"), + ("Africa/Sao_Tome", "Africa/Sao_Tome"), + ("Africa/Tripoli", "Africa/Tripoli"), + ("Africa/Tunis", "Africa/Tunis"), + ("Africa/Windhoek", "Africa/Windhoek"), + ("America/Adak", "America/Adak"), + ("America/Anchorage", "America/Anchorage"), + ("America/Anguilla", "America/Anguilla"), + ("America/Antigua", "America/Antigua"), + ("America/Araguaina", "America/Araguaina"), + ( + "America/Argentina/Buenos_Aires", + "America/Argentina/Buenos_Aires", + ), + ("America/Argentina/Catamarca", "America/Argentina/Catamarca"), + ("America/Argentina/Cordoba", "America/Argentina/Cordoba"), + ("America/Argentina/Jujuy", "America/Argentina/Jujuy"), + ("America/Argentina/La_Rioja", "America/Argentina/La_Rioja"), + ("America/Argentina/Mendoza", "America/Argentina/Mendoza"), + ( + "America/Argentina/Rio_Gallegos", + "America/Argentina/Rio_Gallegos", + ), + ("America/Argentina/Salta", "America/Argentina/Salta"), + ("America/Argentina/San_Juan", "America/Argentina/San_Juan"), + ("America/Argentina/San_Luis", "America/Argentina/San_Luis"), + ("America/Argentina/Tucuman", "America/Argentina/Tucuman"), + ("America/Argentina/Ushuaia", "America/Argentina/Ushuaia"), + ("America/Aruba", "America/Aruba"), + ("America/Asuncion", "America/Asuncion"), + ("America/Atikokan", "America/Atikokan"), + ("America/Bahia", "America/Bahia"), + ("America/Bahia_Banderas", "America/Bahia_Banderas"), + ("America/Barbados", "America/Barbados"), + ("America/Belem", "America/Belem"), + ("America/Belize", "America/Belize"), + ("America/Blanc-Sablon", "America/Blanc-Sablon"), + ("America/Boa_Vista", "America/Boa_Vista"), + ("America/Bogota", "America/Bogota"), + ("America/Boise", "America/Boise"), + ("America/Cambridge_Bay", "America/Cambridge_Bay"), + ("America/Campo_Grande", "America/Campo_Grande"), + ("America/Cancun", "America/Cancun"), + ("America/Caracas", "America/Caracas"), + ("America/Cayenne", "America/Cayenne"), + ("America/Cayman", "America/Cayman"), + ("America/Chicago", "America/Chicago"), + ("America/Chihuahua", "America/Chihuahua"), + ("America/Costa_Rica", "America/Costa_Rica"), + ("America/Creston", "America/Creston"), + ("America/Cuiaba", "America/Cuiaba"), + ("America/Curacao", "America/Curacao"), + ("America/Danmarkshavn", "America/Danmarkshavn"), + ("America/Dawson", "America/Dawson"), + ("America/Dawson_Creek", "America/Dawson_Creek"), + ("America/Denver", "America/Denver"), + ("America/Detroit", "America/Detroit"), + ("America/Dominica", "America/Dominica"), + ("America/Edmonton", "America/Edmonton"), + ("America/Eirunepe", "America/Eirunepe"), + ("America/El_Salvador", "America/El_Salvador"), + ("America/Fort_Nelson", "America/Fort_Nelson"), + ("America/Fortaleza", "America/Fortaleza"), + ("America/Glace_Bay", "America/Glace_Bay"), + ("America/Godthab", "America/Godthab"), + ("America/Goose_Bay", "America/Goose_Bay"), + ("America/Grand_Turk", "America/Grand_Turk"), + ("America/Grenada", "America/Grenada"), + ("America/Guadeloupe", "America/Guadeloupe"), + ("America/Guatemala", "America/Guatemala"), + ("America/Guayaquil", "America/Guayaquil"), + ("America/Guyana", "America/Guyana"), + ("America/Halifax", "America/Halifax"), + ("America/Havana", "America/Havana"), + ("America/Hermosillo", "America/Hermosillo"), + ("America/Indiana/Indianapolis", "America/Indiana/Indianapolis"), + ("America/Indiana/Knox", "America/Indiana/Knox"), + ("America/Indiana/Marengo", "America/Indiana/Marengo"), + ("America/Indiana/Petersburg", "America/Indiana/Petersburg"), + ("America/Indiana/Tell_City", "America/Indiana/Tell_City"), + ("America/Indiana/Vevay", "America/Indiana/Vevay"), + ("America/Indiana/Vincennes", "America/Indiana/Vincennes"), + ("America/Indiana/Winamac", "America/Indiana/Winamac"), + ("America/Inuvik", "America/Inuvik"), + ("America/Iqaluit", "America/Iqaluit"), + ("America/Jamaica", "America/Jamaica"), + ("America/Juneau", "America/Juneau"), + ("America/Kentucky/Louisville", "America/Kentucky/Louisville"), + ("America/Kentucky/Monticello", "America/Kentucky/Monticello"), + ("America/Kralendijk", "America/Kralendijk"), + ("America/La_Paz", "America/La_Paz"), + ("America/Lima", "America/Lima"), + ("America/Los_Angeles", "America/Los_Angeles"), + ("America/Lower_Princes", "America/Lower_Princes"), + ("America/Maceio", "America/Maceio"), + ("America/Managua", "America/Managua"), + ("America/Manaus", "America/Manaus"), + ("America/Marigot", "America/Marigot"), + ("America/Martinique", "America/Martinique"), + ("America/Matamoros", "America/Matamoros"), + ("America/Mazatlan", "America/Mazatlan"), + ("America/Menominee", "America/Menominee"), + ("America/Merida", "America/Merida"), + ("America/Metlakatla", "America/Metlakatla"), + ("America/Mexico_City", "America/Mexico_City"), + ("America/Miquelon", "America/Miquelon"), + ("America/Moncton", "America/Moncton"), + ("America/Monterrey", "America/Monterrey"), + ("America/Montevideo", "America/Montevideo"), + ("America/Montserrat", "America/Montserrat"), + ("America/Nassau", "America/Nassau"), + ("America/New_York", "America/New_York"), + ("America/Nipigon", "America/Nipigon"), + ("America/Nome", "America/Nome"), + ("America/Noronha", "America/Noronha"), + ("America/North_Dakota/Beulah", "America/North_Dakota/Beulah"), + ("America/North_Dakota/Center", "America/North_Dakota/Center"), + ( + "America/North_Dakota/New_Salem", + "America/North_Dakota/New_Salem", + ), + ("America/Ojinaga", "America/Ojinaga"), + ("America/Panama", "America/Panama"), + ("America/Pangnirtung", "America/Pangnirtung"), + ("America/Paramaribo", "America/Paramaribo"), + ("America/Phoenix", "America/Phoenix"), + ("America/Port-au-Prince", "America/Port-au-Prince"), + ("America/Port_of_Spain", "America/Port_of_Spain"), + ("America/Porto_Velho", "America/Porto_Velho"), + ("America/Puerto_Rico", "America/Puerto_Rico"), + ("America/Punta_Arenas", "America/Punta_Arenas"), + ("America/Rainy_River", "America/Rainy_River"), + ("America/Rankin_Inlet", "America/Rankin_Inlet"), + ("America/Recife", "America/Recife"), + ("America/Regina", "America/Regina"), + ("America/Resolute", "America/Resolute"), + ("America/Rio_Branco", "America/Rio_Branco"), + ("America/Santarem", "America/Santarem"), + ("America/Santiago", "America/Santiago"), + ("America/Santo_Domingo", "America/Santo_Domingo"), + ("America/Sao_Paulo", "America/Sao_Paulo"), + ("America/Scoresbysund", "America/Scoresbysund"), + ("America/Sitka", "America/Sitka"), + ("America/St_Barthelemy", "America/St_Barthelemy"), + ("America/St_Johns", "America/St_Johns"), + ("America/St_Kitts", "America/St_Kitts"), + ("America/St_Lucia", "America/St_Lucia"), + ("America/St_Thomas", "America/St_Thomas"), + ("America/St_Vincent", "America/St_Vincent"), + ("America/Swift_Current", "America/Swift_Current"), + ("America/Tegucigalpa", "America/Tegucigalpa"), + ("America/Thule", "America/Thule"), + ("America/Thunder_Bay", "America/Thunder_Bay"), + ("America/Tijuana", "America/Tijuana"), + ("America/Toronto", "America/Toronto"), + ("America/Tortola", "America/Tortola"), + ("America/Vancouver", "America/Vancouver"), + ("America/Whitehorse", "America/Whitehorse"), + ("America/Winnipeg", "America/Winnipeg"), + ("America/Yakutat", "America/Yakutat"), + ("America/Yellowknife", "America/Yellowknife"), + ("Antarctica/Casey", "Antarctica/Casey"), + ("Antarctica/Davis", "Antarctica/Davis"), + ("Antarctica/DumontDUrville", "Antarctica/DumontDUrville"), + ("Antarctica/Macquarie", "Antarctica/Macquarie"), + ("Antarctica/Mawson", "Antarctica/Mawson"), + ("Antarctica/McMurdo", "Antarctica/McMurdo"), + ("Antarctica/Palmer", "Antarctica/Palmer"), + ("Antarctica/Rothera", "Antarctica/Rothera"), + ("Antarctica/Syowa", "Antarctica/Syowa"), + ("Antarctica/Troll", "Antarctica/Troll"), + ("Antarctica/Vostok", "Antarctica/Vostok"), + ("Arctic/Longyearbyen", "Arctic/Longyearbyen"), + ("Asia/Aden", "Asia/Aden"), + ("Asia/Almaty", "Asia/Almaty"), + ("Asia/Amman", "Asia/Amman"), + ("Asia/Anadyr", "Asia/Anadyr"), + ("Asia/Aqtau", "Asia/Aqtau"), + ("Asia/Aqtobe", "Asia/Aqtobe"), + ("Asia/Ashgabat", "Asia/Ashgabat"), + ("Asia/Atyrau", "Asia/Atyrau"), + ("Asia/Baghdad", "Asia/Baghdad"), + ("Asia/Bahrain", "Asia/Bahrain"), + ("Asia/Baku", "Asia/Baku"), + ("Asia/Bangkok", "Asia/Bangkok"), + ("Asia/Barnaul", "Asia/Barnaul"), + ("Asia/Beirut", "Asia/Beirut"), + ("Asia/Bishkek", "Asia/Bishkek"), + ("Asia/Brunei", "Asia/Brunei"), + ("Asia/Chita", "Asia/Chita"), + ("Asia/Choibalsan", "Asia/Choibalsan"), + ("Asia/Colombo", "Asia/Colombo"), + ("Asia/Damascus", "Asia/Damascus"), + ("Asia/Dhaka", "Asia/Dhaka"), + ("Asia/Dili", "Asia/Dili"), + ("Asia/Dubai", "Asia/Dubai"), + ("Asia/Dushanbe", "Asia/Dushanbe"), + ("Asia/Famagusta", "Asia/Famagusta"), + ("Asia/Gaza", "Asia/Gaza"), + ("Asia/Hebron", "Asia/Hebron"), + ("Asia/Ho_Chi_Minh", "Asia/Ho_Chi_Minh"), + ("Asia/Hong_Kong", "Asia/Hong_Kong"), + ("Asia/Hovd", "Asia/Hovd"), + ("Asia/Irkutsk", "Asia/Irkutsk"), + ("Asia/Jakarta", "Asia/Jakarta"), + ("Asia/Jayapura", "Asia/Jayapura"), + ("Asia/Jerusalem", "Asia/Jerusalem"), + ("Asia/Kabul", "Asia/Kabul"), + ("Asia/Kamchatka", "Asia/Kamchatka"), + ("Asia/Karachi", "Asia/Karachi"), + ("Asia/Kathmandu", "Asia/Kathmandu"), + ("Asia/Khandyga", "Asia/Khandyga"), + ("Asia/Kolkata", "Asia/Kolkata"), + ("Asia/Krasnoyarsk", "Asia/Krasnoyarsk"), + ("Asia/Kuala_Lumpur", "Asia/Kuala_Lumpur"), + ("Asia/Kuching", "Asia/Kuching"), + ("Asia/Kuwait", "Asia/Kuwait"), + ("Asia/Macau", "Asia/Macau"), + ("Asia/Magadan", "Asia/Magadan"), + ("Asia/Makassar", "Asia/Makassar"), + ("Asia/Manila", "Asia/Manila"), + ("Asia/Muscat", "Asia/Muscat"), + ("Asia/Nicosia", "Asia/Nicosia"), + ("Asia/Novokuznetsk", "Asia/Novokuznetsk"), + ("Asia/Novosibirsk", "Asia/Novosibirsk"), + ("Asia/Omsk", "Asia/Omsk"), + ("Asia/Oral", "Asia/Oral"), + ("Asia/Phnom_Penh", "Asia/Phnom_Penh"), + ("Asia/Pontianak", "Asia/Pontianak"), + ("Asia/Pyongyang", "Asia/Pyongyang"), + ("Asia/Qatar", "Asia/Qatar"), + ("Asia/Qostanay", "Asia/Qostanay"), + ("Asia/Qyzylorda", "Asia/Qyzylorda"), + ("Asia/Riyadh", "Asia/Riyadh"), + ("Asia/Sakhalin", "Asia/Sakhalin"), + ("Asia/Samarkand", "Asia/Samarkand"), + ("Asia/Seoul", "Asia/Seoul"), + ("Asia/Shanghai", "Asia/Shanghai"), + ("Asia/Singapore", "Asia/Singapore"), + ("Asia/Srednekolymsk", "Asia/Srednekolymsk"), + ("Asia/Taipei", "Asia/Taipei"), + ("Asia/Tashkent", "Asia/Tashkent"), + ("Asia/Tbilisi", "Asia/Tbilisi"), + ("Asia/Tehran", "Asia/Tehran"), + ("Asia/Thimphu", "Asia/Thimphu"), + ("Asia/Tokyo", "Asia/Tokyo"), + ("Asia/Tomsk", "Asia/Tomsk"), + ("Asia/Ulaanbaatar", "Asia/Ulaanbaatar"), + ("Asia/Urumqi", "Asia/Urumqi"), + ("Asia/Ust-Nera", "Asia/Ust-Nera"), + ("Asia/Vientiane", "Asia/Vientiane"), + ("Asia/Vladivostok", "Asia/Vladivostok"), + ("Asia/Yakutsk", "Asia/Yakutsk"), + ("Asia/Yangon", "Asia/Yangon"), + ("Asia/Yekaterinburg", "Asia/Yekaterinburg"), + ("Asia/Yerevan", "Asia/Yerevan"), + ("Atlantic/Azores", "Atlantic/Azores"), + ("Atlantic/Bermuda", "Atlantic/Bermuda"), + ("Atlantic/Canary", "Atlantic/Canary"), + ("Atlantic/Cape_Verde", "Atlantic/Cape_Verde"), + ("Atlantic/Faroe", "Atlantic/Faroe"), + ("Atlantic/Madeira", "Atlantic/Madeira"), + ("Atlantic/Reykjavik", "Atlantic/Reykjavik"), + ("Atlantic/South_Georgia", "Atlantic/South_Georgia"), + ("Atlantic/St_Helena", "Atlantic/St_Helena"), + ("Atlantic/Stanley", "Atlantic/Stanley"), + ("Australia/Adelaide", "Australia/Adelaide"), + ("Australia/Brisbane", "Australia/Brisbane"), + ("Australia/Broken_Hill", "Australia/Broken_Hill"), + ("Australia/Currie", "Australia/Currie"), + ("Australia/Darwin", "Australia/Darwin"), + ("Australia/Eucla", "Australia/Eucla"), + ("Australia/Hobart", "Australia/Hobart"), + ("Australia/Lindeman", "Australia/Lindeman"), + ("Australia/Lord_Howe", "Australia/Lord_Howe"), + ("Australia/Melbourne", "Australia/Melbourne"), + ("Australia/Perth", "Australia/Perth"), + ("Australia/Sydney", "Australia/Sydney"), + ("Canada/Atlantic", "Canada/Atlantic"), + ("Canada/Central", "Canada/Central"), + ("Canada/Eastern", "Canada/Eastern"), + ("Canada/Mountain", "Canada/Mountain"), + ("Canada/Newfoundland", "Canada/Newfoundland"), + ("Canada/Pacific", "Canada/Pacific"), + ("Europe/Amsterdam", "Europe/Amsterdam"), + ("Europe/Andorra", "Europe/Andorra"), + ("Europe/Astrakhan", "Europe/Astrakhan"), + ("Europe/Athens", "Europe/Athens"), + ("Europe/Belgrade", "Europe/Belgrade"), + ("Europe/Berlin", "Europe/Berlin"), + ("Europe/Bratislava", "Europe/Bratislava"), + ("Europe/Brussels", "Europe/Brussels"), + ("Europe/Bucharest", "Europe/Bucharest"), + ("Europe/Budapest", "Europe/Budapest"), + ("Europe/Busingen", "Europe/Busingen"), + ("Europe/Chisinau", "Europe/Chisinau"), + ("Europe/Copenhagen", "Europe/Copenhagen"), + ("Europe/Dublin", "Europe/Dublin"), + ("Europe/Gibraltar", "Europe/Gibraltar"), + ("Europe/Guernsey", "Europe/Guernsey"), + ("Europe/Helsinki", "Europe/Helsinki"), + ("Europe/Isle_of_Man", "Europe/Isle_of_Man"), + ("Europe/Istanbul", "Europe/Istanbul"), + ("Europe/Jersey", "Europe/Jersey"), + ("Europe/Kaliningrad", "Europe/Kaliningrad"), + ("Europe/Kiev", "Europe/Kiev"), + ("Europe/Kirov", "Europe/Kirov"), + ("Europe/Lisbon", "Europe/Lisbon"), + ("Europe/Ljubljana", "Europe/Ljubljana"), + ("Europe/London", "Europe/London"), + ("Europe/Luxembourg", "Europe/Luxembourg"), + ("Europe/Madrid", "Europe/Madrid"), + ("Europe/Malta", "Europe/Malta"), + ("Europe/Mariehamn", "Europe/Mariehamn"), + ("Europe/Minsk", "Europe/Minsk"), + ("Europe/Monaco", "Europe/Monaco"), + ("Europe/Moscow", "Europe/Moscow"), + ("Europe/Oslo", "Europe/Oslo"), + ("Europe/Paris", "Europe/Paris"), + ("Europe/Podgorica", "Europe/Podgorica"), + ("Europe/Prague", "Europe/Prague"), + ("Europe/Riga", "Europe/Riga"), + ("Europe/Rome", "Europe/Rome"), + ("Europe/Samara", "Europe/Samara"), + ("Europe/San_Marino", "Europe/San_Marino"), + ("Europe/Sarajevo", "Europe/Sarajevo"), + ("Europe/Saratov", "Europe/Saratov"), + ("Europe/Simferopol", "Europe/Simferopol"), + ("Europe/Skopje", "Europe/Skopje"), + ("Europe/Sofia", "Europe/Sofia"), + ("Europe/Stockholm", "Europe/Stockholm"), + ("Europe/Tallinn", "Europe/Tallinn"), + ("Europe/Tirane", "Europe/Tirane"), + ("Europe/Ulyanovsk", "Europe/Ulyanovsk"), + ("Europe/Uzhgorod", "Europe/Uzhgorod"), + ("Europe/Vaduz", "Europe/Vaduz"), + ("Europe/Vatican", "Europe/Vatican"), + ("Europe/Vienna", "Europe/Vienna"), + ("Europe/Vilnius", "Europe/Vilnius"), + ("Europe/Volgograd", "Europe/Volgograd"), + ("Europe/Warsaw", "Europe/Warsaw"), + ("Europe/Zagreb", "Europe/Zagreb"), + ("Europe/Zaporozhye", "Europe/Zaporozhye"), + ("Europe/Zurich", "Europe/Zurich"), + ("GMT", "GMT"), + ("Indian/Antananarivo", "Indian/Antananarivo"), + ("Indian/Chagos", "Indian/Chagos"), + ("Indian/Christmas", "Indian/Christmas"), + ("Indian/Cocos", "Indian/Cocos"), + ("Indian/Comoro", "Indian/Comoro"), + ("Indian/Kerguelen", "Indian/Kerguelen"), + ("Indian/Mahe", "Indian/Mahe"), + ("Indian/Maldives", "Indian/Maldives"), + ("Indian/Mauritius", "Indian/Mauritius"), + ("Indian/Mayotte", "Indian/Mayotte"), + ("Indian/Reunion", "Indian/Reunion"), + ("Pacific/Apia", "Pacific/Apia"), + ("Pacific/Auckland", "Pacific/Auckland"), + ("Pacific/Bougainville", "Pacific/Bougainville"), + ("Pacific/Chatham", "Pacific/Chatham"), + ("Pacific/Chuuk", "Pacific/Chuuk"), + ("Pacific/Easter", "Pacific/Easter"), + ("Pacific/Efate", "Pacific/Efate"), + ("Pacific/Enderbury", "Pacific/Enderbury"), + ("Pacific/Fakaofo", "Pacific/Fakaofo"), + ("Pacific/Fiji", "Pacific/Fiji"), + ("Pacific/Funafuti", "Pacific/Funafuti"), + ("Pacific/Galapagos", "Pacific/Galapagos"), + ("Pacific/Gambier", "Pacific/Gambier"), + ("Pacific/Guadalcanal", "Pacific/Guadalcanal"), + ("Pacific/Guam", "Pacific/Guam"), + ("Pacific/Honolulu", "Pacific/Honolulu"), + ("Pacific/Kiritimati", "Pacific/Kiritimati"), + ("Pacific/Kosrae", "Pacific/Kosrae"), + ("Pacific/Kwajalein", "Pacific/Kwajalein"), + ("Pacific/Majuro", "Pacific/Majuro"), + ("Pacific/Marquesas", "Pacific/Marquesas"), + ("Pacific/Midway", "Pacific/Midway"), + ("Pacific/Nauru", "Pacific/Nauru"), + ("Pacific/Niue", "Pacific/Niue"), + ("Pacific/Norfolk", "Pacific/Norfolk"), + ("Pacific/Noumea", "Pacific/Noumea"), + ("Pacific/Pago_Pago", "Pacific/Pago_Pago"), + ("Pacific/Palau", "Pacific/Palau"), + ("Pacific/Pitcairn", "Pacific/Pitcairn"), + ("Pacific/Pohnpei", "Pacific/Pohnpei"), + ("Pacific/Port_Moresby", "Pacific/Port_Moresby"), + ("Pacific/Rarotonga", "Pacific/Rarotonga"), + ("Pacific/Saipan", "Pacific/Saipan"), + ("Pacific/Tahiti", "Pacific/Tahiti"), + ("Pacific/Tarawa", "Pacific/Tarawa"), + ("Pacific/Tongatapu", "Pacific/Tongatapu"), + ("Pacific/Wake", "Pacific/Wake"), + ("Pacific/Wallis", "Pacific/Wallis"), + ("US/Alaska", "US/Alaska"), + ("US/Arizona", "US/Arizona"), + ("US/Central", "US/Central"), + ("US/Eastern", "US/Eastern"), + ("US/Hawaii", "US/Hawaii"), + ("US/Mountain", "US/Mountain"), + ("US/Pacific", "US/Pacific"), + ("UTC", "UTC"), + ], + default="UTC", + max_length=80, + null=True, + ), + ) ] diff --git a/brutaldon/migrations/0020_auto_20190127_2159.py b/brutaldon/migrations/0020_auto_20190127_2159.py index 53846bb..f543e7e 100644 --- a/brutaldon/migrations/0020_auto_20190127_2159.py +++ b/brutaldon/migrations/0020_auto_20190127_2159.py @@ -5,14 +5,12 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0019_auto_20190124_0813'), - ] + dependencies = [("brutaldon", "0019_auto_20190124_0813")] operations = [ migrations.AlterField( - model_name='account', - name='note_seen', + model_name="account", + name="note_seen", field=models.CharField(blank=True, max_length=128, null=True), - ), + ) ] diff --git a/brutaldon/migrations/0021_client_version.py b/brutaldon/migrations/0021_client_version.py index ba27dad..fefe592 100644 --- a/brutaldon/migrations/0021_client_version.py +++ b/brutaldon/migrations/0021_client_version.py @@ -5,14 +5,12 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0020_auto_20190127_2159'), - ] + dependencies = [("brutaldon", "0020_auto_20190127_2159")] operations = [ migrations.AddField( - model_name='client', - name='version', - field=models.CharField(default='1.0', max_length=8), - ), + model_name="client", + name="version", + field=models.CharField(default="1.0", max_length=8), + ) ] diff --git a/brutaldon/migrations/0022_auto_20190506_0938.py b/brutaldon/migrations/0022_auto_20190506_0938.py index 1b4b44f..4eb7dac 100644 --- a/brutaldon/migrations/0022_auto_20190506_0938.py +++ b/brutaldon/migrations/0022_auto_20190506_0938.py @@ -5,14 +5,12 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('brutaldon', '0021_client_version'), - ] + dependencies = [("brutaldon", "0021_client_version")] operations = [ migrations.AlterField( - model_name='client', - name='version', - field=models.CharField(default='1.0', max_length=80), - ), + model_name="client", + name="version", + field=models.CharField(default="1.0", max_length=80), + ) ] diff --git a/brutaldon/models.py b/brutaldon/models.py index 577b52f..b63f4fe 100644 --- a/brutaldon/models.py +++ b/brutaldon/models.py @@ -5,8 +5,9 @@ from pytz import common_timezones timezones = [(tz, tz) for tz in common_timezones] + class Client(models.Model): - name = models.CharField(default = "brutaldon", max_length=80) + name = models.CharField(default="brutaldon", max_length=80) api_base_id = models.URLField(default="https://mastodon.social") version = models.CharField(default="1.0", max_length=80) client_id = models.CharField(null=True, blank=True, max_length=2048) @@ -15,42 +16,62 @@ class Client(models.Model): def __str__(self): return self.name + ": " + self.api_base_id + class Theme(models.Model): name = models.CharField(max_length=80, unique=True) prefix = models.CharField(max_length=40, null=True, default="default") - main_css = models.CharField(max_length=1024, blank=True, null=True, - default="css/fullbrutalism.css") + main_css = models.CharField( + max_length=1024, blank=True, null=True, default="css/fullbrutalism.css" + ) tweaks_css = models.CharField(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.CASCADE, null=False, default=1) filter_replies = models.BooleanField(default=False) filter_boosts = models.BooleanField(default=False) - timezone = models.CharField(max_length=80, blank=True, null=True, - choices=timezones, default='UTC') - no_javascript = models.BooleanField(default=False, - help_text=_("""Disable all JavaScript. Overrides all other JavaScript options.""")) - notifications = models.BooleanField(default=True, - help_text=_("""Display live notifications in header.""")) - click_to_load = models.BooleanField(default=False, - help_text=_("""Click to load more toots in the same page, rather than using pagination.""")) - lightbox = models.BooleanField(default=False, - help_text=_("""Use a JavaScript lightbox to display media.""")) - poll_frequency = models.IntegerField(default=300, - help_text=_("""Number of seconds to wait between checking notifications. Default: 300""")) - filter_notifications = models.BooleanField(default=False, - help_text=_("""Exclude boosts and favs from your notifications.""")) + timezone = models.CharField( + max_length=80, blank=True, null=True, choices=timezones, default="UTC" + ) + no_javascript = models.BooleanField( + default=False, + help_text=_( + """Disable all JavaScript. Overrides all other JavaScript options.""" + ), + ) + notifications = models.BooleanField( + default=True, help_text=_("""Display live notifications in header.""") + ) + click_to_load = models.BooleanField( + default=False, + help_text=_( + """Click to load more toots in the same page, rather than using pagination.""" + ), + ) + lightbox = models.BooleanField( + default=False, help_text=_("""Use a JavaScript lightbox to display media.""") + ) + poll_frequency = models.IntegerField( + default=300, + help_text=_( + """Number of seconds to wait between checking notifications. Default: 300""" + ), + ) + filter_notifications = models.BooleanField( + default=False, + help_text=_("""Exclude boosts and favs from your notifications."""), + ) + class Account(models.Model): username = models.EmailField(unique=True) email = models.EmailField(null=True, blank=True) django_user = models.ForeignKey(settings.AUTH_USER_MODEL, models.CASCADE, null=True) access_token = models.CharField(null=True, blank=True, max_length=2048) - client= models.ForeignKey(Client, models.SET_NULL, null=True) + client = models.ForeignKey(Client, models.SET_NULL, null=True) preferences = models.ForeignKey(Preference, models.SET_NULL, null=True) note_seen = models.CharField(null=True, blank=True, max_length=128) - diff --git a/brutaldon/settings.py b/brutaldon/settings.py index 166a58d..77854a9 100644 --- a/brutaldon/settings.py +++ b/brutaldon/settings.py @@ -20,7 +20,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '6lq9!52j^)=m89))umaphx9ac%)b$k^gs%x1rkk^v^$u9zjz$@' +SECRET_KEY = "6lq9!52j^)=m89))umaphx9ac%)b$k^gs%x1rkk^v^$u9zjz$@" # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True @@ -31,57 +31,57 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'widget_tweaks', - 'sanitizer', - 'django.contrib.humanize', - 'brutaldon', + "django.contrib.admin", + "django.contrib.auth", + "django.contrib.contenttypes", + "django.contrib.sessions", + "django.contrib.messages", + "django.contrib.staticfiles", + "widget_tweaks", + "sanitizer", + "django.contrib.humanize", + "brutaldon", ] MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'brutaldon.middleware.timezone.TimezoneMiddleware', + "django.middleware.security.SecurityMiddleware", + "django.contrib.sessions.middleware.SessionMiddleware", + "django.middleware.common.CommonMiddleware", + "django.middleware.csrf.CsrfViewMiddleware", + "django.contrib.auth.middleware.AuthenticationMiddleware", + "django.contrib.messages.middleware.MessageMiddleware", + "django.middleware.clickjacking.XFrameOptionsMiddleware", + "brutaldon.middleware.timezone.TimezoneMiddleware", ] -ROOT_URLCONF = 'brutaldon.urls' +ROOT_URLCONF = "brutaldon.urls" TEMPLATES = [ { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], + "BACKEND": "django.template.backends.django.DjangoTemplates", + "DIRS": [], + "APP_DIRS": True, + "OPTIONS": { + "context_processors": [ + "django.template.context_processors.debug", + "django.template.context_processors.request", + "django.contrib.auth.context_processors.auth", + "django.contrib.messages.context_processors.messages", + ] }, - }, + } ] -WSGI_APPLICATION = 'brutaldon.wsgi.application' +WSGI_APPLICATION = "brutaldon.wsgi.application" # Database # https://docs.djangoproject.com/en/2.0/ref/settings/#databases DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + "default": { + "ENGINE": "django.db.backends.sqlite3", + "NAME": os.path.join(BASE_DIR, "db.sqlite3"), } } @@ -91,78 +91,68 @@ DATABASES = { AUTH_PASSWORD_VALIDATORS = [ { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator" }, + {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"}, + {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"}, + {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"}, ] LOGGING = { - 'version': 1, - 'disable_existing_loggers': False, - 'filters': { - 'require_debug_false': { - '()': 'django.utils.log.RequireDebugFalse', - }, - 'require_debug_true': { - '()': 'django.utils.log.RequireDebugTrue', - }, - }, - 'formatters': { - 'django.server': { - '()': 'django.utils.log.ServerFormatter', - 'format': '[%(server_time)s] %(message)s', - } - }, - 'handlers': { - 'console': { - 'level': 'INFO', - 'filters': ['require_debug_true'], - 'class': 'logging.StreamHandler', - }, - 'console_debug_false': { - 'level': 'ERROR', - 'filters': ['require_debug_false'], - 'class': 'logging.StreamHandler', - }, - 'django.server': { - 'level': 'INFO', - 'class': 'logging.StreamHandler', - 'formatter': 'django.server', - }, - 'mail_admins': { - 'level': 'ERROR', - 'filters': ['require_debug_false'], - 'class': 'django.utils.log.AdminEmailHandler' - } - }, - 'loggers': { - 'django': { - 'handlers': ['console', 'console_debug_false', 'mail_admins'], - 'level': 'INFO', - }, - 'django.server': { - 'handlers': ['django.server'], - 'level': 'INFO', - 'propagate': False, - } - } + "version": 1, + "disable_existing_loggers": False, + "filters": { + "require_debug_false": {"()": "django.utils.log.RequireDebugFalse"}, + "require_debug_true": {"()": "django.utils.log.RequireDebugTrue"}, + }, + "formatters": { + "django.server": { + "()": "django.utils.log.ServerFormatter", + "format": "[%(server_time)s] %(message)s", + } + }, + "handlers": { + "console": { + "level": "INFO", + "filters": ["require_debug_true"], + "class": "logging.StreamHandler", + }, + "console_debug_false": { + "level": "ERROR", + "filters": ["require_debug_false"], + "class": "logging.StreamHandler", + }, + "django.server": { + "level": "INFO", + "class": "logging.StreamHandler", + "formatter": "django.server", + }, + "mail_admins": { + "level": "ERROR", + "filters": ["require_debug_false"], + "class": "django.utils.log.AdminEmailHandler", + }, + }, + "loggers": { + "django": { + "handlers": ["console", "console_debug_false", "mail_admins"], + "level": "INFO", + }, + "django.server": { + "handlers": ["django.server"], + "level": "INFO", + "propagate": False, + }, + }, } # Internationalization # https://docs.djangoproject.com/en/2.0/topics/i18n/ -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = "en-us" -TIME_ZONE = 'America/New_York' +TIME_ZONE = "America/New_York" USE_I18N = True @@ -174,13 +164,29 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ -STATIC_URL = '/static/' -STATIC_ROOT = os.path.join(BASE_DIR, 'static') +STATIC_URL = "/static/" +STATIC_ROOT = os.path.join(BASE_DIR, "static") # Sanitizer settings -SANITIZER_ALLOWED_TAGS = ['a', 'p', 'img', 'br', 'i', 'strong', 'em', 'pre', 'code', - 'ul', 'li', 'ol', 'blockquote', 'del', 'span', 'u'] -SANITIZER_ALLOWED_ATTRIBUTES = ['href', 'src', 'title', 'alt', 'class', 'lang'] +SANITIZER_ALLOWED_TAGS = [ + "a", + "p", + "img", + "br", + "i", + "strong", + "em", + "pre", + "code", + "ul", + "li", + "ol", + "blockquote", + "del", + "span", + "u", +] +SANITIZER_ALLOWED_ATTRIBUTES = ["href", "src", "title", "alt", "class", "lang"] # File upload settings. # Important: media will not work if you change this. @@ -188,11 +194,10 @@ FILE_UPLOAD_HANDLERS = ["django.core.files.uploadhandler.TemporaryFileUploadHand # Session serialization # Important: whatever you choose has to be able to serialize DateTime, so not JSON. -SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer' +SESSION_SERIALIZER = "django.contrib.sessions.serializers.PickleSerializer" # URL to redirect users to when not logged in -ANONYMOUS_HOME_URL = 'about' +ANONYMOUS_HOME_URL = "about" # Version number displayed on about page BRUTALDON_VERSION = "2.12.1" - diff --git a/brutaldon/templatetags/humanetime.py b/brutaldon/templatetags/humanetime.py index 2b86294..48977f4 100644 --- a/brutaldon/templatetags/humanetime.py +++ b/brutaldon/templatetags/humanetime.py @@ -6,9 +6,10 @@ from django import template register = template.Library() + @register.filter(is_safe=True) def humane_time(arg): - '''Returns a time string that is humane but not relative (unlike Django's humanetime) + """Returns a time string that is humane but not relative (unlike Django's humanetime) For times less than 6 hours ago: display date and time to the minute. For times less than 12 hours ago: display date and time to the hour. @@ -27,7 +28,7 @@ def humane_time(arg): FIXME: work out how best to make these strings translatable - ''' + """ now = django_now() arg = localtime(arg) diff = now - arg @@ -42,13 +43,14 @@ def humane_time(arg): return arg.strftime("%a, %b %d, %Y around %I %p") + utc elif diff < timedelta(hours=36): return arg.strftime("%a, %b %d, %Y in the ") + time_of_day(arg.hour) + utc - elif diff < timedelta(days=6*28): + elif diff < timedelta(days=6 * 28): return arg.strftime("%b %d, %Y") - elif diff < timedelta(days=10*365): + elif diff < timedelta(days=10 * 365): return arg.strftime("%b, %Y") else: return arg.strftime("%Y") + def time_of_day(hour): """Return a description of what time of day an hour is. diff --git a/brutaldon/templatetags/taglinks.py b/brutaldon/templatetags/taglinks.py index afe2ac7..a3dba9a 100644 --- a/brutaldon/templatetags/taglinks.py +++ b/brutaldon/templatetags/taglinks.py @@ -7,79 +7,88 @@ from pdb import set_trace register = template.Library() + @register.filter def pdb(element): set_trace() return element + @register.filter def relink_tags(value): - '''Treat the text as html, and replace tag links with app-internal tag links + """Treat the text as html, and replace tag links with app-internal tag links Currently, this only works for tags in toots coming from Mastodon servers, not necessarily GNU Social, Pleroma, or other fediverse servers, because it relies on the markup that Mastodon puts on tags. FIXME: handle arbitrary tag links - ''' - value = value.replace(''', "'") - soup = BeautifulSoup(value, 'html.parser') - for link in soup.find_all('a', class_='hashtag'): + """ + value = value.replace("'", "'") + soup = BeautifulSoup(value, "html.parser") + for link in soup.find_all("a", class_="hashtag"): try: - link['href'] = reverse('tag', args=[link.span.string]) + link["href"] = reverse("tag", args=[link.span.string]) except: continue - return soup.decode(formatter='html') + return soup.decode(formatter="html") + @register.filter def relink_mentions(value): - '''Treat the text as html, and replace mention links with app-internal links + """Treat the text as html, and replace mention links with app-internal links Currently, this only works for mentions in toots coming from Mastodon servers, not necessarily GNU Social, Pleroma, or other fediverse servers, because it relies on the markup that Mastodon puts on mentions. FIXME: handle arbitrary mention links - ''' - value = value.replace(''', "'") - soup = BeautifulSoup(value, 'html.parser') - for link in soup.find_all('a', class_='mention'): - parsed = parse.urlparse(link['href']) + """ + value = value.replace("'", "'") + soup = BeautifulSoup(value, "html.parser") + for link in soup.find_all("a", class_="mention"): + parsed = parse.urlparse(link["href"]) try: instance = parsed[1] user = parsed[2][2:] - link['href'] = reverse('user', args=[user+'@'+instance]) + link["href"] = reverse("user", args=[user + "@" + instance]) except: continue - return soup.decode(formatter='html') + return soup.decode(formatter="html") + @register.filter def relink_toot(value): return relink_tags(relink_mentions(value)) + @register.filter def localuser(value): - '''Convert a remote user link to local''' + """Convert a remote user link to local""" try: parsed = parse.urlparse(value) instance = parsed[1] - if parsed[2].startswith('/@'): + if parsed[2].startswith("/@"): user = parsed[2][2:] else: - user = parsed[2].split('/')[-1] - local = reverse('user', args=[user+'@'+instance]) + user = parsed[2].split("/")[-1] + local = reverse("user", args=[user + "@" + instance]) except: local = value return local + @register.filter def fix_emojos(value, emojos): - '''Replace instances of recognized custom emoji :shortcodes: in value with image link tags - ''' + """Replace instances of recognized custom emoji :shortcodes: in value with image link tags + """ for emojo in emojos: try: - value = value.replace(":%(shortcode)s:" % emojo, - ':%(shortcode)s:' % emojo) + value = value.replace( + ":%(shortcode)s:" % emojo, + ':%(shortcode)s:' + % emojo, + ) except: continue return value diff --git a/brutaldon/urls.py b/brutaldon/urls.py index 0cfe5ad..dea6ac7 100644 --- a/brutaldon/urls.py +++ b/brutaldon/urls.py @@ -18,55 +18,55 @@ from django.urls import path from brutaldon import views urlpatterns = [ - path('admin/', admin.site.urls), - path('about', views.about, name='about'), - path('privacy', views.privacy, name='privacy'), - path('home/next/', views.home, name='home_next'), - path('home/prev/', views.home, name='home_prev'), - path('home', views.home, name='home'), - path('login', views.login, name="login"), - path('oldlogin', views.old_login, name="oldlogin"), - path('logout', views.logout, name='logout'), - path('oauth_callback', views.oauth_callback, name="oauth_callback"), - path('error', views.error, name='error'), - path('local', views.local, name='local'), - path('local/next/', views.local, name='local_next'), - path('local/prev/', views.local, name='local_prev'), - path('fed', views.fed, name='fed'), - path('fed/next/', views.fed, name='fed_next'), - path('fed/prev/', views.fed, name='fed_prev'), - path('note', views.note, name='note'), - path('note/next', views.note, name='note_next'), - path('note/prev/', views.note, name='note_prev'), - path('notes_count', views.notes_count, name='notes_count'), - path('user_search', views.user_search, name='user_search'), - path('settings', views.settings, name='settings'), - path('thread/', views.thread, name='thread'), - path('tags/', views.tag, name='tag'), - path('user/', views.home, name='user_bad'), - path('user/', views.user, name='user'), - path('user//next/', views.user, name='user_next'), - path('user//prev/', views.user, name='user_prev'), - path('toot/', views.toot, name='toot'), - path('toot', views.toot, name="toot"), - path('reply/', views.reply, name='reply'), - path('redraft/', views.redraft, name='redraft'), - path('fav/', views.fav, name='fav'), - path('boost/', views.boost, name='boost'), - path('delete/', views.delete, name='delete'), - path('follow/', views.follow, name='follow'), - path('block/', views.block, name='block'), - path('mute/', views.mute, name='mute'), - path('search', views.search, name='search'), - path('search_results', views.search_results, name='search_results'), - path('emoji', views.emoji_reference, name='emoji'), - path('filters/list', views.list_filters, name='list_filters'), - path('filters/create', views.create_filter, name='create_filter'), - path('filters/delete/', views.delete_filter, name='delete_filter'), - path('filters/edit/', views.edit_filter, name='edit_filter'), - path('requests/', views.follow_requests, name='follow_requests'), - path('requests/', views.follow_requests, name='follow_requests'), - path('accounts/', views.accounts, name='accounts'), - path('accounts/', views.accounts, name='accounts'), - path('', views.home, name=''), + path("admin/", admin.site.urls), + path("about", views.about, name="about"), + path("privacy", views.privacy, name="privacy"), + path("home/next/", views.home, name="home_next"), + path("home/prev/", views.home, name="home_prev"), + path("home", views.home, name="home"), + path("login", views.login, name="login"), + path("oldlogin", views.old_login, name="oldlogin"), + path("logout", views.logout, name="logout"), + path("oauth_callback", views.oauth_callback, name="oauth_callback"), + path("error", views.error, name="error"), + path("local", views.local, name="local"), + path("local/next/", views.local, name="local_next"), + path("local/prev/", views.local, name="local_prev"), + path("fed", views.fed, name="fed"), + path("fed/next/", views.fed, name="fed_next"), + path("fed/prev/", views.fed, name="fed_prev"), + path("note", views.note, name="note"), + path("note/next", views.note, name="note_next"), + path("note/prev/", views.note, name="note_prev"), + path("notes_count", views.notes_count, name="notes_count"), + path("user_search", views.user_search, name="user_search"), + path("settings", views.settings, name="settings"), + path("thread/", views.thread, name="thread"), + path("tags/", views.tag, name="tag"), + path("user/", views.home, name="user_bad"), + path("user/", views.user, name="user"), + path("user//next/", views.user, name="user_next"), + path("user//prev/", views.user, name="user_prev"), + path("toot/", views.toot, name="toot"), + path("toot", views.toot, name="toot"), + path("reply/", views.reply, name="reply"), + path("redraft/", views.redraft, name="redraft"), + path("fav/", views.fav, name="fav"), + path("boost/", views.boost, name="boost"), + path("delete/", views.delete, name="delete"), + path("follow/", views.follow, name="follow"), + path("block/", views.block, name="block"), + path("mute/", views.mute, name="mute"), + path("search", views.search, name="search"), + path("search_results", views.search_results, name="search_results"), + path("emoji", views.emoji_reference, name="emoji"), + path("filters/list", views.list_filters, name="list_filters"), + path("filters/create", views.create_filter, name="create_filter"), + path("filters/delete/", views.delete_filter, name="delete_filter"), + path("filters/edit/", views.edit_filter, name="edit_filter"), + path("requests/", views.follow_requests, name="follow_requests"), + path("requests/", views.follow_requests, name="follow_requests"), + path("accounts/", views.accounts, name="accounts"), + path("accounts/", views.accounts, name="accounts"), + path("", views.home, name=""), ] diff --git a/brutaldon/views.py b/brutaldon/views.py index 21a9eb0..d70ad73 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -7,49 +7,73 @@ from django.views.decorators.cache import never_cache, cache_page from django.urls import reverse from django.core.files.uploadhandler import TemporaryFileUploadHandler from django.utils.translation import gettext as _ -from brutaldon.forms import LoginForm, OAuthLoginForm, PreferencesForm, PostForm, FilterForm +from brutaldon.forms import ( + LoginForm, + OAuthLoginForm, + PreferencesForm, + PostForm, + FilterForm, +) from brutaldon.models import Client, Account, Preference, Theme -from mastodon import Mastodon, AttribAccessDict, MastodonError, MastodonAPIError, MastodonNotFoundError +from mastodon import ( + Mastodon, + AttribAccessDict, + MastodonError, + MastodonAPIError, + MastodonNotFoundError, +) from urllib import parse from pdb import set_trace from inscriptis import get_text from time import sleep import re + class NotLoggedInException(Exception): pass + ### ### Utility functions ### + def get_usercontext(request): if is_logged_in(request): try: - client = Client.objects.get(api_base_id=request.session['active_instance']) - user = Account.objects.get(username=request.session['active_username']) - except (Client.DoesNotExist, Client.MultipleObjectsReturned, - Account.DoesNotExist, Account.MultipleObjectsReturned): + client = Client.objects.get(api_base_id=request.session["active_instance"]) + user = Account.objects.get(username=request.session["active_username"]) + except ( + Client.DoesNotExist, + Client.MultipleObjectsReturned, + Account.DoesNotExist, + Account.MultipleObjectsReturned, + ): raise NotLoggedInException() mastodon = Mastodon( - client_id = client.client_id, - client_secret = client.client_secret, - access_token = user.access_token, - api_base_url = client.api_base_id, - ratelimit_method="throw") + client_id=client.client_id, + client_secret=client.client_secret, + access_token=user.access_token, + api_base_url=client.api_base_id, + ratelimit_method="throw", + ) return user, mastodon else: return None, None + def is_logged_in(request): - return request.session.has_key('active_user') + return request.session.has_key("active_user") + def _notes_count(account, mastodon): if not mastodon: return "" notes = mastodon.notifications(limit=40) if account.preferences.filter_notifications: - notes = [ note for note in notes if note.type == 'mention' or note.type == 'follow'] + notes = [ + note for note in notes if note.type == "mention" or note.type == "follow" + ] for index, item in enumerate(notes): if account.note_seen is None: account.note_seen = "0" @@ -60,6 +84,7 @@ def _notes_count(account, mastodon): index = "40+" return str(index) + def br_login_required(function=None, home_url=None, redirect_field_name=None): """Check that the user is logged in to a Mastodon instance. @@ -97,11 +122,12 @@ def br_login_required(function=None, home_url=None, redirect_field_name=None): else: return _dec(function) + def user_search(request): check = request.POST.get("status", "").split() if len(check): check = check[-1] - if len(check) > 1 and check.startswith('@'): + if len(check) > 1 and check.startswith("@"): check = check[1:] return user_search_inner(request, check) else: @@ -110,28 +136,44 @@ def user_search(request): check = " " return HttpResponse(check) + def user_search_inner(request, query): account, mastodon = get_usercontext(request) results = mastodon.search(query) - return render(request, 'intercooler/users.html', - {'active_users': "\n".join([ user.acct for user in results.accounts ]), - 'preferences': account.preferences }) + return render( + request, + "intercooler/users.html", + { + "active_users": "\n".join([user.acct for user in results.accounts]), + "preferences": account.preferences, + }, + ) -def timeline(request, timeline='home', timeline_name='Home', max_id=None, min_id=None, filter_context='home'): + +def timeline( + request, + timeline="home", + timeline_name="Home", + max_id=None, + min_id=None, + filter_context="home", +): account, mastodon = get_usercontext(request) data = mastodon.timeline(timeline, limit=40, max_id=max_id, min_id=min_id) - form = PostForm(initial={'visibility': request.session['active_user'].source.privacy}) + form = PostForm( + initial={"visibility": request.session["active_user"].source.privacy} + ) try: prev = data[0]._pagination_prev - if len(mastodon.timeline(min_id=prev['min_id'])) == 0: + if len(mastodon.timeline(min_id=prev["min_id"])) == 0: prev = None else: - prev['min_id'] = data[0].id + prev["min_id"] = data[0].id except (IndexError, AttributeError, KeyError): prev = None try: next = data[-1]._pagination_next - next['max_id'] = data[-1].id + next["max_id"] = data[-1].id except (IndexError, AttributeError, KeyError): next = None @@ -147,40 +189,55 @@ def timeline(request, timeline='home', timeline_name='Home', max_id=None, min_id # Apply filters data = [x for x in data if not toot_matches_filters(x, filters)] - return render(request, 'main/%s_timeline.html' % timeline, - {'toots': data, 'form': form, 'timeline': timeline, - 'timeline_name': timeline_name, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences, - 'notifications': notifications, - 'prev': prev, 'next': next}) + return render( + request, + "main/%s_timeline.html" % timeline, + { + "toots": data, + "form": form, + "timeline": timeline, + "timeline_name": timeline_name, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + "notifications": notifications, + "prev": prev, + "next": next, + }, + ) + def get_filters(mastodon, context=None): try: if context: - return [ff for ff in mastodon.filters() if context in ff.context] + return [ff for ff in mastodon.filters() if context in ff.context] else: return mastodon.filters() except: return [] + def toot_matches_filters(toot, filters=[]): if not filters: return False + def maybe_rewrite_filter(filter): if filter.whole_word: return f"\\b{filter.phrase}\\b" else: return filter.phrase + phrases = [maybe_rewrite_filter(x) for x in filters] pattern = "|".join(phrases) try: - if toot.get('type') in ['reblog', 'favourite']: - return re.search(pattern, toot.status.spoiler_text + toot.status.content, re.I) + if toot.get("type") in ["reblog", "favourite"]: + return re.search( + pattern, toot.status.spoiler_text + toot.status.content, re.I + ) return re.search(pattern, toot.spoiler_text + toot.content, re.I) except: return False + def switch_accounts(request, new_account): """Try to switch accounts to the specified account, if it is already in the user's session. Sets up new session variables. Returns boolean success @@ -189,16 +246,17 @@ def switch_accounts(request, new_account): if not accounts_dict or not new_account in accounts_dict.keys(): return False try: - account = Account.objects.get(id=accounts_dict[new_account]['account_id']) + account = Account.objects.get(id=accounts_dict[new_account]["account_id"]) if account.username != new_account: return False except Account.DoesNotExist: return False - request.session['active_user'] = accounts_dict[new_account]['user'] - request.session['active_username'] = account.username - request.session['active_instance'] = account.client.api_base_id + request.session["active_user"] = accounts_dict[new_account]["user"] + request.session["active_username"] = account.username + request.session["active_instance"] = account.client.api_base_id return True + def forget_account(request, account_name): """Forget that you were logged into an account. If it's the last one, log out entirely. Sets up session variables. Returns a redirect to the correct @@ -227,24 +285,33 @@ def forget_account(request, account_name): ### View functions ### + def notes_count(request): account, mastodon = get_usercontext(request) count = _notes_count(account, mastodon) - return render(request, 'intercooler/notes.html', - {'notifications': count, - 'preferences': account.preferences }) + return render( + request, + "intercooler/notes.html", + {"notifications": count, "preferences": account.preferences}, + ) + @br_login_required def home(request, next=None, prev=None): - return timeline(request, 'home', 'Home', max_id=next, min_id=prev, filter_context='home') + return timeline( + request, "home", "Home", max_id=next, min_id=prev, filter_context="home" + ) + @br_login_required -def local(request, next=None, prev=None, filter_context='public'): - return timeline(request, 'local', 'Local', max_id=next, min_id=prev) +def local(request, next=None, prev=None, filter_context="public"): + return timeline(request, "local", "Local", max_id=next, min_id=prev) + @br_login_required -def fed(request, next=None, prev=None, filter_context='public'): - return timeline(request, 'public', 'Federated', max_id=next, min_id=prev) +def fed(request, next=None, prev=None, filter_context="public"): + return timeline(request, "public", "Federated", max_id=next, min_id=prev) + @br_login_required def tag(request, tag): @@ -254,11 +321,18 @@ def tag(request, tag): return redirect(login) data = mastodon.timeline_hashtag(tag) notifications = _notes_count(account, mastodon) - return render(request, 'main/timeline.html', - {'toots': data, 'timeline_name': '#'+tag, - 'own_acct': request.session['active_user'], - 'notifications': notifications, - 'preferences': account.preferences}) + return render( + request, + "main/timeline.html", + { + "toots": data, + "timeline_name": "#" + tag, + "own_acct": request.session["active_user"], + "notifications": notifications, + "preferences": account.preferences, + }, + ) + @never_cache def login(request): @@ -268,92 +342,108 @@ def login(request): # oauth_after_login view saves credential in session, then redirects to home. if request.method == "GET": form = OAuthLoginForm() - return render(request, 'setup/login-oauth.html', {'form': form}) + return render(request, "setup/login-oauth.html", {"form": form}) elif request.method == "POST": form = OAuthLoginForm(request.POST) - redirect_uris = request.build_absolute_uri(reverse('oauth_callback')) + redirect_uris = request.build_absolute_uri(reverse("oauth_callback")) if form.is_valid(): - api_base_url = form.cleaned_data['instance'] + api_base_url = form.cleaned_data["instance"] tmp_base = parse.urlparse(api_base_url.lower()) - if tmp_base.netloc == '': - api_base_url = parse.urlunparse(('https', tmp_base.path, - '','','','')) - request.session['active_instance_hostname'] = tmp_base.path + if tmp_base.netloc == "": + api_base_url = parse.urlunparse( + ("https", tmp_base.path, "", "", "", "") + ) + request.session["active_instance_hostname"] = tmp_base.path else: api_base_url = api_base_url.lower() - request.session['active_instance_hostname'] = tmp_base.netloc + request.session["active_instance_hostname"] = tmp_base.netloc - request.session['active_instance'] = api_base_url + request.session["active_instance"] = api_base_url try: client = Client.objects.get(api_base_id=api_base_url) except (Client.DoesNotExist, Client.MultipleObjectsReturned): - (client_id, client_secret) = Mastodon.create_app('brutaldon', - api_base_url=api_base_url, - redirect_uris=redirect_uris, - scopes=['read', 'write', 'follow']) + (client_id, client_secret) = Mastodon.create_app( + "brutaldon", + api_base_url=api_base_url, + redirect_uris=redirect_uris, + scopes=["read", "write", "follow"], + ) client = Client( - api_base_id = api_base_url, + api_base_id=api_base_url, client_id=client_id, - client_secret = client_secret) + client_secret=client_secret, + ) client.save() - request.session['active_client_id'] = client.client_id - request.session['active_client_secret'] = client.client_secret + request.session["active_client_id"] = client.client_id + request.session["active_client_secret"] = client.client_secret mastodon = Mastodon( - client_id = client.client_id, - client_secret = client.client_secret, - api_base_url = api_base_url) + client_id=client.client_id, + client_secret=client.client_secret, + api_base_url=api_base_url, + ) client.version = mastodon.instance().get("version") client.save() - return redirect(mastodon.auth_request_url(redirect_uris=redirect_uris, - scopes=['read', 'write', 'follow'])) + return redirect( + mastodon.auth_request_url( + redirect_uris=redirect_uris, scopes=["read", "write", "follow"] + ) + ) else: - return render(request, 'setup/login.html', {'form': form}) + return render(request, "setup/login.html", {"form": form}) else: return redirect(login) + @never_cache def oauth_callback(request): - code = request.GET.get('code', '') - mastodon = Mastodon(client_id=request.session['active_client_id'], - client_secret=request.session['active_client_secret'], - api_base_url=request.session['active_instance']) - redirect_uri = request.build_absolute_uri(reverse('oauth_callback')) - access_token = mastodon.log_in(code=code, - redirect_uri=redirect_uri, - scopes=['read', 'write', 'follow']) - request.session['access_token'] = access_token + code = request.GET.get("code", "") + mastodon = Mastodon( + client_id=request.session["active_client_id"], + client_secret=request.session["active_client_secret"], + api_base_url=request.session["active_instance"], + ) + redirect_uri = request.build_absolute_uri(reverse("oauth_callback")) + access_token = mastodon.log_in( + code=code, redirect_uri=redirect_uri, scopes=["read", "write", "follow"] + ) + request.session["access_token"] = access_token user = mastodon.account_verify_credentials() try: - account = Account.objects.get(username=user.username + '@' + - request.session['active_instance_hostname']) + account = Account.objects.get( + username=user.username + "@" + request.session["active_instance_hostname"] + ) account.access_token = access_token if not account.preferences: - preferences = Preference(theme = Theme.objects.get(id=1)) + preferences = Preference(theme=Theme.objects.get(id=1)) preferences.save() account.preferences = preferences else: - request.session['timezone'] = account.preferences.timezone + request.session["timezone"] = account.preferences.timezone account.save() except (Account.DoesNotExist, Account.MultipleObjectsReturned): - preferences = Preference(theme = Theme.objects.get(id=1)) + preferences = Preference(theme=Theme.objects.get(id=1)) preferences.save() - account = Account(username=user.username + '@' + request.session['active_instance_hostname'], - access_token = access_token, - client = Client.objects.get(api_base_id=request.session['active_instance']), - preferences = preferences) + account = Account( + username=user.username + "@" + request.session["active_instance_hostname"], + access_token=access_token, + client=Client.objects.get(api_base_id=request.session["active_instance"]), + preferences=preferences, + ) account.save() - request.session['active_user'] = user - request.session['active_username'] = user.username + '@' + request.session['active_instance_hostname'] + request.session["active_user"] = user + request.session["active_username"] = ( + user.username + "@" + request.session["active_instance_hostname"] + ) - accounts_dict = request.session.get('accounts_dict') + accounts_dict = request.session.get("accounts_dict") if not accounts_dict: accounts_dict = {} - accounts_dict[account.username] = { 'account_id': account.id, 'user': user } - request.session['accounts_dict'] = accounts_dict + accounts_dict[account.username] = {"account_id": account.id, "user": user} + request.session["accounts_dict"] = accounts_dict return redirect(home) @@ -362,90 +452,104 @@ def oauth_callback(request): def old_login(request): if request.method == "GET": form = LoginForm() - return render(request, 'setup/login.html', {'form': form}) + return render(request, "setup/login.html", {"form": form}) elif request.method == "POST": form = LoginForm(request.POST) if form.is_valid(): - api_base_url = form.cleaned_data['instance'] + api_base_url = form.cleaned_data["instance"] tmp_base = parse.urlparse(api_base_url.lower()) - if tmp_base.netloc == '': - api_base_url = parse.urlunparse(('https', tmp_base.path, - '','','','')) - request.session['active_instance_hostname'] = tmp_base.path + if tmp_base.netloc == "": + api_base_url = parse.urlunparse( + ("https", tmp_base.path, "", "", "", "") + ) + request.session["active_instance_hostname"] = tmp_base.path else: api_base_url = api_base_url.lower() - request.session['active_instance_hostname'] = tmp_base.netloc + request.session["active_instance_hostname"] = tmp_base.netloc - request.session['active_instance'] = api_base_url - email = form.cleaned_data['email'] - password = form.cleaned_data['password'] + request.session["active_instance"] = api_base_url + email = form.cleaned_data["email"] + password = form.cleaned_data["password"] try: client = Client.objects.get(api_base_id=api_base_url) except (Client.DoesNotExist, Client.MultipleObjectsReturned): - (client_id, client_secret) = Mastodon.create_app('brutaldon', - api_base_url=api_base_url, - scopes=['read', 'write', 'follow']) + (client_id, client_secret) = Mastodon.create_app( + "brutaldon", + api_base_url=api_base_url, + scopes=["read", "write", "follow"], + ) client = Client( - api_base_id = api_base_url, + api_base_id=api_base_url, client_id=client_id, - client_secret = client_secret) + client_secret=client_secret, + ) client.save() mastodon = Mastodon( - client_id = client.client_id, - client_secret = client.client_secret, - api_base_url = api_base_url) + client_id=client.client_id, + client_secret=client.client_secret, + api_base_url=api_base_url, + ) client.version = mastodon.instance().get("version") client.save() try: account = Account.objects.get(email=email, client_id=client.id) except (Account.DoesNotExist, Account.MultipleObjectsReturned): - preferences = Preference(theme = Theme.objects.get(id=1)) + preferences = Preference(theme=Theme.objects.get(id=1)) preferences.save() account = Account( - email = email, - access_token = "", - client = client, - preferences = preferences) + email=email, access_token="", client=client, preferences=preferences + ) try: - access_token = mastodon.log_in(email, - password, - scopes=['read', 'write', 'follow']) + access_token = mastodon.log_in( + email, password, scopes=["read", "write", "follow"] + ) account.access_token = access_token user = mastodon.account_verify_credentials() - request.session['active_user'] = user - request.session['active_username'] = user.username + '@' + request.session['active_instance_hostname'] - account.username = request.session['active_username'] - request.session['timezone'] = account.preferences.timezone; + request.session["active_user"] = user + request.session["active_username"] = ( + user.username + "@" + request.session["active_instance_hostname"] + ) + account.username = request.session["active_username"] + request.session["timezone"] = account.preferences.timezone - accounts_dict = request.session.get('accounts_dict') + accounts_dict = request.session.get("accounts_dict") if not accounts_dict: accounts_dict = {} - accounts_dict[account.username] = { 'account_id': account.id, 'user': user } - request.session['accounts_dict'] = accounts_dict + accounts_dict[account.username] = { + "account_id": account.id, + "user": user, + } + request.session["accounts_dict"] = accounts_dict account.save() return redirect(home) except IntegrityError: account = Account.objects.get(username=account.username) - accounts_dict[account.username] = { 'account_id': account.id, 'user': user } - request.session['accounts_dict'] = accounts_dict + accounts_dict[account.username] = { + "account_id": account.id, + "user": user, + } + request.session["accounts_dict"] = accounts_dict return redirect(home) except Exception as ex: - form.add_error('', ex) - return render(request, 'setup/login.html', {'form': form}) + form.add_error("", ex) + return render(request, "setup/login.html", {"form": form}) else: - return render(request, 'setup/login.html', {'form': form}) + return render(request, "setup/login.html", {"form": form}) + @never_cache def logout(request): request.session.flush() return redirect(about) + def error(request): - return render(request, 'error.html', { 'error': _("Not logged in yet.")}) + return render(request, "error.html", {"error": _("Not logged in yet.")}) + @br_login_required def note(request, next=None, prev=None): @@ -458,17 +562,19 @@ def note(request, next=None, prev=None): account.save() notes = mastodon.notifications(limit=40, max_id=next, min_id=prev) - filters = get_filters(mastodon, context='notifications') + filters = get_filters(mastodon, context="notifications") if account.preferences.filter_notifications: - notes = [ note for note in notes if note.type == 'mention' or note.type == 'follow'] + notes = [ + note for note in notes if note.type == "mention" or note.type == "follow" + ] # Apply filters notes = [x for x in notes if not toot_matches_filters(x, filters)] try: prev = notes[0]._pagination_prev - if len(mastodon.notifications(min_id=prev['min_id'])) == 0: + if len(mastodon.notifications(min_id=prev["min_id"])) == 0: prev = None except (IndexError, AttributeError, KeyError): prev = None @@ -476,12 +582,20 @@ def note(request, next=None, prev=None): next = notes[-1]._pagination_next except (IndexError, AttributeError, KeyError): next = None - return render(request, 'main/notifications.html', - {'notes': notes,'timeline': 'Notifications', - 'timeline_name': 'Notifications', - 'own_acct': request.session['active_user'], - 'preferences': account.preferences, - 'prev': prev, 'next': next}) + return render( + request, + "main/notifications.html", + { + "notes": notes, + "timeline": "Notifications", + "timeline_name": "Notifications", + "own_acct": request.session["active_user"], + "preferences": account.preferences, + "prev": prev, + "next": next, + }, + ) + @br_login_required def thread(request, id): @@ -492,20 +606,28 @@ def thread(request, id): raise Http404(_("Thread not found; the message may have been deleted.")) toot = mastodon.status(id) notifications = _notes_count(account, mastodon) - filters = get_filters(mastodon, context='thread') + filters = get_filters(mastodon, context="thread") # Apply filters ancestors = [x for x in context.ancestors if not toot_matches_filters(x, filters)] - descendants = [x for x in context.descendants if not toot_matches_filters(x, filters)] + descendants = [ + x for x in context.descendants if not toot_matches_filters(x, filters) + ] + return render( + request, + "main/thread.html", + { + "context": context, + "toot": toot, + "ancestors": ancestors, + "descendants": descendants, + "own_acct": request.session["active_user"], + "notifications": notifications, + "preferences": account.preferences, + }, + ) - return render(request, 'main/thread.html', - {'context': context, 'toot': toot, - 'ancestors': ancestors, - 'descendants': descendants, - 'own_acct': request.session['active_user'], - 'notifications': notifications, - 'preferences': account.preferences}) @br_login_required def user(request, username, prev=None, next=None): @@ -514,10 +636,17 @@ def user(request, username, prev=None, next=None): except NotLoggedInException: return redirect(about) try: - user_dict = [dict for dict in mastodon.account_search(username) - if ((dict.acct == username) or - (dict.acct == username.split('@')[0] and - username.split('@')[1] == account.username.split('@')[1]))][0] + user_dict = [ + dict + for dict in mastodon.account_search(username) + if ( + (dict.acct == username) + or ( + dict.acct == username.split("@")[0] + and username.split("@")[1] == account.username.split("@")[1] + ) + ) + ][0] except (IndexError, AttributeError): raise Http404(_("The user %s could not be found.") % username) data = mastodon.account_statuses(user_dict.id, max_id=next, min_id=prev) @@ -525,8 +654,7 @@ def user(request, username, prev=None, next=None): notifications = _notes_count(account, mastodon) try: prev = data[0]._pagination_prev - if len(mastodon.account_statuses(user_dict.id, - min_id=prev['min_id'])) == 0: + if len(mastodon.account_statuses(user_dict.id, min_id=prev["min_id"])) == 0: prev = None except (IndexError, AttributeError, KeyError): prev = None @@ -534,14 +662,20 @@ def user(request, username, prev=None, next=None): next = data[-1]._pagination_next except (IndexError, AttributeError, KeyError): next = None - return render(request, 'main/user.html', - {'toots': data, - 'user': user_dict, - 'relationship': relationship, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences, - 'notifications': notifications, - 'prev': prev, 'next': next}) + return render( + request, + "main/user.html", + { + "toots": data, + "user": user_dict, + "relationship": relationship, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + "notifications": notifications, + "prev": prev, + "next": next, + }, + ) @never_cache @@ -554,180 +688,268 @@ def settings(request): except NotLoggedInException: return redirect(about) - if request.method == 'POST': + if request.method == "POST": form = PreferencesForm(request.POST) if form.is_valid(): - account.preferences.theme = form.cleaned_data['theme'] - account.preferences.filter_replies = form.cleaned_data['filter_replies'] - account.preferences.filter_boosts = form.cleaned_data['filter_boosts'] - account.preferences.timezone = form.cleaned_data['timezone'] - account.preferences.no_javascript = form.cleaned_data['no_javascript'] - account.preferences.notifications = form.cleaned_data['notifications'] - account.preferences.click_to_load = form.cleaned_data['click_to_load'] - account.preferences.lightbox = form.cleaned_data['lightbox'] - account.preferences.filter_notifications = form.cleaned_data['filter_notifications'] - account.preferences.poll_frequency = form.cleaned_data['poll_frequency'] - request.session['timezone'] = account.preferences.timezone + account.preferences.theme = form.cleaned_data["theme"] + account.preferences.filter_replies = form.cleaned_data["filter_replies"] + account.preferences.filter_boosts = form.cleaned_data["filter_boosts"] + account.preferences.timezone = form.cleaned_data["timezone"] + account.preferences.no_javascript = form.cleaned_data["no_javascript"] + account.preferences.notifications = form.cleaned_data["notifications"] + account.preferences.click_to_load = form.cleaned_data["click_to_load"] + account.preferences.lightbox = form.cleaned_data["lightbox"] + account.preferences.filter_notifications = form.cleaned_data[ + "filter_notifications" + ] + account.preferences.poll_frequency = form.cleaned_data["poll_frequency"] + request.session["timezone"] = account.preferences.timezone account.preferences.save() account.save() # Update this here because it's a handy place to do it. user_info = mastodon.account_verify_credentials() - request.session['active_user'] = user_info - + request.session["active_user"] = user_info return redirect(home) else: - return render(request, 'setup/settings.html', - {'form' : form, 'account': account}) + return render( + request, "setup/settings.html", {"form": form, "account": account} + ) else: - request.session['timezone'] = account.preferences.timezone + request.session["timezone"] = account.preferences.timezone form = PreferencesForm(instance=account.preferences) - return render(request, 'setup/settings.html', - { 'form': form, - 'account': account, - 'preferences': account.preferences}) + return render( + request, + "setup/settings.html", + {"form": form, "account": account, "preferences": account.preferences}, + ) + @never_cache @br_login_required def toot(request, mention=None): account, mastodon = get_usercontext(request) - if request.method == 'GET': + if request.method == "GET": if mention: - if not mention.startswith('@'): - mention = '@'+mention - form = PostForm(initial={'visibility': request.session['active_user'].source.privacy, - 'status': mention + ' ' }) + if not mention.startswith("@"): + mention = "@" + mention + form = PostForm( + initial={ + "visibility": request.session["active_user"].source.privacy, + "status": mention + " ", + } + ) else: - form = PostForm(initial={'visibility': request.session['active_user'].source.privacy}) - if request.GET.get('ic-request'): - return render(request, 'intercooler/post.html', - {'form': form, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + form = PostForm( + initial={"visibility": request.session["active_user"].source.privacy} + ) + if request.GET.get("ic-request"): + return render( + request, + "intercooler/post.html", + { + "form": form, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) else: - return render(request, 'main/post.html', - {'form': form, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) - elif request.method == 'POST': + return render( + request, + "main/post.html", + { + "form": form, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) + elif request.method == "POST": form = PostForm(request.POST, request.FILES) if form.is_valid(): # create media objects media_objects = [] - for index in range(1,5): - if 'media_file_'+str(index) in request.FILES: + for index in range(1, 5): + if "media_file_" + str(index) in request.FILES: media_objects.append( - mastodon.media_post(request.FILES['media_file_'+str(index)] - .temporary_file_path(), - description=request.POST.get('media_text_' - +str(index), - None))) - if form.cleaned_data['visibility'] == '': - form.cleaned_data['visibility'] = request.session['active_user'].source.privacy + mastodon.media_post( + request.FILES[ + "media_file_" + str(index) + ].temporary_file_path(), + description=request.POST.get( + "media_text_" + str(index), None + ), + ) + ) + if form.cleaned_data["visibility"] == "": + form.cleaned_data["visibility"] = request.session[ + "active_user" + ].source.privacy try: try: - mastodon.status_post(status=form.cleaned_data['status'], - visibility=form.cleaned_data['visibility'], - spoiler_text=form.cleaned_data['spoiler_text'], - media_ids=media_objects, - content_type='text/markdown') + mastodon.status_post( + status=form.cleaned_data["status"], + visibility=form.cleaned_data["visibility"], + spoiler_text=form.cleaned_data["spoiler_text"], + media_ids=media_objects, + content_type="text/markdown", + ) except TypeError: - mastodon.status_post(status=form.cleaned_data['status'], - visibility=form.cleaned_data['visibility'], - spoiler_text=form.cleaned_data['spoiler_text'], - media_ids=media_objects) + mastodon.status_post( + status=form.cleaned_data["status"], + visibility=form.cleaned_data["visibility"], + spoiler_text=form.cleaned_data["spoiler_text"], + media_ids=media_objects, + ) except MastodonAPIError as error: - form.add_error("", "%s (%s used)" % (error.args[-1], - len(form.cleaned_data['status']) - + len(form.cleaned_data['spoiler_text']))) - return render(request, 'main/post.html', - {'form': form, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + form.add_error( + "", + "%s (%s used)" + % ( + error.args[-1], + len(form.cleaned_data["status"]) + + len(form.cleaned_data["spoiler_text"]), + ), + ) + return render( + request, + "main/post.html", + { + "form": form, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) return redirect(home) else: - return render(request, 'main/post.html', - {'form': form, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + return render( + request, + "main/post.html", + { + "form": form, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) else: return redirect(toot) + @br_login_required def redraft(request, id): - if request.method == 'GET': + if request.method == "GET": account, mastodon = get_usercontext(request) toot = mastodon.status(id) - toot_content = get_text(toot.content) # convert to plain text + toot_content = get_text(toot.content) # convert to plain text # fix up white space - toot_content = re.sub("(^\n)|(\n$)", '', - re.sub("\n\n", "\n", toot_content)) + toot_content = re.sub("(^\n)|(\n$)", "", re.sub("\n\n", "\n", toot_content)) # Fix up references for mention in toot.mentions: - menchie_re = re.compile( r"\s?@" + mention.username + r"\s", re.I) - toot_content = menchie_re.sub(" @" + mention.acct + " ", - toot_content, count=1) - form = PostForm({'status': toot_content.strip(), - 'visibility': toot.visibility, - 'spoiler_text': toot.spoiler_text, - 'media_text_1': safe_get_attachment(toot, 0).description, - 'media_text_2': safe_get_attachment(toot, 1).description, - 'media_text_3': safe_get_attachment(toot, 2).description, - 'media_text_4': safe_get_attachment(toot, 3).description, - }) - return render(request, 'main/redraft.html', - {'toot': toot, 'form': form, 'redraft':True, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) - elif request.method == 'POST': + menchie_re = re.compile(r"\s?@" + mention.username + r"\s", re.I) + toot_content = menchie_re.sub( + " @" + mention.acct + " ", toot_content, count=1 + ) + form = PostForm( + { + "status": toot_content.strip(), + "visibility": toot.visibility, + "spoiler_text": toot.spoiler_text, + "media_text_1": safe_get_attachment(toot, 0).description, + "media_text_2": safe_get_attachment(toot, 1).description, + "media_text_3": safe_get_attachment(toot, 2).description, + "media_text_4": safe_get_attachment(toot, 3).description, + } + ) + return render( + request, + "main/redraft.html", + { + "toot": toot, + "form": form, + "redraft": True, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) + elif request.method == "POST": form = PostForm(request.POST, request.FILES) account, mastodon = get_usercontext(request) toot = mastodon.status(id) if form.is_valid(): media_objects = [] - for index in range(1,5): - if 'media_file_'+str(index) in request.FILES: + for index in range(1, 5): + if "media_file_" + str(index) in request.FILES: media_objects.append( - mastodon.media_post(request.FILES['media_file_'+str(index)] - .temporary_file_path(), - description=request.POST.get('media_text_' - +str(index), - None))) - if form.cleaned_data['visibility'] == '': - form.cleaned_data['visibility'] = request.session['active_user'].source.privacy + mastodon.media_post( + request.FILES[ + "media_file_" + str(index) + ].temporary_file_path(), + description=request.POST.get( + "media_text_" + str(index), None + ), + ) + ) + if form.cleaned_data["visibility"] == "": + form.cleaned_data["visibility"] = request.session[ + "active_user" + ].source.privacy try: try: - mastodon.status_post(status=form.cleaned_data['status'], - visibility=form.cleaned_data['visibility'], - spoiler_text=form.cleaned_data['spoiler_text'], - media_ids=media_objects, - in_reply_to_id=toot.in_reply_to_id, - content_type='text/markdown') + mastodon.status_post( + status=form.cleaned_data["status"], + visibility=form.cleaned_data["visibility"], + spoiler_text=form.cleaned_data["spoiler_text"], + media_ids=media_objects, + in_reply_to_id=toot.in_reply_to_id, + content_type="text/markdown", + ) except TypeError: - mastodon.status_post(status=form.cleaned_data['status'], - visibility=form.cleaned_data['visibility'], - spoiler_text=form.cleaned_data['spoiler_text'], - media_ids=media_objects, - in_reply_to_id=toot.in_reply_to_id) + mastodon.status_post( + status=form.cleaned_data["status"], + visibility=form.cleaned_data["visibility"], + spoiler_text=form.cleaned_data["spoiler_text"], + media_ids=media_objects, + in_reply_to_id=toot.in_reply_to_id, + ) mastodon.status_delete(id) except MastodonAPIError as error: - form.add_error("", "%s (%s used)" % (error.args[-1], - len(form.cleaned_data['status']) - + len(form.cleaned_data['spoiler_text']))) - return render(request, 'main/redraft.html', - {'toot': toot, 'form': form, 'redraft': True, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + form.add_error( + "", + "%s (%s used)" + % ( + error.args[-1], + len(form.cleaned_data["status"]) + + len(form.cleaned_data["spoiler_text"]), + ), + ) + return render( + request, + "main/redraft.html", + { + "toot": toot, + "form": form, + "redraft": True, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) return redirect(home) else: - return render(request, 'main/redraft.html', - {'toot': toot, 'form': form, 'redraft': True, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + return render( + request, + "main/redraft.html", + { + "toot": toot, + "form": form, + "redraft": True, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) else: return redirect(redraft, id) + def safe_get_attachment(toot, index): """Get an attachment from a toot, without crashing if it isn't there.""" try: @@ -735,35 +957,50 @@ def safe_get_attachment(toot, index): except IndexError: adict = AttribAccessDict() adict.id, adict.type, adict.description = "", "unknown", "" - adict.url, adict.remote_url, adict.preview_url = '', '', '' - adict.text_url = '' + adict.url, adict.remote_url, adict.preview_url = "", "", "" + adict.text_url = "" return adict @br_login_required def reply(request, id): - if request.method == 'GET': + if request.method == "GET": account, mastodon = get_usercontext(request) toot = mastodon.status(id) context = mastodon.status_context(id) notifications = _notes_count(account, mastodon) - if toot.account.acct != request.session['active_user'].acct: - initial_text = '@' + toot.account.acct + " " + if toot.account.acct != request.session["active_user"].acct: + initial_text = "@" + toot.account.acct + " " else: initial_text = "" - for mention in [x for x in toot.mentions - if x.acct != request.session['active_user'].acct and - x.acct != toot.account.acct]: - initial_text +=('@' + mention.acct + " ") - form = PostForm(initial={'status': initial_text, - 'visibility': toot.visibility, - 'spoiler_text': toot.spoiler_text}) - return render(request, 'main/reply.html', - {'context': context, 'toot': toot, 'form': form, 'reply':True, - 'own_acct': request.session['active_user'], - 'notifications': notifications, - 'preferences': account.preferences}) - elif request.method == 'POST': + for mention in [ + x + for x in toot.mentions + if x.acct != request.session["active_user"].acct + and x.acct != toot.account.acct + ]: + initial_text += "@" + mention.acct + " " + form = PostForm( + initial={ + "status": initial_text, + "visibility": toot.visibility, + "spoiler_text": toot.spoiler_text, + } + ) + return render( + request, + "main/reply.html", + { + "context": context, + "toot": toot, + "form": form, + "reply": True, + "own_acct": request.session["active_user"], + "notifications": notifications, + "preferences": account.preferences, + }, + ) + elif request.method == "POST": form = PostForm(request.POST, request.FILES) account, mastodon = get_usercontext(request) toot = mastodon.status(id) @@ -772,45 +1009,77 @@ def reply(request, id): if form.is_valid(): # create media objects media_objects = [] - for index in range(1,5): - if 'media_file_'+str(index) in request.FILES: + for index in range(1, 5): + if "media_file_" + str(index) in request.FILES: media_objects.append( - mastodon.media_post(request.FILES['media_file_'+str(index)] - .temporary_file_path(), - description=request.POST.get('media_text_' - +str(index), - None))) + mastodon.media_post( + request.FILES[ + "media_file_" + str(index) + ].temporary_file_path(), + description=request.POST.get( + "media_text_" + str(index), None + ), + ) + ) try: try: - mastodon.status_post(status=form.cleaned_data['status'], - visibility=form.cleaned_data['visibility'], - spoiler_text=form.cleaned_data['spoiler_text'], - media_ids=media_objects, - in_reply_to_id=id, - content_type="text/markdown") + mastodon.status_post( + status=form.cleaned_data["status"], + visibility=form.cleaned_data["visibility"], + spoiler_text=form.cleaned_data["spoiler_text"], + media_ids=media_objects, + in_reply_to_id=id, + content_type="text/markdown", + ) except TypeError: - mastodon.status_post(status=form.cleaned_data['status'], - visibility=form.cleaned_data['visibility'], - spoiler_text=form.cleaned_data['spoiler_text'], - media_ids=media_objects, - in_reply_to_id=id) + mastodon.status_post( + status=form.cleaned_data["status"], + visibility=form.cleaned_data["visibility"], + spoiler_text=form.cleaned_data["spoiler_text"], + media_ids=media_objects, + in_reply_to_id=id, + ) except MastodonAPIError as error: - form.add_error("", "%s (%s used)" % (error.args[-1], - len(form.cleaned_data['status']) - + len(form.cleaned_data['spoiler_text']))) - return render(request, 'main/reply.html', - {'context': context, 'toot': toot, 'form': form, 'reply': True, - 'own_acct': request.session['active_user'], - 'notifications': notifications, - 'preferences': account.preferences}) - return HttpResponseRedirect(reverse('thread', args=[id]) + "#toot-"+str(id)) + form.add_error( + "", + "%s (%s used)" + % ( + error.args[-1], + len(form.cleaned_data["status"]) + + len(form.cleaned_data["spoiler_text"]), + ), + ) + return render( + request, + "main/reply.html", + { + "context": context, + "toot": toot, + "form": form, + "reply": True, + "own_acct": request.session["active_user"], + "notifications": notifications, + "preferences": account.preferences, + }, + ) + return HttpResponseRedirect( + reverse("thread", args=[id]) + "#toot-" + str(id) + ) else: - return render(request, 'main/reply.html', - {'context': context, 'toot': toot, 'form': form, 'reply': True, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + return render( + request, + "main/reply.html", + { + "context": context, + "toot": toot, + "form": form, + "reply": True, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) else: - return HttpResponseRedirect(reverse('reply', args=[id]) + "#toot-"+str(id)) + return HttpResponseRedirect(reverse("reply", args=[id]) + "#toot-" + str(id)) @never_cache @@ -818,72 +1087,104 @@ def reply(request, id): def fav(request, id): account, mastodon = get_usercontext(request) toot = mastodon.status(id) - if request.method == 'POST': - if not request.POST.get('cancel', None): + if request.method == "POST": + if not request.POST.get("cancel", None): if toot.favourited: mastodon.status_unfavourite(id) else: mastodon.status_favourite(id) - if request.POST.get('ic-request'): - toot['favourited'] = not toot['favourited'] - return render(request, 'intercooler/fav.html', - {"toot": toot, - 'own_acct': request.session['active_user'], - "preferences": account.preferences}) + if request.POST.get("ic-request"): + toot["favourited"] = not toot["favourited"] + return render( + request, + "intercooler/fav.html", + { + "toot": toot, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) else: - return HttpResponseRedirect(reverse('thread', args=[id]) + "#toot-"+str(id)) + return HttpResponseRedirect( + reverse("thread", args=[id]) + "#toot-" + str(id) + ) else: - return render(request, 'main/fav.html', - {"toot": toot, - 'own_acct': request.session['active_user'], - "confirm_page": True, - 'preferences': account.preferences}) + return render( + request, + "main/fav.html", + { + "toot": toot, + "own_acct": request.session["active_user"], + "confirm_page": True, + "preferences": account.preferences, + }, + ) + @never_cache @br_login_required def boost(request, id): account, mastodon = get_usercontext(request) toot = mastodon.status(id) - if request.method == 'POST': - if not request.POST.get('cancel', None): + if request.method == "POST": + if not request.POST.get("cancel", None): if toot.reblogged: mastodon.status_unreblog(id) else: mastodon.status_reblog(id) - if request.POST.get('ic-request'): - toot['reblogged'] = not toot['reblogged'] - return render(request, 'intercooler/boost.html', - {"toot": toot, - 'own_acct': request.session['active_user'], - "preferences": account.preferences}) + if request.POST.get("ic-request"): + toot["reblogged"] = not toot["reblogged"] + return render( + request, + "intercooler/boost.html", + { + "toot": toot, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) else: - return HttpResponseRedirect(reverse('thread', args=[id]) + "#toot-"+str(id)) + return HttpResponseRedirect( + reverse("thread", args=[id]) + "#toot-" + str(id) + ) else: - return render(request, 'main/boost.html', - {"toot": toot, - 'own_acct': request.session['active_user'], - 'confirm_page': True, - "preferences": account.preferences}) + return render( + request, + "main/boost.html", + { + "toot": toot, + "own_acct": request.session["active_user"], + "confirm_page": True, + "preferences": account.preferences, + }, + ) + @never_cache @br_login_required def delete(request, id): account, mastodon = get_usercontext(request) toot = mastodon.status(id) - if request.method == 'POST' or request.method == 'DELETE': - if toot.account.acct != request.session['active_user'].acct: - return redirect('home') - if not request.POST.get('cancel', None): + if request.method == "POST" or request.method == "DELETE": + if toot.account.acct != request.session["active_user"].acct: + return redirect("home") + if not request.POST.get("cancel", None): mastodon.status_delete(id) - if request.POST.get('ic-request'): + if request.POST.get("ic-request"): return HttpResponse("") return redirect(home) else: - return render(request, 'main/delete.html', - {"toot": toot, - 'own_acct': request.session['active_user'], - 'confirm_page': True, - "preferences": account.preferences}) + return render( + request, + "main/delete.html", + { + "toot": toot, + "own_acct": request.session["active_user"], + "confirm_page": True, + "preferences": account.preferences, + }, + ) + @never_cache @br_login_required @@ -894,27 +1195,42 @@ def follow(request, id): relationship = mastodon.account_relationships(user_dict.id)[0] except (IndexError, AttributeError, KeyError): raise Http404("The user could not be found.") - if request.method == 'POST': - if not request.POST.get('cancel', None): + if request.method == "POST": + if not request.POST.get("cancel", None): if relationship.requested or relationship.following: mastodon.account_unfollow(id) else: mastodon.account_follow(id) - if request.POST.get('ic-request'): - sleep(1) # This is annoying, but the next call will return Requested instead of Following in some cases + if request.POST.get("ic-request"): + sleep( + 1 + ) # This is annoying, but the next call will return Requested instead of Following in some cases relationship = mastodon.account_relationships(user_dict.id)[0] - return render(request, 'intercooler/follow.html', - {"user": user_dict, "relationship": relationship, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + return render( + request, + "intercooler/follow.html", + { + "user": user_dict, + "relationship": relationship, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) else: return redirect(user, user_dict.acct) else: - return render(request, 'main/follow.html', - {"user": user_dict, "relationship": relationship, - "confirm_page": True, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + return render( + request, + "main/follow.html", + { + "user": user_dict, + "relationship": relationship, + "confirm_page": True, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) + @never_cache @br_login_required @@ -925,26 +1241,34 @@ def block(request, id): relationship = mastodon.account_relationships(user_dict.id)[0] except (IndexError, AttributeError, KeyError): raise Http404("The user could not be found.") - if request.method == 'POST': - if not request.POST.get('cancel', None): + if request.method == "POST": + if not request.POST.get("cancel", None): if relationship.blocking: mastodon.account_unblock(id) else: mastodon.account_block(id) - if request.POST.get('ic-request'): - relationship['blocking'] = not relationship['blocking'] - return render(request, 'intercooler/block.html', - {"user": user_dict, - "relationship": relationship, - }) + if request.POST.get("ic-request"): + relationship["blocking"] = not relationship["blocking"] + return render( + request, + "intercooler/block.html", + {"user": user_dict, "relationship": relationship}, + ) else: return redirect(user, user_dict.acct) else: - return render(request, 'main/block.html', - {"user": user_dict, "relationship": relationship, - "confirm_page": True, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + return render( + request, + "main/block.html", + { + "user": user_dict, + "relationship": relationship, + "confirm_page": True, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) + @never_cache @br_login_required @@ -955,60 +1279,83 @@ def mute(request, id): relationship = mastodon.account_relationships(user_dict.id)[0] except (IndexError, AttributeError, KeyError): raise Http404("The user could not be found.") - if request.method == 'POST': - if not request.POST.get('cancel', None): + if request.method == "POST": + if not request.POST.get("cancel", None): if relationship.muting: mastodon.account_unmute(id) else: mastodon.account_mute(id) - if request.POST.get('ic-request'): - relationship['muting'] = not relationship['muting'] - return render(request, 'intercooler/mute.html', - {"user": user_dict, - "relationship": relationship, - }) + if request.POST.get("ic-request"): + relationship["muting"] = not relationship["muting"] + return render( + request, + "intercooler/mute.html", + {"user": user_dict, "relationship": relationship}, + ) else: return redirect(user, user_dict.acct) else: - return render(request, 'main/mute.html', - {"user": user_dict, "relationship": relationship, - "confirm_page": True, - 'own_acct': request.session['active_user'], - 'preferences': account.preferences}) + return render( + request, + "main/mute.html", + { + "user": user_dict, + "relationship": relationship, + "confirm_page": True, + "own_acct": request.session["active_user"], + "preferences": account.preferences, + }, + ) + @br_login_required def search(request): account, mastodon = get_usercontext(request) - if request.GET.get('ic-request'): - return render(request, 'intercooler/search.html', - {"preferences": account.preferences, - 'own_acct': request.session['active_user'], - }) + if request.GET.get("ic-request"): + return render( + request, + "intercooler/search.html", + { + "preferences": account.preferences, + "own_acct": request.session["active_user"], + }, + ) else: - return render(request, 'main/search.html', - {"preferences": account.preferences, - 'own_acct': request.session['active_user'], - }) + return render( + request, + "main/search.html", + { + "preferences": account.preferences, + "own_acct": request.session["active_user"], + }, + ) + @br_login_required -@cache_page(60*5) +@cache_page(60 * 5) def search_results(request): - if request.method == 'GET': - query = request.GET.get('q', '') - elif request.method == 'POST': - query = request.POST.get('q', '') + if request.method == "GET": + query = request.GET.get("q", "") + elif request.method == "POST": + query = request.POST.get("q", "") else: - query = '' + query = "" account, mastodon = get_usercontext(request) results = mastodon.search(query) notifications = _notes_count(account, mastodon) - return render(request, 'main/search_results.html', - {"results": results, - 'own_acct': request.session['active_user'], - 'notifications': notifications, - "preferences": account.preferences}) + return render( + request, + "main/search_results.html", + { + "results": results, + "own_acct": request.session["active_user"], + "notifications": notifications, + "preferences": account.preferences, + }, + ) -@cache_page(60*30) + +@cache_page(60 * 30) def about(request): version = django_settings.BRUTALDON_VERSION account, mastodon = get_usercontext(request) @@ -1016,21 +1363,33 @@ def about(request): preferences = account.preferences else: preferences = None - return render(request, 'about.html', - {"preferences": preferences, - "version": version, - 'own_acct': request.session.get('active_user', None), - }) -@cache_page(60*30) + return render( + request, + "about.html", + { + "preferences": preferences, + "version": version, + "own_acct": request.session.get("active_user", None), + }, + ) + + +@cache_page(60 * 30) def privacy(request): account, mastodon = get_usercontext(request) if account: preferences = account.preferences else: preferences = None - return render(request, 'privacy.html', - {"preferences": preferences, - 'own_acct' : request.session.get('active_user', None)}) + return render( + request, + "privacy.html", + { + "preferences": preferences, + "own_acct": request.session.get("active_user", None), + }, + ) + @cache_page(60 * 30) @br_login_required @@ -1038,74 +1397,92 @@ def emoji_reference(request): account, mastodon = get_usercontext(request) emojos = mastodon.custom_emojis() notifications = _notes_count(account, mastodon) - return render(request, 'main/emoji.html', - {"preferences": account.preferences, - "emojos": sorted(emojos, key=lambda x: x['shortcode']), - "notifications": notifications, - 'own_acct' : request.session['active_user']}) + return render( + request, + "main/emoji.html", + { + "preferences": account.preferences, + "emojos": sorted(emojos, key=lambda x: x["shortcode"]), + "notifications": notifications, + "own_acct": request.session["active_user"], + }, + ) @br_login_required def list_filters(request): account, mastodon = get_usercontext(request) filters = mastodon.filters() - return render(request, 'filters/list.html', - {'account': account, - 'preferences': account.preferences, - 'filters': filters }) + return render( + request, + "filters/list.html", + {"account": account, "preferences": account.preferences, "filters": filters}, + ) + @br_login_required def create_filter(request): account, mastodon = get_usercontext(request) - if request.method == 'POST': + if request.method == "POST": form = FilterForm(request.POST) if form.is_valid(): contexts = [] - if form.cleaned_data['context_home']: - contexts.append('home') - if form.cleaned_data['context_public']: - contexts.append('public') - if form.cleaned_data['context_notes']: - contexts.append('notifications') - if form.cleaned_data['context_thread']: - contexts.append('thread') - expires = form.cleaned_data['expires_in'] + if form.cleaned_data["context_home"]: + contexts.append("home") + if form.cleaned_data["context_public"]: + contexts.append("public") + if form.cleaned_data["context_notes"]: + contexts.append("notifications") + if form.cleaned_data["context_thread"]: + contexts.append("thread") + expires = form.cleaned_data["expires_in"] if expires == "": expires = None - mastodon.filter_create(form.cleaned_data['phrase'], - contexts, - whole_word=form.cleaned_data['whole_word'], - expires_in=expires) + mastodon.filter_create( + form.cleaned_data["phrase"], + contexts, + whole_word=form.cleaned_data["whole_word"], + expires_in=expires, + ) return redirect(list_filters) else: - return render(request, 'filters/create.html', - { 'form': form, - 'account': account, - 'preferences': account.preferences}) + return render( + request, + "filters/create.html", + {"form": form, "account": account, "preferences": account.preferences}, + ) else: form = FilterForm() - return render(request, 'filters/create.html', - { 'form': form, - 'account': account, - 'preferences': account.preferences}) + return render( + request, + "filters/create.html", + {"form": form, "account": account, "preferences": account.preferences}, + ) + @br_login_required def delete_filter(request, id): account, mastodon = get_usercontext(request) filter = mastodon.filter(id) - if request.method == 'POST' or request.method == 'DELETE': - if not request.POST.get('cancel', None): + if request.method == "POST" or request.method == "DELETE": + if not request.POST.get("cancel", None): mastodon.filter_delete(filter.id) if request.POST.get("ic-request"): return HttpResponse("") return redirect(list_filters) else: - return render(request, "filters/delete.html", - {"filter": filter, - "own_acct": request.session["active_user"], - "confirm_page": True, - "preferences": account.preferences}) + return render( + request, + "filters/delete.html", + { + "filter": filter, + "own_acct": request.session["active_user"], + "confirm_page": True, + "preferences": account.preferences, + }, + ) + @br_login_required def edit_filter(request, id): @@ -1113,54 +1490,73 @@ def edit_filter(request, id): filter = mastodon.filter(id) contexts = [] - if request.method == 'POST': + if request.method == "POST": form = FilterForm(request.POST) if form.is_valid(): - if form.cleaned_data['context_home']: - contexts.append('home') - if form.cleaned_data['context_public']: - contexts.append('public') - if form.cleaned_data['context_notes']: - contexts.append('notifications') - if form.cleaned_data['context_thread']: - contexts.append('thread') - expires = form.cleaned_data['expires_in'] + if form.cleaned_data["context_home"]: + contexts.append("home") + if form.cleaned_data["context_public"]: + contexts.append("public") + if form.cleaned_data["context_notes"]: + contexts.append("notifications") + if form.cleaned_data["context_thread"]: + contexts.append("thread") + expires = form.cleaned_data["expires_in"] if expires == "": expires = None - mastodon.filter_update(id, form.cleaned_data['phrase'], - contexts, - whole_word=form.cleaned_data['whole_word'], - expires_in=expires) + mastodon.filter_update( + id, + form.cleaned_data["phrase"], + contexts, + whole_word=form.cleaned_data["whole_word"], + expires_in=expires, + ) return redirect(list_filters) else: - return render(request, 'filters/edit.html', - { 'form': form, - 'account': account, - 'filter': filter, - 'preferences': account.preferences}) + return render( + request, + "filters/edit.html", + { + "form": form, + "account": account, + "filter": filter, + "preferences": account.preferences, + }, + ) else: contexts = [] - form = FilterForm({'phrase': filter.phrase, - 'context_home': "home" in filter.context, - 'context_public': "public" in filter.context, - 'context_notes': "notifications" in filter.context, - 'context_thread': "thread" in filter.context, - 'whole_word': filter.whole_word}) - return render(request, 'filters/edit.html', - { 'form': form, - 'account': account, - 'filter': filter, - 'preferences': account.preferences}) + form = FilterForm( + { + "phrase": filter.phrase, + "context_home": "home" in filter.context, + "context_public": "public" in filter.context, + "context_notes": "notifications" in filter.context, + "context_thread": "thread" in filter.context, + "whole_word": filter.whole_word, + } + ) + return render( + request, + "filters/edit.html", + { + "form": form, + "account": account, + "filter": filter, + "preferences": account.preferences, + }, + ) + @br_login_required def follow_requests(request, id=None): account, mastodon = get_usercontext(request) - if request.method == 'GET': + if request.method == "GET": reqs = mastodon.follow_requests() - return render(request, 'requests/list.html', - {'account': account, - 'preferences': account.preferences, - 'requests': reqs}) + return render( + request, + "requests/list.html", + {"account": account, "preferences": account.preferences, "requests": reqs}, + ) elif id is None: return redirect(follow_requests) else: @@ -1170,30 +1566,41 @@ def follow_requests(request, id=None): mastodon.follow_request_reject(id) return redirect(follow_requests) + @br_login_required def accounts(request, id=None): active_account, mastodon = get_usercontext(request) - if request.method == 'GET': - accounts = [x for x in request.session.get('accounts_dict').values()] - return render(request, 'accounts/list.html', - {'active_account': active_account, - "own_acct": request.session["active_user"], - 'accounts': accounts, - 'preferences': active_account.preferences}) - if request.method == 'POST': - if request.POST.get('activate'): + if request.method == "GET": + accounts = [x for x in request.session.get("accounts_dict").values()] + return render( + request, + "accounts/list.html", + { + "active_account": active_account, + "own_acct": request.session["active_user"], + "accounts": accounts, + "preferences": active_account.preferences, + }, + ) + if request.method == "POST": + if request.POST.get("activate"): to_account = Account.objects.get(id=id).username if switch_accounts(request, to_account): return redirect(home) else: return redirect("accounts") - elif request.POST.get('forget'): + elif request.POST.get("forget"): account = Account.objects.get(id=id).username return forget_account(request, account) else: - accounts = [x for x in request.session.get('accounts_dict').values()] - return render(request, 'accounts/list.html', - {'active_account': active_account, - "own_acct": request.session["active_user"], - 'accounts': accounts, - 'preferences': active_account.preferences}) + accounts = [x for x in request.session.get("accounts_dict").values()] + return render( + request, + "accounts/list.html", + { + "active_account": active_account, + "own_acct": request.session["active_user"], + "accounts": accounts, + "preferences": active_account.preferences, + }, + )