2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

Custom URL validators for more fields

This commit is contained in:
Oliver Walters
2019-09-14 00:08:49 +10:00
parent 4ac8353099
commit 70e07470db
7 changed files with 80 additions and 7 deletions

View File

@ -0,0 +1,19 @@
# Generated by Django 2.2.5 on 2019-09-13 14:07
import InvenTree.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('build', '0005_auto_20190604_2217'),
]
operations = [
migrations.AlterField(
model_name='build',
name='URL',
field=InvenTree.fields.InvenTreeURLField(blank=True, help_text='Link to external URL'),
),
]

View File

@ -17,6 +17,7 @@ from django.db.models import Sum
from django.core.validators import MinValueValidator
from InvenTree.status_codes import BuildStatus
from InvenTree.fields import InvenTreeURLField
from stock.models import StockItem
from part.models import Part, BomItem
@ -89,7 +90,7 @@ class Build(models.Model):
related_name='builds_completed'
)
URL = models.URLField(blank=True, help_text='Link to external URL')
URL = InvenTreeURLField(blank=True, help_text='Link to external URL')
notes = models.TextField(blank=True, help_text='Extra build notes')
""" Notes attached to each build output """