Skip to content

Commit e3bb164

Browse files
committed
Make UserTaskStatus.url a TextField
1 parent fade2d5 commit e3bb164

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

CHANGELOG.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ Unreleased
1616

1717
*
1818

19+
[0.1.7] - 2019-05-29
20+
~~~~~~~~~~~~~~~~~~~~
21+
22+
Changed
23+
+++++++
24+
25+
* Make ``UserTaskArtifact.url`` a ``TextField`` with a ``URLValidator``
26+
instead of a ``URLField``.
27+
28+
1929
[0.1.6] - 2019-05-29
2030
~~~~~~~~~~~~~~~~~~~~
2131

user_tasks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from django.dispatch import Signal
88

9-
__version__ = '0.1.6'
9+
__version__ = '0.1.7'
1010

1111
default_app_config = 'user_tasks.apps.UserTasksConfig' # pylint: disable=invalid-name
1212

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.11.20 on 2019-05-29 17:51
3+
from __future__ import unicode_literals
4+
5+
import django.core.validators
6+
from django.db import migrations, models
7+
8+
9+
class Migration(migrations.Migration):
10+
11+
dependencies = [
12+
('user_tasks', '0003_url_max_length'),
13+
]
14+
15+
operations = [
16+
migrations.AlterField(
17+
model_name='usertaskartifact',
18+
name='url',
19+
field=models.TextField(blank=True, validators=[django.core.validators.URLValidator()]),
20+
),
21+
]

user_tasks/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from celery import current_app
1212

1313
from django.conf import settings as django_settings
14+
from django.core.validators import URLValidator
1415
from django.db import models, transaction
1516
from django.db.models import Q
1617
from django.db.models.expressions import F
@@ -237,7 +238,7 @@ class UserTaskArtifact(TimeStampedModel):
237238
help_text='Distinguishes between multiple artifact types for the same task')
238239
file = models.FileField(null=True, blank=True, storage=settings.USER_TASKS_ARTIFACT_STORAGE,
239240
upload_to='user_tasks/%Y/%m/%d/')
240-
url = models.URLField(blank=True, max_length=512)
241+
url = models.TextField(blank=True, validators=[URLValidator()])
241242
text = models.TextField(blank=True)
242243

243244
def __str__(self):

0 commit comments

Comments
 (0)