increase client id size limit as catodon/firefish may generate lengthy ids
This commit is contained in:
parent
e6ec9b1f9d
commit
c664f2ce4e
2 changed files with 54 additions and 9 deletions
|
@ -0,0 +1,48 @@
|
||||||
|
# Generated by Django 4.2.9 on 2024-01-14 18:13
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("mastodon", "0003_mastodonapplication_reachable"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="mastodonapplication",
|
||||||
|
name="api_domain",
|
||||||
|
field=models.CharField(
|
||||||
|
blank=True, max_length=200, verbose_name="domain for api call"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="mastodonapplication",
|
||||||
|
name="app_id",
|
||||||
|
field=models.CharField(max_length=200, verbose_name="in-site app id"),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="mastodonapplication",
|
||||||
|
name="client_id",
|
||||||
|
field=models.CharField(max_length=200, verbose_name="client id"),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="mastodonapplication",
|
||||||
|
name="client_secret",
|
||||||
|
field=models.CharField(max_length=200, verbose_name="client secret"),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="mastodonapplication",
|
||||||
|
name="domain_name",
|
||||||
|
field=models.CharField(
|
||||||
|
max_length=200, unique=True, verbose_name="site domain name"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="mastodonapplication",
|
||||||
|
name="server_version",
|
||||||
|
field=models.CharField(
|
||||||
|
blank=True, max_length=200, verbose_name="type and verion"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -4,12 +4,12 @@ from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
|
||||||
class MastodonApplication(models.Model):
|
class MastodonApplication(models.Model):
|
||||||
domain_name = models.CharField(_("site domain name"), max_length=100, unique=True)
|
domain_name = models.CharField(_("site domain name"), max_length=200, unique=True)
|
||||||
api_domain = models.CharField(_("domain for api call"), max_length=100, blank=True)
|
api_domain = models.CharField(_("domain for api call"), max_length=200, blank=True)
|
||||||
server_version = models.CharField(_("type and verion"), max_length=100, blank=True)
|
server_version = models.CharField(_("type and verion"), max_length=200, blank=True)
|
||||||
app_id = models.CharField(_("in-site app id"), max_length=100)
|
app_id = models.CharField(_("in-site app id"), max_length=200)
|
||||||
client_id = models.CharField(_("client id"), max_length=100)
|
client_id = models.CharField(_("client id"), max_length=200)
|
||||||
client_secret = models.CharField(_("client secret"), max_length=100)
|
client_secret = models.CharField(_("client secret"), max_length=200)
|
||||||
vapid_key = models.CharField(_("vapid key"), max_length=200, null=True, blank=True)
|
vapid_key = models.CharField(_("vapid key"), max_length=200, null=True, blank=True)
|
||||||
star_mode = models.PositiveIntegerField(
|
star_mode = models.PositiveIntegerField(
|
||||||
_("0: custom emoji; 1: unicode moon; 2: text"), blank=False, default=0
|
_("0: custom emoji; 1: unicode moon; 2: text"), blank=False, default=0
|
||||||
|
@ -22,9 +22,6 @@ class MastodonApplication(models.Model):
|
||||||
is_proxy = models.BooleanField(default=False, blank=True)
|
is_proxy = models.BooleanField(default=False, blank=True)
|
||||||
proxy_to = models.CharField(max_length=100, blank=True, default="")
|
proxy_to = models.CharField(max_length=100, blank=True, default="")
|
||||||
|
|
||||||
# website
|
|
||||||
# name
|
|
||||||
# redirect_uris
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.domain_name
|
return self.domain_name
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue