diff --git a/admin.py b/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..13370eb9c2d30adf23697b66dade78891f3becf6 --- /dev/null +++ b/admin.py @@ -0,0 +1,4 @@ +from django.contrib import admin +from .models import LDPSource + +admin.site.register(LDPSource) diff --git a/migrations/0001_initial.py b/migrations/0001_initial.py new file mode 100644 index 0000000000000000000000000000000000000000..8edc9efa33aa577d1ac751740ae7bbc07eaa1beb --- /dev/null +++ b/migrations/0001_initial.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-02-28 19:31 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='LDPSource', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('container', models.URLField()), + ('federation', models.CharField(max_length=255)), + ], + ), + ] diff --git a/migrations/__init__.py b/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/models.py b/models.py new file mode 100644 index 0000000000000000000000000000000000000000..a15e755c1e1a4072a47f82b4ad85c342f8cc4067 --- /dev/null +++ b/models.py @@ -0,0 +1,11 @@ +from django.db import models + +class LDPSource(models.Model): + container = models.URLField() + federation = models.CharField(max_length=255) + + class Meta: + rdf_type = 'hd:federation' + + def __str__(self): + return "{}: {}".format(self.federation, self.container)