From ada102a516b06a20b82a827953af946d7cc30630 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 12 Apr 2021 11:48:41 +0200 Subject: [PATCH] changed some fields from CharField to URLField --- input/migrations/0058_auto_20210412_0946.py | 43 +++++++++++++++++++++ input/models.py | 10 ++--- 2 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 input/migrations/0058_auto_20210412_0946.py diff --git a/input/migrations/0058_auto_20210412_0946.py b/input/migrations/0058_auto_20210412_0946.py new file mode 100644 index 0000000..4186de1 --- /dev/null +++ b/input/migrations/0058_auto_20210412_0946.py @@ -0,0 +1,43 @@ +# Generated by Django 3.1.1 on 2021-04-12 09:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('input', '0057_auto_20210104_0937'), + ] + + operations = [ + migrations.AlterField( + model_name='honorarycertificate', + name='request_url', + field=models.URLField(max_length=2000, verbose_name='Antrag (URL)'), + ), + migrations.AlterField( + model_name='ifg', + name='url', + field=models.URLField(help_text='Bitte gib den Link zu deiner Anfrage bei Frag den Staat an.', max_length=2000, verbose_name='URL'), + ), + migrations.AlterField( + model_name='project', + name='otrs', + field=models.URLField(max_length=300, null=True, verbose_name='OTRS-Link'), + ), + migrations.AlterField( + model_name='project', + name='page', + field=models.URLField(blank=True, max_length=2000, null=True, verbose_name='Link zur Projektseite'), + ), + migrations.AlterField( + model_name='project', + name='plan', + field=models.URLField(blank=True, max_length=2000, null=True, verbose_name='Link zum Förderplan'), + ), + migrations.AlterField( + model_name='travel', + name='request_url', + field=models.URLField(max_length=2000, verbose_name='Antrag (URL)'), + ), + ] diff --git a/input/models.py b/input/models.py index c68bd83..7fb9647 100644 --- a/input/models.py +++ b/input/models.py @@ -50,9 +50,9 @@ class Project(Volunteer): description = models.CharField(max_length=500, verbose_name="Kurzbeschreibung", null=True) start = models.DateField('Startdatum', null=True, blank= True) end = models.DateField('Erwartetes Projektende', null=True) - otrs = models.CharField(max_length=300, null=True, verbose_name='OTRS-Link') - plan = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Link zum Förderplan") - page = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Link zur Projektseite") + otrs = models.URLField(max_length=300, null=True, verbose_name='OTRS-Link') + plan = models.URLField(max_length=2000, null=True, blank=True, verbose_name="Link zum Förderplan") + page = models.URLField(max_length=2000, null=True, blank=True, verbose_name="Link zur Projektseite") urls = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Weitere Links") group = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Mitorganisierende") location = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Ort/Adresse/Location") @@ -86,7 +86,7 @@ class Project(Volunteer): class Intern(Volunteer): '''abstrat base class for data entry from /intern (except Project)''' - request_url = models.CharField(max_length=2000, verbose_name='Antrag (URL)') + request_url = models.URLField(max_length=2000, verbose_name='Antrag (URL)') class Meta: abstract = True @@ -162,7 +162,7 @@ class Literature(Grant): help_text="Bitte gib an, wo du das Werk kaufen möchtest.") class IFG(Grant): - url = models.CharField(max_length=2000, verbose_name="URL", + url = models.URLField(max_length=2000, verbose_name="URL", help_text="Bitte gib den Link zu deiner Anfrage bei Frag den Staat an.") def __str__(self):