From 76b9576f056216ce9b2cb840cc367a860add626f Mon Sep 17 00:00:00 2001 From: j Date: Tue, 19 Dec 2017 13:44:32 +0100 Subject: [PATCH] links can be longer --- content/migrations/0006_auto_20171219_1243.py | 20 +++++++++++++++++++ content/models.py | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 content/migrations/0006_auto_20171219_1243.py diff --git a/content/migrations/0006_auto_20171219_1243.py b/content/migrations/0006_auto_20171219_1243.py new file mode 100644 index 0000000..1fa9495 --- /dev/null +++ b/content/migrations/0006_auto_20171219_1243.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.7 on 2017-12-19 12:43 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('content', '0005_auto_20171219_1032'), + ] + + operations = [ + migrations.AlterField( + model_name='link', + name='url', + field=models.URLField(max_length=4096), + ), + ] diff --git a/content/models.py b/content/models.py index 36eb2e2..058f771 100644 --- a/content/models.py +++ b/content/models.py @@ -321,11 +321,14 @@ class Image(models.Model): class Link(models.Model): content = models.ForeignKey('Content') - url = models.URLField() + url = models.URLField(max_length=4096) description = models.TextField(blank=True, null=True) date = models.DateTimeField(auto_now_add=True) order = models.IntegerField(blank=True, null=True) + def __unicode__(self): + return self.url + class Videos(models.Model): # not used sha1 = models.CharField(max_length=50) href = models.CharField(max_length=255)