Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
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
edx
edx-platform
Commits
d4667691
Commit
d4667691
authored
Dec 04, 2017
by
John Eskew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert final field from CommaSeparatedIntegerField to CharField.
parent
f5a83d5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletions
+23
-1
common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py
+21
-0
common/djangoapps/course_modes/models.py
+2
-1
No files found.
common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py
0 → 100644
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'
)]),
),
]
common/djangoapps/course_modes/models.py
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
)
...
...
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