mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-21 23:01:00 +00:00
Update all the pre-commit hooks
This commit is contained in:
parent
e17f17385a
commit
6fdfdca442
66 changed files with 48 additions and 128 deletions
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.4.0
|
rev: v4.5.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-case-conflict
|
- id: check-case-conflict
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
|
@ -15,21 +15,22 @@ repos:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: "v3.3.0"
|
rev: "v3.15.0"
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py310-plus]
|
args: [--py311-plus]
|
||||||
|
|
||||||
- repo: https://github.com/adamchainz/django-upgrade
|
- repo: https://github.com/adamchainz/django-upgrade
|
||||||
rev: "1.13.0"
|
rev: "1.15.0"
|
||||||
hooks:
|
hooks:
|
||||||
- id: django-upgrade
|
- id: django-upgrade
|
||||||
args: [--target-version, "4.2"]
|
args: [--target-version, "4.2"]
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||||
rev: 22.10.0
|
rev: 23.11.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
language_version: python3.11
|
||||||
|
|
||||||
- repo: https://github.com/pycqa/isort
|
- repo: https://github.com/pycqa/isort
|
||||||
rev: 5.12.0
|
rev: 5.12.0
|
||||||
|
@ -38,12 +39,12 @@ repos:
|
||||||
args: ["--profile=black"]
|
args: ["--profile=black"]
|
||||||
|
|
||||||
- repo: https://github.com/pycqa/flake8
|
- repo: https://github.com/pycqa/flake8
|
||||||
rev: 6.0.0
|
rev: 6.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v0.991
|
rev: v1.6.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
exclude: "^tests/"
|
exclude: "^tests/"
|
||||||
|
@ -51,8 +52,6 @@ repos:
|
||||||
[types-pyopenssl, types-mock, types-cachetools, types-python-dateutil]
|
[types-pyopenssl, types-mock, types-cachetools, types-python-dateutil]
|
||||||
|
|
||||||
- repo: https://github.com/rtts/djhtml
|
- repo: https://github.com/rtts/djhtml
|
||||||
rev: v1.5.2
|
rev: 3.0.6
|
||||||
hooks:
|
hooks:
|
||||||
- id: djhtml
|
- id: djhtml
|
||||||
- id: djcss
|
|
||||||
- id: djjs
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ import stator.models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0001_initial"),
|
("activities", "0001_initial"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -10,7 +10,6 @@ import core.uploads
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0002_hashtag"),
|
("activities", "0002_hashtag"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -11,7 +11,6 @@ import stator.models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0003_identity_followers_etc"),
|
("users", "0003_identity_followers_etc"),
|
||||||
("activities", "0003_postattachment_null_thumb"),
|
("activities", "0003_postattachment_null_thumb"),
|
||||||
|
|
|
@ -14,7 +14,6 @@ def timelineevent_populate_published(apps, schema_editor):
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0004_emoji_post_emojis"),
|
("activities", "0004_emoji_post_emojis"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0005_report"),
|
("users", "0005_report"),
|
||||||
("activities", "0005_post_type_timeline_urls"),
|
("activities", "0005_post_type_timeline_urls"),
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0006_fanout_subject_identity_alter_fanout_type"),
|
("activities", "0006_fanout_subject_identity_alter_fanout_type"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0007_post_stats"),
|
("activities", "0007_post_stats"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0011_announcement"),
|
("users", "0011_announcement"),
|
||||||
("activities", "0008_state_and_post_indexes"),
|
("activities", "0008_state_and_post_indexes"),
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0013_stator_indexes"),
|
("users", "0013_stator_indexes"),
|
||||||
("activities", "0009_alter_timelineevent_index_together"),
|
("activities", "0009_alter_timelineevent_index_together"),
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0010_stator_indexes"),
|
("activities", "0010_stator_indexes"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0011_postinteraction_value_alter_postinteraction_type"),
|
("activities", "0011_postinteraction_value_alter_postinteraction_type"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0015_bookmark"),
|
("users", "0015_bookmark"),
|
||||||
("activities", "0012_in_reply_to_index"),
|
("activities", "0012_in_reply_to_index"),
|
||||||
|
|
|
@ -6,7 +6,6 @@ from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0013_postattachment_author"),
|
("activities", "0013_postattachment_author"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0014_post_content_vector_gin"),
|
("activities", "0014_post_content_vector_gin"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0015_alter_postinteraction_type"),
|
("activities", "0015_alter_postinteraction_type"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0017_stator_next_change"),
|
("activities", "0017_stator_next_change"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0018_timelineevent_dismissed"),
|
("activities", "0018_timelineevent_dismissed"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -6,7 +6,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|
|
@ -6,7 +6,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0008_follow_boosts"),
|
("users", "0008_follow_boosts"),
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("api", "0002_remove_token_code_token_revoked_alter_token_token_and_more"),
|
("api", "0002_remove_token_code_token_revoked_alter_token_token_and_more"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -10,7 +10,6 @@ import core.uploads
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|
|
@ -6,7 +6,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0016_hashtagfollow"),
|
("users", "0016_hashtagfollow"),
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("stator", "0001_initial"),
|
("stator", "0001_initial"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -16,7 +16,6 @@ import users.models.password_reset
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0001_initial"),
|
("users", "0001_initial"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0002_identity_discoverable"),
|
("users", "0002_identity_discoverable"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0003_identity_followers_etc"),
|
("users", "0003_identity_followers_etc"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -9,7 +9,6 @@ import users.models.report
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0004_emoji_post_emojis"),
|
("activities", "0004_emoji_post_emojis"),
|
||||||
("users", "0004_identity_admin_notes_identity_restriction_and_more"),
|
("users", "0004_identity_admin_notes_identity_restriction_and_more"),
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0005_report"),
|
("users", "0005_report"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0006_identity_actor_type"),
|
("users", "0006_identity_actor_type"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0007_remove_invite_email_invite_expires_invite_uses"),
|
("users", "0007_remove_invite_email_invite_expires_invite_uses"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0008_follow_boosts"),
|
("users", "0008_follow_boosts"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,7 +8,6 @@ import users.models.domain
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0009_state_and_post_indexes"),
|
("users", "0009_state_and_post_indexes"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0010_domain_state"),
|
("users", "0010_domain_state"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,7 +8,6 @@ import users.models.block
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0011_announcement"),
|
("users", "0011_announcement"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0012_block_states"),
|
("users", "0012_block_states"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0013_stator_indexes"),
|
("users", "0013_stator_indexes"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0012_in_reply_to_index"),
|
("activities", "0012_in_reply_to_index"),
|
||||||
("users", "0014_domain_notes"),
|
("users", "0014_domain_notes"),
|
||||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("activities", "0012_in_reply_to_index"),
|
("activities", "0012_in_reply_to_index"),
|
||||||
("users", "0015_bookmark"),
|
("users", "0015_bookmark"),
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0016_hashtagfollow"),
|
("users", "0016_hashtagfollow"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0017_identity_featured_collection_uri"),
|
("users", "0017_identity_featured_collection_uri"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0019_stator_next_change"),
|
("users", "0019_stator_next_change"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0020_alter_identity_local"),
|
("users", "0020_alter_identity_local"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("users", "0021_identity_aliases"),
|
("users", "0021_identity_aliases"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -19,7 +19,6 @@ class NodeInfoUsage(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
class NodeInfo(BaseModel):
|
class NodeInfo(BaseModel):
|
||||||
|
|
||||||
version: Literal["2.0"]
|
version: Literal["2.0"]
|
||||||
software: NodeInfoSoftware
|
software: NodeInfoSoftware
|
||||||
protocols: list[str] | None
|
protocols: list[str] | None
|
||||||
|
|
|
@ -9,7 +9,6 @@ from users.views.admin.generic import HTMXActionView
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class AnnouncementsRoot(ListView):
|
class AnnouncementsRoot(ListView):
|
||||||
|
|
||||||
template_name = "admin/announcements.html"
|
template_name = "admin/announcements.html"
|
||||||
paginate_by = 30
|
paginate_by = 30
|
||||||
|
|
||||||
|
@ -26,7 +25,6 @@ class AnnouncementsRoot(ListView):
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class AnnouncementCreate(CreateView):
|
class AnnouncementCreate(CreateView):
|
||||||
|
|
||||||
model = Announcement
|
model = Announcement
|
||||||
template_name = "admin/announcement_create.html"
|
template_name = "admin/announcement_create.html"
|
||||||
extra_context = {"section": "announcements"}
|
extra_context = {"section": "announcements"}
|
||||||
|
@ -45,7 +43,6 @@ class AnnouncementCreate(CreateView):
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class AnnouncementEdit(UpdateView):
|
class AnnouncementEdit(UpdateView):
|
||||||
|
|
||||||
model = Announcement
|
model = Announcement
|
||||||
template_name = "admin/announcement_edit.html"
|
template_name = "admin/announcement_edit.html"
|
||||||
extra_context = {"section": "announcements"}
|
extra_context = {"section": "announcements"}
|
||||||
|
@ -61,7 +58,6 @@ class AnnouncementEdit(UpdateView):
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class AnnouncementDelete(DeleteView):
|
class AnnouncementDelete(DeleteView):
|
||||||
|
|
||||||
model = Announcement
|
model = Announcement
|
||||||
template_name = "admin/announcement_delete.html"
|
template_name = "admin/announcement_delete.html"
|
||||||
success_url = Announcement.urls.admin_root
|
success_url = Announcement.urls.admin_root
|
||||||
|
|
|
@ -35,7 +35,6 @@ class DomainValidator(RegexValidator):
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class Domains(TemplateView):
|
class Domains(TemplateView):
|
||||||
|
|
||||||
template_name = "admin/domains.html"
|
template_name = "admin/domains.html"
|
||||||
|
|
||||||
def get_context_data(self):
|
def get_context_data(self):
|
||||||
|
@ -47,7 +46,6 @@ class Domains(TemplateView):
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class DomainCreate(FormView):
|
class DomainCreate(FormView):
|
||||||
|
|
||||||
template_name = "admin/domain_create.html"
|
template_name = "admin/domain_create.html"
|
||||||
extra_context = {"section": "domains"}
|
extra_context = {"section": "domains"}
|
||||||
|
|
||||||
|
@ -156,7 +154,6 @@ class DomainCreate(FormView):
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class DomainEdit(FormView):
|
class DomainEdit(FormView):
|
||||||
|
|
||||||
template_name = "admin/domain_edit.html"
|
template_name = "admin/domain_edit.html"
|
||||||
extra_context = {"section": "domains"}
|
extra_context = {"section": "domains"}
|
||||||
|
|
||||||
|
@ -250,7 +247,6 @@ class DomainEdit(FormView):
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class DomainDelete(TemplateView):
|
class DomainDelete(TemplateView):
|
||||||
|
|
||||||
template_name = "admin/domain_delete.html"
|
template_name = "admin/domain_delete.html"
|
||||||
|
|
||||||
def dispatch(self, request, domain):
|
def dispatch(self, request, domain):
|
||||||
|
|
|
@ -13,7 +13,6 @@ from users.views.admin.generic import HTMXActionView
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class EmojiRoot(ListView):
|
class EmojiRoot(ListView):
|
||||||
|
|
||||||
template_name = "admin/emoji.html"
|
template_name = "admin/emoji.html"
|
||||||
paginate_by = 50
|
paginate_by = 50
|
||||||
|
|
||||||
|
@ -41,7 +40,6 @@ class EmojiRoot(ListView):
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class EmojiCreate(FormView):
|
class EmojiCreate(FormView):
|
||||||
|
|
||||||
template_name = "admin/emoji_create.html"
|
template_name = "admin/emoji_create.html"
|
||||||
extra_context = {"section": "emoji"}
|
extra_context = {"section": "emoji"}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ from users.decorators import moderator_required
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class Hashtags(ListView):
|
class Hashtags(ListView):
|
||||||
|
|
||||||
template_name = "admin/hashtags.html"
|
template_name = "admin/hashtags.html"
|
||||||
paginate_by = 30
|
paginate_by = 30
|
||||||
|
|
||||||
|
@ -26,7 +25,6 @@ class Hashtags(ListView):
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class HashtagEdit(FormView):
|
class HashtagEdit(FormView):
|
||||||
|
|
||||||
template_name = "admin/hashtag_edit.html"
|
template_name = "admin/hashtag_edit.html"
|
||||||
extra_context = {"section": "hashtags"}
|
extra_context = {"section": "hashtags"}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ from users.models import Identity, IdentityStates
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class IdentitiesRoot(ListView):
|
class IdentitiesRoot(ListView):
|
||||||
|
|
||||||
template_name = "admin/identities.html"
|
template_name = "admin/identities.html"
|
||||||
paginate_by = 30
|
paginate_by = 30
|
||||||
|
|
||||||
|
@ -51,7 +50,6 @@ class IdentitiesRoot(ListView):
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class IdentityEdit(FormView):
|
class IdentityEdit(FormView):
|
||||||
|
|
||||||
template_name = "admin/identity_edit.html"
|
template_name = "admin/identity_edit.html"
|
||||||
extra_context = {
|
extra_context = {
|
||||||
"section": "identities",
|
"section": "identities",
|
||||||
|
|
|
@ -13,7 +13,6 @@ from users.models import Invite
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class InvitesRoot(ListView):
|
class InvitesRoot(ListView):
|
||||||
|
|
||||||
template_name = "admin/invites.html"
|
template_name = "admin/invites.html"
|
||||||
paginate_by = 30
|
paginate_by = 30
|
||||||
|
|
||||||
|
@ -29,7 +28,6 @@ class InvitesRoot(ListView):
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class InviteCreate(FormView):
|
class InviteCreate(FormView):
|
||||||
|
|
||||||
template_name = "admin/invite_create.html"
|
template_name = "admin/invite_create.html"
|
||||||
extra_context = {
|
extra_context = {
|
||||||
"section": "invites",
|
"section": "invites",
|
||||||
|
@ -65,7 +63,6 @@ class InviteCreate(FormView):
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class InviteView(FormView):
|
class InviteView(FormView):
|
||||||
|
|
||||||
template_name = "admin/invite_view.html"
|
template_name = "admin/invite_view.html"
|
||||||
extra_context = {
|
extra_context = {
|
||||||
"section": "invites",
|
"section": "invites",
|
||||||
|
|
|
@ -10,7 +10,6 @@ from users.models import Identity, Report
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class ReportsRoot(ListView):
|
class ReportsRoot(ListView):
|
||||||
|
|
||||||
template_name = "admin/reports.html"
|
template_name = "admin/reports.html"
|
||||||
paginate_by = 30
|
paginate_by = 30
|
||||||
|
|
||||||
|
@ -34,7 +33,6 @@ class ReportsRoot(ListView):
|
||||||
|
|
||||||
@method_decorator(moderator_required, name="dispatch")
|
@method_decorator(moderator_required, name="dispatch")
|
||||||
class ReportView(FormView):
|
class ReportView(FormView):
|
||||||
|
|
||||||
template_name = "admin/report_view.html"
|
template_name = "admin/report_view.html"
|
||||||
extra_context = {
|
extra_context = {
|
||||||
"section": "reports",
|
"section": "reports",
|
||||||
|
|
|
@ -24,7 +24,6 @@ class AdminSettingsPage(SettingsPage):
|
||||||
|
|
||||||
|
|
||||||
class BasicSettings(AdminSettingsPage):
|
class BasicSettings(AdminSettingsPage):
|
||||||
|
|
||||||
section = "basic"
|
section = "basic"
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -155,7 +154,6 @@ cache_field_defaults = {
|
||||||
|
|
||||||
|
|
||||||
class TuningSettings(AdminSettingsPage):
|
class TuningSettings(AdminSettingsPage):
|
||||||
|
|
||||||
section = "tuning"
|
section = "tuning"
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -196,7 +194,6 @@ class TuningSettings(AdminSettingsPage):
|
||||||
|
|
||||||
|
|
||||||
class PoliciesSettings(AdminSettingsPage):
|
class PoliciesSettings(AdminSettingsPage):
|
||||||
|
|
||||||
section = "policies"
|
section = "policies"
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
|
@ -7,7 +7,6 @@ from users.decorators import admin_required
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class Stator(TemplateView):
|
class Stator(TemplateView):
|
||||||
|
|
||||||
template_name = "admin/stator.html"
|
template_name = "admin/stator.html"
|
||||||
|
|
||||||
def get_context_data(self):
|
def get_context_data(self):
|
||||||
|
|
|
@ -10,7 +10,6 @@ from users.models import User
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class UsersRoot(ListView):
|
class UsersRoot(ListView):
|
||||||
|
|
||||||
template_name = "admin/users.html"
|
template_name = "admin/users.html"
|
||||||
paginate_by = 30
|
paginate_by = 30
|
||||||
|
|
||||||
|
@ -33,7 +32,6 @@ class UsersRoot(ListView):
|
||||||
|
|
||||||
@method_decorator(admin_required, name="dispatch")
|
@method_decorator(admin_required, name="dispatch")
|
||||||
class UserEdit(FormView):
|
class UserEdit(FormView):
|
||||||
|
|
||||||
template_name = "admin/user_edit.html"
|
template_name = "admin/user_edit.html"
|
||||||
extra_context = {
|
extra_context = {
|
||||||
"section": "users",
|
"section": "users",
|
||||||
|
|
|
@ -29,11 +29,9 @@ class Logout(LogoutView):
|
||||||
|
|
||||||
|
|
||||||
class Signup(FormView):
|
class Signup(FormView):
|
||||||
|
|
||||||
template_name = "auth/signup.html"
|
template_name = "auth/signup.html"
|
||||||
|
|
||||||
class form_class(forms.Form):
|
class form_class(forms.Form):
|
||||||
|
|
||||||
email = forms.EmailField(
|
email = forms.EmailField(
|
||||||
help_text="We will send a link to this email to create your account.",
|
help_text="We will send a link to this email to create your account.",
|
||||||
)
|
)
|
||||||
|
@ -126,11 +124,9 @@ class Signup(FormView):
|
||||||
|
|
||||||
|
|
||||||
class TriggerReset(FormView):
|
class TriggerReset(FormView):
|
||||||
|
|
||||||
template_name = "auth/trigger_reset.html"
|
template_name = "auth/trigger_reset.html"
|
||||||
|
|
||||||
class form_class(forms.Form):
|
class form_class(forms.Form):
|
||||||
|
|
||||||
email = forms.EmailField(
|
email = forms.EmailField(
|
||||||
help_text="We will send a reset link to this email",
|
help_text="We will send a reset link to this email",
|
||||||
)
|
)
|
||||||
|
@ -155,11 +151,9 @@ class TriggerReset(FormView):
|
||||||
|
|
||||||
|
|
||||||
class PerformReset(FormView):
|
class PerformReset(FormView):
|
||||||
|
|
||||||
template_name = "auth/perform_reset.html"
|
template_name = "auth/perform_reset.html"
|
||||||
|
|
||||||
class form_class(forms.Form):
|
class form_class(forms.Form):
|
||||||
|
|
||||||
password = forms.CharField(
|
password = forms.CharField(
|
||||||
widget=forms.PasswordInput,
|
widget=forms.PasswordInput,
|
||||||
help_text="Must be at least 8 characters, and contain both letters and numbers.",
|
help_text="Must be at least 8 characters, and contain both letters and numbers.",
|
||||||
|
|
|
@ -7,7 +7,6 @@ from users.views.base import IdentityViewMixin
|
||||||
|
|
||||||
|
|
||||||
class DeleteIdentity(IdentityViewMixin, FormView):
|
class DeleteIdentity(IdentityViewMixin, FormView):
|
||||||
|
|
||||||
template_name = "settings/delete.html"
|
template_name = "settings/delete.html"
|
||||||
extra_context = {"section": "delete"}
|
extra_context = {"section": "delete"}
|
||||||
|
|
||||||
|
|
|
@ -103,9 +103,9 @@ class CsvView(IdentityViewMixin, View):
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Cannot export attribute {attrname}")
|
raise ValueError(f"Cannot export attribute {attrname}")
|
||||||
# Make it into CSV format
|
# Make it into CSV format
|
||||||
if type(value) == bool:
|
if isinstance(value, bool):
|
||||||
value = "true" if value else "false"
|
value = "true" if value else "false"
|
||||||
elif type(value) == int:
|
elif isinstance(value, int):
|
||||||
value = str(value)
|
value = str(value)
|
||||||
row.append(value)
|
row.append(value)
|
||||||
writer.writerow(row)
|
writer.writerow(row)
|
||||||
|
|
|
@ -61,7 +61,6 @@ class TokenCreate(IdentityViewMixin, FormView):
|
||||||
|
|
||||||
|
|
||||||
class TokenEdit(IdentityViewMixin, DetailView):
|
class TokenEdit(IdentityViewMixin, DetailView):
|
||||||
|
|
||||||
template_name = "settings/token_edit.html"
|
template_name = "settings/token_edit.html"
|
||||||
extra_context = {"section": "tokens"}
|
extra_context = {"section": "tokens"}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue