Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PixieDust-LastMinuteSurpluss
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
Erick Gabriel T. Lopez
PixieDust-LastMinuteSurpluss
Commits
18a63cb8
Commit
18a63cb8
authored
Dec 01, 2022
by
Mikael Giannes M. Bernardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added max & min value validator on OrderItem discount
parent
4982d30c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
2 deletions
+2
-2
models.cpython-310.pyc
pixie_dust/orders/__pycache__/models.cpython-310.pyc
+0
-0
0001_initial.py
pixie_dust/orders/migrations/0001_initial.py
+1
-1
0001_initial.cpython-310.pyc
...rders/migrations/__pycache__/0001_initial.cpython-310.pyc
+0
-0
models.py
pixie_dust/orders/models.py
+1
-1
No files found.
pixie_dust/orders/__pycache__/models.cpython-310.pyc
View file @
18a63cb8
No preview for this file type
pixie_dust/orders/migrations/0001_initial.py
View file @
18a63cb8
...
...
@@ -38,7 +38,7 @@ class Migration(migrations.Migration):
(
'color'
,
models
.
CharField
(
choices
=
[(
'RED'
,
'Red'
),
(
'ORANGE'
,
'Orange'
),
(
'YELLOW'
,
'Yellow'
),
(
'GREEN'
,
'Green'
),
(
'BLUE'
,
'Blue'
),
(
'PURPLE'
,
'Purple'
),
(
'PINK'
,
'Pink'
),
(
'BLACK'
,
'Black'
)],
max_length
=
20
)),
(
'quantity'
,
models
.
IntegerField
(
default
=
1
,
validators
=
[
django
.
core
.
validators
.
MaxValueValidator
(
99
),
django
.
core
.
validators
.
MinValueValidator
(
0
)])),
(
'personalization'
,
models
.
CharField
(
max_length
=
254
)),
(
'discount'
,
models
.
IntegerField
(
default
=
0
,
editable
=
False
)),
(
'discount'
,
models
.
IntegerField
(
default
=
0
,
validators
=
[
django
.
core
.
validators
.
MaxValueValidator
(
99
),
django
.
core
.
validators
.
MinValueValidator
(
0
)]
)),
(
'discount_price'
,
models
.
DecimalField
(
decimal_places
=
2
,
default
=
0
,
max_digits
=
12
)),
(
'sub_total'
,
models
.
DecimalField
(
decimal_places
=
2
,
default
=
0
,
editable
=
False
,
max_digits
=
12
)),
(
'is_successful'
,
models
.
BooleanField
(
default
=
True
,
editable
=
False
)),
...
...
pixie_dust/orders/migrations/__pycache__/0001_initial.cpython-310.pyc
View file @
18a63cb8
No preview for this file type
pixie_dust/orders/models.py
View file @
18a63cb8
...
...
@@ -28,7 +28,7 @@ class OrderItem(models.Model):
(
"GREEN"
,
"Green"
),
(
"BLUE"
,
"Blue"
),
(
"PURPLE"
,
"Purple"
),
(
"PINK"
,
"Pink"
),
(
"BLACK"
,
"Black"
)))
quantity
=
models
.
IntegerField
(
default
=
1
,
validators
=
[
MaxValueValidator
(
99
),
MinValueValidator
(
0
)])
personalization
=
models
.
CharField
(
max_length
=
254
)
discount
=
models
.
IntegerField
(
default
=
0
,
editable
=
False
)
discount
=
models
.
IntegerField
(
default
=
0
,
validators
=
[
MaxValueValidator
(
100
),
MinValueValidator
(
0
)]
)
discount_price
=
models
.
DecimalField
(
default
=
0
,
decimal_places
=
2
,
max_digits
=
12
)
sub_total
=
models
.
DecimalField
(
default
=
0
,
editable
=
False
,
decimal_places
=
2
,
max_digits
=
12
)
is_successful
=
models
.
BooleanField
(
default
=
True
,
editable
=
False
)
...
...
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