Skip to content
Permalink
Browse files

Black.

  • Loading branch information
nicksergeant committed Jan 23, 2019
1 parent 6af387b commit 39403a600c59b8d502818d26098fe711248db861
Showing with 1,474 additions and 1,179 deletions.
  1. +4 βˆ’4 accounts/admin.py
  2. +2 βˆ’2 accounts/management/commands/migrate_user_passwords.py
  3. +106 βˆ’27 accounts/migrations/0001_initial.py
  4. +4 βˆ’6 accounts/migrations/0002_auto_20150724_2010.py
  5. +45 βˆ’15 accounts/migrations/0003_auto_20160512_1058.py
  6. +52 βˆ’53 accounts/models.py
  7. +2 βˆ’2 accounts/urls.py
  8. +4 βˆ’6 accounts/views.py
  9. +25 βˆ’25 blogs/middleware.py
  10. +1 βˆ’1 blogs/urls.py
  11. +92 βˆ’79 blogs/views.py
  12. +96 βˆ’98 settings.py
  13. +27 βˆ’14 snipts/admin.py
  14. +217 βˆ’186 snipts/api.py
  15. +21 βˆ’14 snipts/management/commands/import_snipts.py
  16. +69 βˆ’32 snipts/migrations/0001_initial.py
  17. +18 βˆ’10 snipts/migrations/0002_sniptlogentry.py
  18. +10 βˆ’5 snipts/migrations/0003_snipt_last_user_saved.py
  19. +7 βˆ’9 snipts/migrations/0004_auto_20160512_1058.py
  20. +16 βˆ’8 snipts/migrations/0005_sniptsecureview.py
  21. +128 βˆ’116 snipts/models.py
  22. +5 βˆ’6 snipts/search_indexes.py
  23. +13 βˆ’13 snipts/templatetags/snipt_tags.py
  24. +56 βˆ’50 snipts/tests.py
  25. +30 βˆ’39 snipts/urls.py
  26. +7 βˆ’5 snipts/utils.py
  27. +135 βˆ’127 snipts/views.py
  28. +3 βˆ’2 teams/admin.py
  29. +29 βˆ’13 teams/migrations/0001_initial.py
  30. +5 βˆ’7 teams/migrations/0002_team_email.py
  31. +7 βˆ’7 teams/migrations/0003_auto_20150818_0057.py
  32. +7 βˆ’7 teams/migrations/0004_auto_20150930_1526.py
  33. +4 βˆ’8 teams/migrations/0005_auto_20150930_2124.py
  34. +18 βˆ’7 teams/migrations/0006_team_plan.py
  35. +3 βˆ’7 teams/migrations/0007_team_disabled.py
  36. +20 βˆ’7 teams/migrations/0008_auto_20151018_2053.py
  37. +20 βˆ’7 teams/migrations/0009_auto_20160512_1058.py
  38. +31 βˆ’24 teams/models.py
  39. +14 βˆ’12 teams/urls.py
  40. +18 βˆ’23 teams/views.py
  41. +42 βˆ’36 urls.py
  42. +14 βˆ’5 user-admin/admin.py
  43. +3 βˆ’3 utils/backends.py
  44. +14 βˆ’12 utils/forms.py
  45. +7 βˆ’8 utils/templatetags/pygmentize.py
  46. +1 βˆ’1 utils/templatetags/truncate_lines.py
  47. +6 βˆ’7 utils/templatetags/verbatim.py
  48. +2 βˆ’1 utils/views.py
  49. +14 βˆ’23 views.py
@@ -3,9 +3,9 @@


class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'is_pro', 'stripe_id', 'gittip_username',
'teams_beta_seen')
list_filter = ['teams_beta_seen', 'teams_beta_applied']
search_fields = ('user__username', 'gittip_username',)
list_display = ("user", "is_pro", "stripe_id", "gittip_username", "teams_beta_seen")
list_filter = ["teams_beta_seen", "teams_beta_applied"]
search_fields = ("user__username", "gittip_username")


admin.site.register(UserProfile, UserProfileAdmin)
@@ -14,9 +14,9 @@ def handle(self, *args, **options):
self.stdout.write(u"Updating %s user passwords..." % users.count())

