Django Lightail上没有应用程序文件夹 [英] No apps folder on django lightsail

查看:75
本文介绍了Django Lightail上没有应用程序文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在AWS上创建新的lightail django实例后,我发现/opt/bitnami/apps/文件夹不存在,如文档 https://aws.amazon.com/getting-started/hands-on/deploy-python-application/.我以前在AWS上创建过django实例,但从未遇到过此问题.

After creating a new lightsail django instance on AWS, I found that the folders /opt/bitnami/apps/ does not exist as referenced in the documentation https://aws.amazon.com/getting-started/hands-on/deploy-python-application/. I've created django instances before on AWS and have never encountered this issue.

bitnami@ip-172-26-4-185:~$ ls
bitnami_application_password  bitnami_credentials  htdocs  stack
bitnami@ip-172-26-4-185:~$ cd /
bitnami@ip-172-26-4-185:/$ cd opt
bitnami@ip-172-26-4-185:/opt$ cd bitnami
bitnami@ip-172-26-4-185:/opt/bitnami$ cd apps
-bash: cd: apps: No such file or directory
bitnami@ip-172-26-4-185:/opt/bitnami$ ls
apache   bncert-tool          bnsupport-tool  git      nami        properties.ini  stats
apache2  bnsupport            common          gonit    node        python          var
bncert   bnsupport-regex.ini  ctlscript.sh    mariadb  postgresql  scripts

其他信息:16 GB RAM,4个vCPU,320 GB SSD

Additional info: 16 GB RAM, 4 vCPUs, 320 GB SSD

Django

弗吉尼亚州A区(us-east-1a)附加的静态IP地址

Virginia, Zone A (us-east-1a) attached static ip address

推荐答案

此处是Bitnami工程师,

Bitnami Engineer here,

在Django解决方案中不再包含apps文件夹.您所遵循的指南不是由Bitnami维护的,这就是为什么它不是最新的.要在新的Bitnami Django解决方案中创建一个新项目,您将需要运行以下命令

The apps folder doesn't exist anymore in the Django solution. The guide you are following is not maintained by Bitnami and that's why it's not up to date. To create a new project in the new Bitnami Django solution, you will need to run these commands

sudo mkdir -p /opt/bitnami/projects/PROJECT
sudo chown $USER /opt/bitnami/projects
django-admin startproject PROJECT /opt/bitnami/projects/PROJECT
cd /opt/bitnami/projects/PROJECT
python manage.py migrate
python manage.py startapp helloworld
python manage.py runserver

并访问端口8000以查看新的hello world项目.

and access the port 8000 to see that new hello world project.

您可以在我们的官方文档中了解更多信息

You can learn more about this in our official documentation

https://docs.bitnami.com/aws/infrastructure/django/get-started/start-django-project/

https://docs.bitnami.com/aws/infrastructure/django/get-started/deploy-django-project/

谢谢

这篇关于Django Lightail上没有应用程序文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