Added Library model to have more granular federation management

This commit is contained in:
Eliot Berriot 2018-04-06 18:49:29 +02:00
commit f273faf9de
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
14 changed files with 159 additions and 53 deletions

View file

@ -1,4 +1,4 @@
# Generated by Django 2.0.3 on 2018-04-06 13:19
# Generated by Django 2.0.3 on 2018-04-06 16:21
from django.db import migrations, models
import django.db.models.deletion
@ -36,6 +36,21 @@ class Migration(migrations.Migration):
('target', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='received_follow_requests', to='federation.Actor')),
],
),
migrations.CreateModel(
name='Library',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('creation_date', models.DateTimeField(default=django.utils.timezone.now)),
('modification_date', models.DateTimeField(auto_now=True)),
('fetched_date', models.DateTimeField(blank=True, null=True)),
('uuid', models.UUIDField(default=uuid.uuid4)),
('url', models.URLField()),
('federation_enabled', models.BooleanField()),
('download_files', models.BooleanField()),
('files_count', models.PositiveIntegerField(blank=True, null=True)),
('actor', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='library', to='federation.Actor')),
],
),
migrations.AddField(
model_name='actor',
name='followers',