Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Discuss Data Project
Discuss Data
Commits
453ac0d7
Commit
453ac0d7
authored
Jun 02, 2020
by
felix.herrmann
Browse files
feat(maxlength): set higher values for max_length in dddatasets
parent
aa349dac
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
discuss_data/dddatasets/migrations/0015_auto_2020060
1_2210
.py
→
discuss_data/dddatasets/migrations/0015_auto_2020060
2_1001
.py
View file @
453ac0d7
# Generated by Django 2.2.12 on 2020-06-0
1 22:10
# Generated by Django 2.2.12 on 2020-06-0
2 10:01
from
django.db
import
migrations
import
django_bleach.models
...
...
@@ -14,46 +14,56 @@ class Migration(migrations.Migration):
migrations
.
AlterField
(
model_name
=
'category'
,
name
=
'description'
,
field
=
django_bleach
.
models
.
BleachField
(
max_length
=
8
00
),
field
=
django_bleach
.
models
.
BleachField
(
max_length
=
20
00
),
),
migrations
.
AlterField
(
model_name
=
'dataset'
,
name
=
'description'
,
field
=
django_bleach
.
models
.
BleachField
(
max_length
=
8
00
,
verbose_name
=
'Technical description'
),
field
=
django_bleach
.
models
.
BleachField
(
max_length
=
24
00
,
verbose_name
=
'Technical description'
),
),
migrations
.
AlterField
(
model_name
=
'dataset'
,
name
=
'funding'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
4
00
),
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
12
00
),
),
migrations
.
AlterField
(
model_name
=
'dataset'
,
name
=
'institutional_affiliation'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
4
00
),
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
12
00
),
),
migrations
.
AlterField
(
model_name
=
'dataset'
,
name
=
'related_dataset_text'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
8
00
),
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
12
00
),
),
migrations
.
AlterField
(
model_name
=
'dataset'
,
name
=
'sources_of_data'
,
field
=
django_bleach
.
models
.
BleachField
(
max_length
=
800
),
field
=
django_bleach
.
models
.
BleachField
(
max_length
=
6000
),
),
migrations
.
AlterField
(
model_name
=
'datasetexternallink'
,
name
=
'site_description'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
help_text
=
'Brief description of the external repository or web site'
,
max_length
=
400
),
),
migrations
.
AlterField
(
model_name
=
'datasetexternallink'
,
name
=
'site_text'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
help_text
=
'In-depth description of the external repository or web site'
,
max_length
=
800
),
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
help_text
=
'In-depth description of the external repository or web site'
,
max_length
=
2000
),
),
migrations
.
AlterField
(
model_name
=
'documentation'
,
name
=
'description'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
2000
),
),
migrations
.
AlterField
(
model_name
=
'documentation'
,
name
=
'text'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
8
00
),
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
120
00
),
),
migrations
.
AlterField
(
model_name
=
'license'
,
name
=
'individual_license'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
8
00
),
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
120
00
),
),
]
discuss_data/dddatasets/models.py
View file @
453ac0d7
...
...
@@ -67,7 +67,7 @@ class Category(models.Model):
name
=
models
.
CharField
(
max_length
=
400
)
slug
=
models
.
CharField
(
max_length
=
400
)
image
=
models
.
ImageField
(
blank
=
True
,
null
=
True
)
description
=
BleachField
(
max_length
=
8
00
)
description
=
BleachField
(
max_length
=
20
00
)
sponsors
=
models
.
ManyToManyField
(
"Sponsor"
,
blank
=
True
,
related_name
=
"category_sponsors_sponsor"
)
...
...
@@ -199,7 +199,7 @@ class License(models.Model):
related_name
=
"license_license_page"
,
on_delete
=
models
.
PROTECT
,
)
individual_license
=
BleachField
(
blank
=
True
,
max_length
=
8
00
)
individual_license
=
BleachField
(
blank
=
True
,
max_length
=
120
00
)
def
get_license_name
(
self
):
if
self
.
license_type
==
"STD"
:
...
...
@@ -277,8 +277,8 @@ class Documentation(models.Model):
subtitle
=
models
.
CharField
(
max_length
=
200
,
blank
=
True
)
docu_type
=
models
.
CharField
(
max_length
=
3
,
choices
=
DOCU_TYPES
,
default
=
"GEN"
,)
file
=
models
.
FileField
(
blank
=
True
,
null
=
True
)
# upload_to='datasets/')
description
=
BleachField
(
max_length
=
2
8
0
,
blank
=
True
)
text
=
BleachField
(
blank
=
True
,
max_length
=
8
00
)
description
=
BleachField
(
max_length
=
2
00
0
,
blank
=
True
)
text
=
BleachField
(
blank
=
True
,
max_length
=
120
00
)
public
=
models
.
BooleanField
(
default
=
False
)
def
__str__
(
self
):
...
...
@@ -317,13 +317,13 @@ class DataSetExternalLink(models.Model):
max_length
=
200
,
help_text
=
_
(
"Title of the external repository or web site"
),
)
site_description
=
BleachField
(
max_length
=
28
0
,
max_length
=
40
0
,
blank
=
True
,
help_text
=
_
(
"Brief description of the external repository or web site"
),
)
site_text
=
BleachField
(
blank
=
True
,
max_length
=
8
00
,
max_length
=
20
00
,
help_text
=
_
(
"In-depth description of the external repository or web site"
),
)
...
...
@@ -409,9 +409,9 @@ class DataSet(models.Model):
datatypes
=
models
.
ManyToManyField
(
"DataType"
,
related_name
=
"dataset_datatypes_datatype"
)
description
=
BleachField
(
verbose_name
=
"Technical description"
,
max_length
=
8
00
)
description
=
BleachField
(
verbose_name
=
"Technical description"
,
max_length
=
24
00
)
keyword_tags
=
TaggableManager
(
"KeywordTags"
,
blank
=
True
,
through
=
KeywordTags
)
sources_of_data
=
BleachField
(
max_length
=
8
00
)
sources_of_data
=
BleachField
(
max_length
=
60
00
)
languages_of_data
=
TaggableManager
(
"LanguageTags"
,
blank
=
True
,
through
=
LanguageTags
)
...
...
@@ -449,7 +449,7 @@ class DataSet(models.Model):
null
=
True
,
)
related_dataset_text
=
BleachField
(
blank
=
True
,
max_length
=
8
00
)
related_dataset_text
=
BleachField
(
blank
=
True
,
max_length
=
12
00
)
related_dataset
=
models
.
ManyToManyField
(
"DataSet"
,
related_name
=
"dataset_related_dataset_dataset"
,
...
...
@@ -457,11 +457,11 @@ class DataSet(models.Model):
help_text
=
_
(
"Undo choice with CTRL–Mouse Click"
),
)
# context = models.TextField(blank=True,)
institutional_affiliation
=
BleachField
(
blank
=
True
,
max_length
=
4
00
)
institutional_affiliation
=
BleachField
(
blank
=
True
,
max_length
=
12
00
)
sponsors
=
models
.
ManyToManyField
(
"Sponsor"
,
blank
=
True
,
related_name
=
"dataset_sponsors"
)
funding
=
BleachField
(
blank
=
True
,
max_length
=
4
00
)
funding
=
BleachField
(
blank
=
True
,
max_length
=
12
00
)
publications
=
models
.
ManyToManyField
(
"ddpublications.Publication"
,
blank
=
True
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment