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
507794ac
Commit
507794ac
authored
Nov 02, 2012
by
John Jarvis
Committed by
Carlos Andrés Rocha
Nov 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding defaults to created and added fields
parent
0481cf99
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lms/djangoapps/certificates/models.py
+5
-3
No files found.
lms/djangoapps/certificates/models.py
View file @
507794ac
from
django.contrib.auth.models
import
User
from
django.db
import
models
from
datetime
import
datetime
'''
Certificates are created for a student and an offering of a course.
...
...
@@ -59,8 +59,10 @@ class GeneratedCertificate(models.Model):
distinction
=
models
.
BooleanField
(
default
=
False
)
status
=
models
.
CharField
(
max_length
=
32
,
default
=
'unavailable'
)
name
=
models
.
CharField
(
blank
=
True
,
max_length
=
255
)
created_date
=
models
.
DateTimeField
(
auto_now_add
=
True
)
modified_date
=
models
.
DateTimeField
(
auto_now
=
True
)
created_date
=
models
.
DateTimeField
(
auto_now_add
=
True
,
default
=
datetime
.
now
)
modified_date
=
models
.
DateTimeField
(
auto_now
=
True
,
default
=
datetime
.
now
)
class
Meta
:
unique_together
=
((
'user'
,
'course_id'
),)
...
...
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