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
f3a3e08c
Commit
f3a3e08c
authored
Jun 02, 2020
by
felix.herrmann
Browse files
feat(maxlength): set max_length for BleachFields, fixes
#55
,
#53
parent
ad85cfe3
Changes
2
Hide whitespace changes
Inline
Side-by-side
discuss_data/ddusers/migrations/0004_auto_20200602_0635.py
0 → 100644
View file @
f3a3e08c
# Generated by Django 2.2.12 on 2020-06-02 06:35
from
django.db
import
migrations
import
django_bleach.models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'ddusers'
,
'0003_auto_20200506_1402'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'foi'
,
name
=
'description'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
800
),
),
migrations
.
AlterField
(
model_name
=
'institution'
,
name
=
'description'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
800
),
),
migrations
.
AlterField
(
model_name
=
'user'
,
name
=
'research_profile_full'
,
field
=
django_bleach
.
models
.
BleachField
(
blank
=
True
,
max_length
=
800
,
verbose_name
=
'Research Profile (full)'
),
),
]
discuss_data/ddusers/models.py
View file @
f3a3e08c
...
...
@@ -88,7 +88,7 @@ class User(AbstractUser):
"Country"
,
related_name
=
"user_country"
,
blank
=
True
)
research_profile_full
=
BleachField
(
blank
=
True
,
verbose_name
=
"Research Profile (full)"
blank
=
True
,
max_length
=
800
,
verbose_name
=
"Research Profile (full)"
)
research_profile_short
=
BleachField
(
max_length
=
280
,
...
...
@@ -256,7 +256,7 @@ class Country(models.Model):
class
FOI
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
200
)
description
=
BleachField
(
blank
=
True
)
description
=
BleachField
(
max_length
=
800
,
blank
=
True
)
is_country
=
models
.
BooleanField
(
default
=
False
)
def
__str__
(
self
):
...
...
@@ -313,7 +313,7 @@ class Institution(models.Model):
image
=
models
.
ImageField
(
blank
=
True
,
null
=
True
)
image_large
=
models
.
ImageField
(
blank
=
True
,
null
=
True
)
website
=
models
.
URLField
(
blank
=
True
)
description
=
BleachField
(
blank
=
True
)
description
=
BleachField
(
max_length
=
800
,
blank
=
True
)
short_description
=
models
.
CharField
(
max_length
=
400
,
blank
=
True
)
location
=
models
.
CharField
(
max_length
=
20
,
blank
=
True
)
city
=
models
.
CharField
(
max_length
=
120
)
...
...
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