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
08ff0305
Commit
08ff0305
authored
Jul 16, 2014
by
Muhammad Shoaib
Committed by
Chris Dodge
Aug 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the course registration models
parent
14357f7e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py
+0
-0
lms/djangoapps/shoppingcart/models.py
+10
-2
No files found.
lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py
0 → 100644
View file @
08ff0305
This diff is collapsed.
Click to expand it.
lms/djangoapps/shoppingcart/models.py
View file @
08ff0305
...
@@ -320,12 +320,20 @@ class CourseRegistrationCode(models.Model):
...
@@ -320,12 +320,20 @@ class CourseRegistrationCode(models.Model):
This table contains registration codes
This table contains registration codes
With registration code, a user can register for a course for free
With registration code, a user can register for a course for free
"""
"""
code
=
models
.
CharField
(
max_length
=
32
,
db_index
=
True
)
code
=
models
.
CharField
(
max_length
=
32
,
db_index
=
True
,
unique
=
True
)
course_id
=
CourseKeyField
(
max_length
=
255
,
db_index
=
True
)
course_id
=
CourseKeyField
(
max_length
=
255
,
db_index
=
True
)
transaction_group_name
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
,
null
=
True
,
blank
=
True
)
transaction_group_name
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
,
null
=
True
,
blank
=
True
)
created_by
=
models
.
ForeignKey
(
User
,
related_name
=
'created_by_user'
)
created_by
=
models
.
ForeignKey
(
User
,
related_name
=
'created_by_user'
)
created_at
=
models
.
DateTimeField
(
default
=
datetime
.
now
(
pytz
.
utc
))
created_at
=
models
.
DateTimeField
(
default
=
datetime
.
now
(
pytz
.
utc
))
redeemed_by
=
models
.
ForeignKey
(
User
,
null
=
True
,
related_name
=
'redeemed_by_user'
)
class
RegistrationCodeRedemption
(
models
.
Model
):
"""
This model contains the registration-code redemption info
"""
order
=
models
.
ForeignKey
(
Order
,
db_index
=
True
)
registration_code
=
models
.
ForeignKey
(
CourseRegistrationCode
,
db_index
=
True
)
redeemed_by
=
models
.
ForeignKey
(
User
,
db_index
=
True
)
redeemed_at
=
models
.
DateTimeField
(
default
=
datetime
.
now
(
pytz
.
utc
),
null
=
True
)
redeemed_at
=
models
.
DateTimeField
(
default
=
datetime
.
now
(
pytz
.
utc
),
null
=
True
)
...
...
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