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
c698d1f4
Commit
c698d1f4
authored
Jun 02, 2020
by
felix.herrmann
Browse files
feat(maxlength): set max_length for BleachFields in ddcomments
parent
f3a3e08c
Changes
2
Hide whitespace changes
Inline
Side-by-side
discuss_data/ddcomments/migrations/0024_auto_20200602_0644.py
0 → 100644
View file @
c698d1f4
# Generated by Django 2.2.12 on 2020-06-02 06:44
from
django.db
import
migrations
import
django_bleach.models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'ddcomments'
,
'0023_comment_deleted'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'comment'
,
name
=
'text'
,
field
=
django_bleach
.
models
.
BleachField
(
max_length
=
1200
),
),
migrations
.
AlterField
(
model_name
=
'notification'
,
name
=
'text'
,
field
=
django_bleach
.
models
.
BleachField
(
max_length
=
12000
),
),
]
discuss_data/ddcomments/models.py
View file @
c698d1f4
...
...
@@ -37,7 +37,7 @@ class Notification(MPTTModel):
notification_type
=
models
.
CharField
(
max_length
=
4
,
choices
=
NOTIFICATION_TYPE_CHOICES
,
default
=
PUBLIC
,
)
text
=
BleachField
()
text
=
BleachField
(
max_length
=
12000
)
date_added
=
models
.
DateTimeField
(
auto_now_add
=
True
)
date_edited
=
models
.
DateTimeField
(
auto_now
=
True
)
owner
=
models
.
ForeignKey
(
...
...
@@ -101,7 +101,7 @@ class Comment(MPTTModel):
comment_type
=
models
.
CharField
(
max_length
=
4
,
choices
=
COMMENT_TYPE_CHOICES
,
default
=
PUBLIC
,
)
text
=
BleachField
()
text
=
BleachField
(
max_length
=
1200
)
date_added
=
models
.
DateTimeField
(
auto_now_add
=
True
)
date_edited
=
models
.
DateTimeField
(
auto_now
=
True
)
owner
=
models
.
ForeignKey
(
...
...
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