Shell commands
2016-01-22 15:21
555 查看
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/xuxiao1991101/article/details/50562188
edx官方文档系列
命令行
Django apps (Studio and LMS)
使用一下命令运行django管理命令行指令
path/to/edx-platform/manage.py [lms|cms] --settings=aws
例如:一下命令可以列出lms所有的可用的django管理命令
sudo -u edxapp /edx/bin/python.edxapp /edx/app/edxapp/edx-platform/manage.py lms --settings=aws help
创建edX超级账户
sudo -u edxapp /edx/bin/python.edxapp /edx/app/edxapp/edx-platform/manage.py lms --settings=aws createsuperuser --username <user>
删除已存在的课程(注意:没有清除像course groups这样的django站点级的数据)
mongo xmodule --eval "db.dropDatabase()" mongo xcontent --eval "db.dropDatabase()"
确认“robot”用户“MITx/999/Robot_Super_Course”课程的评论权限
export DJANGO_SETTINGS_MODULE=lms.envs.dev export PYTHONPATH=. django-admin.py seed_permissions_roles "MITx/999/Robot_Super_Course" django-admin.py assign_role robot Moderator "MITx/999/Robot_Super_Course" django-admin.py assign_role robot Administrator "MITx/999/Robot_Super_Course"
Mongo 数据库(courseware)
列出所有课程:
use edxapp db.modulestore.find( { "_id.category" : "course" }, {'name':'1'} ) To find all the updates for courses numbered 999: db.modulestore.find({'_id.course': '999','_id.name':'updates'}) To remove courses numbered 999 from all orgs. Note this will not clear out data on the django side like course groups: db.modulestore.remove({'_id.course': '999'})
评论服务
运行自动化测试
rspec spec
删除评论数据
mongo cs_comments_service_development --eval "db.dropDatabase()"
重置评论数据
bundle exec rake db:init
重建索引
bundle exec rake db:reindex_search
启动评论服务
ruby app.rb
相关文章推荐
- HBase shell commands
- Frequently Used Shell Commands
- python获取shell的输出和错误状态 (commands)
- Some shell commands
- echo shell commands as they are executed
- Funny UNIX Shell Commands
- mongodb shell commands
- HBase shell commands
- UNIX Shell Commands List
- Shell Commands
- how to run 2 or more commands in a shell script [for Linux & Windows]
- Ubuntu Linux Common Shell Commands
- basic and common shell commands
- some shell commands
- Run Shell Commands in Python
- android开发笔记之ADB Shell Commands
- Hadoop Shell Commands
- nohup Execute Commands After You Exit From a Shell Prompt
- Run Shell Commands in Python
- How to execute shell commands in C Part 1