Skip to content

Commit 4693de0

Browse files
authored
Merge branch 'main' into otn_softdel
2 parents 4377c6d + 26834b6 commit 4693de0

30 files changed

+365
-82
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ pydis_site/apps/api/viewsets/bot/infraction.py @MarkKoz
66
pydis_site/apps/home/** @ks129
77

88
# Django ORM
9-
**/migrations/** @Akarys42
10-
**/models/** @Akarys42 @Den4200
9+
**/models/** @Den4200
1110

1211
# CI & Docker
13-
.github/workflows/** @MarkKoz @Akarys42 @SebastiaanZ @Den4200 @ks129
14-
Dockerfile @MarkKoz @Akarys42 @Den4200
15-
docker-compose.yml @MarkKoz @Akarys42 @Den4200
16-
17-
# Tools
18-
poetry.lock @Akarys42
19-
pyproject.toml @Akarys42
12+
.github/workflows/** @MarkKoz @SebastiaanZ @Den4200 @ks129
13+
Dockerfile @MarkKoz @Den4200
14+
docker-compose.yml @MarkKoz @Den4200
2015

2116
# Metricity
2217
pydis_site/apps/api/models/bot/metricity.py @jb3

poetry.lock

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pydis_site/apps/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default_app_config = 'pydis_site.apps.api.apps.ApiConfig'

pydis_site/apps/api/apps.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@
44
class ApiConfig(AppConfig):
55
"""Django AppConfig for the API app."""
66

7-
name = 'api'
7+
name = 'pydis_site.apps.api'
8+
9+
def ready(self) -> None:
10+
"""
11+
Gets called as soon as the registry is fully populated.
12+
13+
https://docs.djangoproject.com/en/3.2/ref/applications/#django.apps.AppConfig.ready
14+
"""
15+
import pydis_site.apps.api.signals # noqa: F401
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.0.14 on 2021-10-27 17:44
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('api', '0073_otn_allow_GT_and_LT'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='reminder',
15+
name='failures',
16+
field=models.IntegerField(default=0, help_text='Number of times we attempted to send the reminder and failed.'),
17+
),
18+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.0.14 on 2021-11-17 10:24
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('api', '0074_reminder_failures'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='filterlist',
15+
name='type',
16+
field=models.CharField(choices=[('GUILD_INVITE', 'Guild Invite'), ('FILE_FORMAT', 'File Format'), ('DOMAIN_NAME', 'Domain Name'), ('FILTER_TOKEN', 'Filter Token'), ('REDIRECT', 'Redirect')], help_text='The type of allowlist this is on.', max_length=50),
17+
),
18+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.0.14 on 2021-11-10 22:06
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('api', '0074_reminder_failures'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='infraction',
15+
name='dm_sent',
16+
field=models.BooleanField(help_text='Whether a DM was sent to the user when infraction was applied.', null=True),
17+
),
18+
]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Generated by Django 3.0.14 on 2021-11-25 19:41
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('api', '0075_infraction_dm_sent'),
10+
('api', '0075_add_redirects_filter'),
11+
]
12+
13+
operations = [
14+
]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Generated by Django 3.1.13 on 2021-11-27 12:27
2+
3+
import django.contrib.postgres.fields
4+
from django.db import migrations, models
5+
import pydis_site.apps.api.models.utils
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
('api', '0076_merge_20211125_1941'),
12+
]
13+
14+
operations = [
15+
migrations.AlterField(
16+
model_name='botsetting',
17+
name='data',
18+
field=models.JSONField(help_text='The actual settings of this setting.'),
19+
),
20+
migrations.AlterField(
21+
model_name='deletedmessage',
22+
name='embeds',
23+
field=django.contrib.postgres.fields.ArrayField(base_field=models.JSONField(validators=[pydis_site.apps.api.models.utils.validate_embed]), blank=True, help_text='Embeds attached to this message.', size=None),
24+
),
25+
]

pydis_site/apps/api/models/bot/bot_setting.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from django.contrib.postgres import fields as pgfields
21
from django.core.exceptions import ValidationError
32
from django.db import models
43

@@ -24,6 +23,6 @@ class BotSetting(ModelReprMixin, models.Model):
2423
max_length=50,
2524
validators=(validate_bot_setting_name,)
2625
)
27-
data = pgfields.JSONField(
26+
data = models.JSONField(
2827
help_text="The actual settings of this setting."
2928
)

0 commit comments

Comments
 (0)