for user in users:
if user.password[0:3] == 'bc$':
if user.password[0:3] == "bc$":
pw = user.password
new_password = pw[0:3].replace('bc$', 'bcrypt$') + pw[3:]
new_password = pw[0:3].replace("bc$", "bcrypt$") + pw[3:]
user.password = new_password
user.save()

@@ -7,36 +7,115 @@

class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]

operations = [
migrations.CreateModel(
name='UserProfile',
name="UserProfile",
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('is_pro', models.BooleanField(default=False)),
('teams_beta_seen', models.BooleanField(default=False)),
('teams_beta_applied', models.BooleanField(default=False)),
('pro_date', models.DateTimeField(null=True, blank=True)),
('stripe_id', models.CharField(max_length=100, null=True, blank=True)),
('has_gravatar', models.BooleanField(default=False)),
('list_view', models.CharField(default=b'N', max_length=1, choices=[(b'N', b'Normal'), (b'C', b'Compact')])),
('blog_title', models.CharField(max_length=250, null=True, blank=True)),
('blog_theme', models.CharField(default=b'A', max_length=1, choices=[(b'D', b'Default'), (b'A', b'Pro Adams')])),
('blog_domain', models.CharField(max_length=250, null=True, blank=True)),
('default_editor', models.CharField(default=b'C', max_length=250, choices=[(b'C', b'CodeMirror'), (b'T', b'Textarea')])),
('editor_theme', models.CharField(default=b'default', max_length=250, choices=[(b'default', b'Default'), (b'ambiance', b'Ambiance'), (b'blackboard', b'Blackboard'), (b'cobalt', b'Cobalt'), (b'eclipse', b'Eclipse'), (b'elegant', b'Elegant'), (b'erlang-dark', b'Erlang Dark'), (b'lesser-dark', b'Lesser Dark'), (b'monokai', b'Monokai'), (b'neat', b'Neat'), (b'night', b'Night'), (b'rubyblue', b'Ruby Blue'), (b'solarized dark', b'Solarized Dark'), (b'solarized light', b'Solarized Light'), (b'twilight', b'Twilight'), (b'vibrant-ink', b'Vibrant Ink'), (b'xq-dark', b'XQ Dark')])),
('gittip_username', models.CharField(max_length=250, null=True, blank=True)),
('disqus_shortname', models.CharField(max_length=250, null=True, blank=True)),
('google_analytics_tracking_id', models.CharField(max_length=250, null=True, blank=True)),
('gauges_site_id', models.CharField(max_length=250, null=True, blank=True)),
('google_ad_client', models.CharField(max_length=250, null=True, blank=True)),
('google_ad_slot', models.CharField(max_length=250, null=True, blank=True)),
('google_ad_width', models.CharField(max_length=250, null=True, blank=True)),
('google_ad_height', models.CharField(max_length=250, null=True, blank=True)),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, unique=True)),
(
"id",
models.AutoField(
verbose_name="ID",
serialize=False,
auto_created=True,
primary_key=True,
),
),
("is_pro", models.BooleanField(default=False)),
("teams_beta_seen", models.BooleanField(default=False)),
("teams_beta_applied", models.BooleanField(default=False)),
("pro_date", models.DateTimeField(null=True, blank=True)),
("stripe_id", models.CharField(max_length=100, null=True, blank=True)),
("has_gravatar", models.BooleanField(default=False)),
(
"list_view",
models.CharField(
default=b"N",
max_length=1,
choices=[(b"N", b"Normal"), (b"C", b"Compact")],
),
),
("blog_title", models.CharField(max_length=250, null=True, blank=True)),
(
"blog_theme",
models.CharField(
default=b"A",
max_length=1,
choices=[(b"D", b"Default"), (b"A", b"Pro Adams")],
),
),
(
"blog_domain",
models.CharField(max_length=250, null=True, blank=True),
),
(
"default_editor",
models.CharField(
default=b"C",
max_length=250,
choices=[(b"C", b"CodeMirror"), (b"T", b"Textarea")],
),
),
(
"editor_theme",
models.CharField(
default=b"default",
max_length=250,
choices=[
(b"default", b"Default"),
(b"ambiance", b"Ambiance"),
(b"blackboard", b"Blackboard"),
(b"cobalt", b"Cobalt"),
(b"eclipse", b"Eclipse"),
(b"elegant", b"Elegant"),
(b"erlang-dark", b"Erlang Dark"),
(b"lesser-dark", b"Lesser Dark"),
(b"monokai", b"Monokai"),
(b"neat", b"Neat"),
(b"night", b"Night"),
(b"rubyblue", b"Ruby Blue"),
(b"solarized dark", b"Solarized Dark"),
(b"solarized light", b"Solarized Light"),
(b"twilight", b"Twilight"),
(b"vibrant-ink", b"Vibrant Ink"),
(b"xq-dark", b"XQ Dark"),
],
),
),
(
"gittip_username",
models.CharField(max_length=250, null=True, blank=True),
),
(
"disqus_shortname",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_analytics_tracking_id",
models.CharField(max_length=250, null=True, blank=True),
),
(
"gauges_site_id",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_ad_client",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_ad_slot",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_ad_width",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_ad_height",
models.CharField(max_length=250, null=True, blank=True),
),
("user", models.ForeignKey(to=settings.AUTH_USER_MODEL, unique=True)),
],
),
)
]
@@ -7,14 +7,12 @@

