Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nishaespera_reading
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
Julia Anishka
nishaespera_reading
Commits
d4e7dea4
Commit
d4e7dea4
authored
Mar 27, 2023
by
Julia Anishka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed error in line 21 of models.py
parent
182c058c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
1 deletion
+20
-1
models.cpython-310.pyc
...pera_reading/bookshelf/__pycache__/models.cpython-310.pyc
+0
-0
0003_alter_books_blurb.py
...ra_reading/bookshelf/migrations/0003_alter_books_blurb.py
+19
-0
0003_alter_books_blurb.cpython-310.pyc
...ations/__pycache__/0003_alter_books_blurb.cpython-310.pyc
+0
-0
models.py
nishaespera_reading/bookshelf/models.py
+1
-1
db.sqlite3
nishaespera_reading/db.sqlite3
+0
-0
No files found.
nishaespera_reading/bookshelf/__pycache__/models.cpython-310.pyc
View file @
d4e7dea4
No preview for this file type
nishaespera_reading/bookshelf/migrations/0003_alter_books_blurb.py
0 → 100644
View file @
d4e7dea4
# Generated by Django 3.2 on 2023-03-27 12:27
import
bookshelf.models
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'bookshelf'
,
'0002_alter_books_blurb'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'books'
,
name
=
'blurb'
,
field
=
models
.
TextField
(
validators
=
[
bookshelf
.
models
.
verify_wordCount
]),
),
]
nishaespera_reading/bookshelf/migrations/__pycache__/0003_alter_books_blurb.cpython-310.pyc
0 → 100644
View file @
d4e7dea4
File added
nishaespera_reading/bookshelf/models.py
View file @
d4e7dea4
...
@@ -18,7 +18,7 @@ def verify_int(value):
...
@@ -18,7 +18,7 @@ def verify_int(value):
raise
ValidationError
(
'ISBN must only be integers.'
)
raise
ValidationError
(
'ISBN must only be integers.'
)
def
verify_wordCount
(
value
):
def
verify_wordCount
(
value
):
word_count
=
len
(
value
.
split
(
))
word_count
=
str
(
len
(
value
.
split
()
))
if
word_count
<
100
:
if
word_count
<
100
:
raise
ValidationError
(
'Word count is less than 100. Required range is 100 to 200 words.'
)
raise
ValidationError
(
'Word count is less than 100. Required range is 100 to 200 words.'
)
if
word_count
>
200
:
if
word_count
>
200
:
...
...
nishaespera_reading/db.sqlite3
View file @
d4e7dea4
No preview for this file type
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