Edx platform - WBowam/wbowam.github.com GitHub Wiki
Date: 2014-02-08 Title: 使用Edx platform Tags: Edx Category: IT
sudo -u www-data /edx/
bin/python.edxapp ./manage.py lms --settings aws create_user -e [email protected]
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws changepassword user
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws shell
from django.contrib.auth.models import User
me = User.objects.get(username="user")
me.is_superuser = True
me.is_staff = True
me.save()
回到项目起始目录,如我的是
pwd
~/workplace/fullstack$
ls ~/workplace/fullstack
20140418-injera-fullstack.box Vagrantfile
更改Networking方式,默认是host-only模式,如下:
config.vm.network :private_network, ip: "192.168.33.10"
改成:
config.vm.network "public_network", :bridge => 'eth0'
添加IP和Port
config.ssh.host = "202.206.221.119"
config.ssh.port = "22"
以上config.ssh.host
和config.ssh.port
默认127.0.0.1:2222和22
sudo vim /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.152
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
这样,IP并没有立即生效,重启网络服务
sudo /etc/init.d/networking restart
vim /edx-platform/cms/envs/common.py
配置#Email的内容,如下:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
DEFAULT_FROM_EMAIL = '[email protected]'
DEFAULT_FEEDBACK_EMAIL = '[email protected]'
EMAIL_HOST = 'smtp.exmail.qq.com'
EMAIL_HOST_USER = '[email protected]'
TECH_SUPPORT_EMAIL = '[email protected]'
CONTACT_EMAIL = '[email protected]'
SERVER_EMAIL = '[email protected]'
BUGS_EMAIL = '[email protected]'
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 465
EMAIL_USE_TLS = 'true'
ADMINS = (
('edX Admins', 'mooc'),
)
小编提示:配置好后,如果不正常,请检查所用邮箱,有可能会有以下问题:
- 国外的邮件服务(如gmail),有可能被抢了
- 你用的dns没法解析你所使用的smtp服务器(这种可能性很低,不过小编中了)。如我用的是smtp.qq.com,一直没法用,很不科学,找不到原因,最后抓包看了一下:原来我们学校dns服务器没能解析smtp.qq.com——蛋疼!