Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
d4667691
Commit
d4667691
authored
7 years ago
by
John Eskew
Browse files
Options
Downloads
Patches
Plain Diff
Convert final field from CommaSeparatedIntegerField to CharField.
parent
f5a83d5d
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py
+21
-0
21 additions, 0 deletions
...migrations/0010_archived_suggested_prices_to_charfield.py
common/djangoapps/course_modes/models.py
+2
-1
2 additions, 1 deletion
common/djangoapps/course_modes/models.py
with
23 additions
and
1 deletion
common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py
0 → 100644
+
21
−
0
View file @
d4667691
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
re
import
django.core.validators
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
course_modes
'
,
'
0009_suggested_prices_to_charfield
'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'
coursemodesarchive
'
,
name
=
'
suggested_prices
'
,
field
=
models
.
CharField
(
default
=
b
''
,
max_length
=
255
,
blank
=
True
,
validators
=
[
django
.
core
.
validators
.
RegexValidator
(
re
.
compile
(
'
^[
\\
d,]+
\\
Z
'
),
'
Enter only digits separated by commas.
'
,
'
invalid
'
)]),
),
]
This diff is collapsed.
Click to expand it.
common/djangoapps/course_modes/models.py
+
2
−
1
View file @
d4667691
...
...
@@ -810,7 +810,8 @@ class CourseModesArchive(models.Model):
min_price
=
models
.
IntegerField
(
default
=
0
)
# the suggested prices for this mode
suggested_prices
=
models
.
CommaSeparatedIntegerField
(
max_length
=
255
,
blank
=
True
,
default
=
''
)
suggested_prices
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
,
default
=
''
,
validators
=
[
validate_comma_separated_integer_list
])
# the currency these prices are in, using lower case ISO currency codes
currency
=
models
.
CharField
(
default
=
"
usd
"
,
max_length
=
8
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment