Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group22
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
John Tamano
widget_group22
Commits
953b5f8c
Commit
953b5f8c
authored
Apr 08, 2022
by
Norberto Tadeo
😔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed minor lines in models.py, removed some lines
parent
669110ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
models.py
widget_group22/forum/models.py
+4
-5
No files found.
widget_group22/forum/models.py
View file @
953b5f8c
...
@@ -5,17 +5,16 @@ class Post(models.Model):
...
@@ -5,17 +5,16 @@ class Post(models.Model):
post_title
=
models
.
CharField
(
max_length
=
50
)
post_title
=
models
.
CharField
(
max_length
=
50
)
post_body
=
models
.
CharField
(
max_length
=
100000
)
post_body
=
models
.
CharField
(
max_length
=
100000
)
pub_date
=
models
.
DateField
(
auto_now_add
=
True
)
pub_date
=
models
.
DateField
(
auto_now_add
=
True
)
author
=
models
.
ForeignKey
(
WidgetUser
,
null
=
True
,
on_delete
=
models
.
CASCADE
,
default
=
"Anonymous"
)
author
=
models
.
ForeignKey
(
WidgetUser
,
on_delete
=
models
.
CASCADE
,
default
=
None
)
def
__str__
(
self
):
def
__str__
(
self
):
return
'{}: {}'
.
format
(
self
.
post_title
,
self
.
pub_date
)
return
'{}: {}'
.
format
(
self
.
post_title
,
self
.
pub_date
)
class
Reply
(
models
.
Model
):
class
Reply
(
models
.
Model
):
post
=
models
.
ForeignKey
(
Post
,
null
=
True
,
on_delete
=
models
.
CASCADE
,
default
=
None
)
post
=
models
.
ForeignKey
(
Post
,
on_delete
=
models
.
CASCADE
,
default
=
None
)
reply_body
=
models
.
CharField
(
max_length
=
100000
)
reply_body
=
models
.
CharField
(
max_length
=
100000
)
pub_date
=
models
.
DateField
(
auto_now_add
=
True
)
pub_date
=
models
.
DateField
(
auto_now_add
=
True
)
author
=
models
.
ForeignKey
(
WidgetUser
,
null
=
True
,
on_delete
=
models
.
CASCADE
,
default
=
'Anonymous'
)
author
=
models
.
ForeignKey
(
WidgetUser
,
on_delete
=
models
.
CASCADE
,
default
=
None
)
active
=
models
.
BooleanField
(
default
=
True
)
def
__str__
(
self
):
def
__str__
(
self
):
if
len
(
self
.
reply_body
)
>=
50
:
if
len
(
self
.
reply_body
)
>=
50
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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