Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-data-api
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-analytics-data-api
Commits
d90a368e
Commit
d90a368e
authored
Jan 04, 2017
by
Dennis Jen
Committed by
GitHub
Jan 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the generate fake data parser to use django 1.10.x (#152)
parent
e046636d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
analytics_data_api/management/commands/generate_fake_course_data.py
+22
-8
No files found.
analytics_data_api/management/commands/generate_fake_course_data.py
View file @
d90a368e
...
...
@@ -4,7 +4,6 @@ import datetime
import
logging
import
math
import
random
from
optparse
import
make_option
from
tqdm
import
tqdm
from
django.core.management.base
import
BaseCommand
...
...
@@ -32,13 +31,28 @@ def get_count(start):
class
Command
(
BaseCommand
):
help
=
'Generate fake data'
option_list
=
BaseCommand
.
option_list
+
(
make_option
(
'-n'
,
'--num-weeks'
,
action
=
'store'
,
type
=
"int"
,
dest
=
'num_weeks'
,
help
=
'Number of weeks worth of data to generate.'
),
make_option
(
'-c'
,
'--course_id'
,
action
=
'store'
,
type
=
'string'
,
dest
=
'course_id'
,
default
=
'edX/DemoX/Demo_Course'
,
help
=
'Course ID for which to generate fake data'
),
make_option
(
'-u'
,
'--username'
,
action
=
'store'
,
type
=
'string'
,
dest
=
'username'
,
default
=
'ed_xavier'
,
help
=
'Username for which to generate fake data'
),
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'--num-weeks'
,
action
=
'store'
,
type
=
int
,
dest
=
'num_weeks'
,
help
=
'Number of weeks worth of data to generate.'
,
)
parser
.
add_argument
(
'--course_id'
,
action
=
'store'
,
dest
=
'course_id'
,
default
=
'edX/DemoX/Demo_Course'
,
help
=
'Course ID for which to generate fake data'
,
)
parser
.
add_argument
(
'--username'
,
action
=
'store'
,
dest
=
'username'
,
default
=
'ed_xavier'
,
help
=
'Username for which to generate fake data'
,
)
def
generate_daily_data
(
self
,
course_id
,
start_date
,
end_date
):
...
...
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