mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2024-11-27 09:10:08 -05:00
Add client field to Account
This commit is contained in:
parent
358602edde
commit
5c48180a7c
24
brutaldon/migrations/0003_auto_20180424_1255.py
Normal file
24
brutaldon/migrations/0003_auto_20180424_1255.py
Normal file
@ -0,0 +1,24 @@
|
||||
# Generated by Django 2.0.4 on 2018-04-24 16:55
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
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'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='client',
|
||||
name='api_base_id',
|
||||
field=models.URLField(default='https://mastodon.social'),
|
||||
),
|
||||
]
|
@ -3,7 +3,7 @@ from django.conf import settings
|
||||
|
||||
class Client(models.Model):
|
||||
name = models.TextField(default = "brutaldon")
|
||||
api_base_id = models.URLField(default="mastodon.social")
|
||||
api_base_id = models.URLField(default="https://mastodon.social")
|
||||
client_id = models.TextField(null=True, blank=True)
|
||||
client_secret = models.TextField(null=True, blank=True)
|
||||
|
||||
@ -14,3 +14,4 @@ class Account(models.Model):
|
||||
username = models.CharField(max_length=80)
|
||||
django_user = models.ForeignKey(settings.AUTH_USER_MODEL, models.CASCADE, null=True)
|
||||
access_token = models.TextField(null=True, blank=True)
|
||||
client= models.ForeignKey(Client, models.SET_NULL, null=True)
|
||||
|
Loading…
Reference in New Issue
Block a user