createsuperuser Django的openshift V3
问题描述:
如何我可以做一些管理工作,如createsuperuser
,makemigrations
,migrate
ECT在OpenShift,次世代的Django应用程序? (步骤分步)createsuperuser Django的openshift V3
在OpenShift-V2,我也同样通过登录通过rhc ssh app_name
壳和运行命令python $OPENSHIFT_REPO_DIR/wsgi/myproject/manage.py createsuperuser
(Reference)
答
方法1
第1步:登录使用oc login
步骤2 OpenShift-V3:选择使用oc project <project_name>
第3步你的项目:使用清单中的所有吊舱oc get pods
这将是这样的,
NAME READY STATUS RESTARTS AGE
django-example-4-build 0/1 Completed 0 1h
django-example-5-build 0/1 Completed 0 1h
django-example-6-i0omn 1/1 Running 0 1h
第4步:找出哪些是在运行状态下的名称。
第5步:运行命令,oc rsh <Name_of_the_pod_at_running_state>
在我的情况是,oc rsh django-example-6-i0omn
第6步:然后,运行python manage.py createsuperuser
创建超级用户
方法2
第1步:使用Web-Console
登录到您的OpenShift-v3步骤2:转到Dashboard
步骤3:选择p ODS由Application -> Pods
第4步:选择箱,后者是在运行状态
第5步:选择Terminal
标签
第6步:然后,运行python manage.py createsuperuser
打造超级用户
希望,它会为你工作:)