class Migration(migrations.Migration):

dependencies = [
('accounts', '0001_initial'),
]
dependencies = [("accounts", "0001_initial")]

operations = [
migrations.AlterField(
model_name='userprofile',
name='user',
model_name="userprofile",
name="user",
field=models.OneToOneField(to=settings.AUTH_USER_MODEL),
),
)
]
@@ -6,29 +6,59 @@

class Migration(migrations.Migration):

dependencies = [
('accounts', '0002_auto_20150724_2010'),
]
dependencies = [("accounts", "0002_auto_20150724_2010")]

operations = [
migrations.AlterField(
model_name='userprofile',
name='blog_theme',
field=models.CharField(max_length=1, choices=[('D', 'Default'), ('A', 'Pro Adams')], default='A'),
model_name="userprofile",
name="blog_theme",
field=models.CharField(
max_length=1,
choices=[("D", "Default"), ("A", "Pro Adams")],
default="A",
),
),
migrations.AlterField(
model_name='userprofile',
name='default_editor',
field=models.CharField(max_length=250, choices=[('C', 'CodeMirror'), ('T', 'Textarea')], default='C'),
model_name="userprofile",
name="default_editor",
field=models.CharField(
max_length=250,
choices=[("C", "CodeMirror"), ("T", "Textarea")],
default="C",
),
),
migrations.AlterField(
model_name='userprofile',
name='editor_theme',
field=models.CharField(max_length=250, choices=[('default', 'Default'), ('ambiance', 'Ambiance'), ('blackboard', 'Blackboard'), ('cobalt', 'Cobalt'), ('eclipse', 'Eclipse'), ('elegant', 'Elegant'), ('erlang-dark', 'Erlang Dark'), ('lesser-dark', 'Lesser Dark'), ('monokai', 'Monokai'), ('neat', 'Neat'), ('night', 'Night'), ('rubyblue', 'Ruby Blue'), ('solarized dark', 'Solarized Dark'), ('solarized light', 'Solarized Light'), ('twilight', 'Twilight'), ('vibrant-ink', 'Vibrant Ink'), ('xq-dark', 'XQ Dark')], default='default'),
model_name="userprofile",
name="editor_theme",
field=models.CharField(
max_length=250,
choices=[
("default", "Default"),
("ambiance", "Ambiance"),
("blackboard", "Blackboard"),
("cobalt", "Cobalt"),
("eclipse", "Eclipse"),
("elegant", "Elegant"),
("erlang-dark", "Erlang Dark"),
("lesser-dark", "Lesser Dark"),
("monokai", "Monokai"),
("neat", "Neat"),
("night", "Night"),
("rubyblue", "Ruby Blue"),
("solarized dark", "Solarized Dark"),
("solarized light", "Solarized Light"),
("twilight", "Twilight"),
("vibrant-ink", "Vibrant Ink"),
("xq-dark", "XQ Dark"),
],
default="default",
),
),
migrations.AlterField(
model_name='userprofile',
name='list_view',
field=models.CharField(max_length=1, choices=[('N', 'Normal'), ('C', 'Compact')], default='N'),
model_name="userprofile",
name="list_view",
field=models.CharField(
max_length=1, choices=[("N", "Normal"), ("C", "Compact")], default="N"
),
),
]

0 comments on commit 39403a6

Please sign in to comment.
You can’t perform that action at this time.