pycharm django 增加一个 app
手动增加

需要是root权限吗?
如果不是root权限 ,就不能配置了吗?
sudo chmod -R 777 wanda_service_api/
wanda_manage
在 docker 容器中,手动使用命令
python manage.py startapp wanda_energy

admin.py
from django.contrib import admin
# Register your models here.
apps.py
from django.apps import AppConfig
class WandaEnergyConfig(AppConfig):
name = 'wanda_energy'
models.py
from django.db import models
# Create your models here.
tests.py:
from django.test import TestCase
# Create your tests here.
views.py
from django.shortcuts import render
# Create your views here.
migrations目录
里面的 init.py文件是空的
_init_.py是空的
migrations 目录需要手动创建吗
pycharm 工具栏Tool中找不到Run manager.py Task


python manage.py migrate --settings=mysite.settings.production
本文详细介绍了如何在PyCharm环境中为Django项目手动添加一个App,包括必要的文件结构创建、迁移设置及权限配置。通过具体实例,如创建wanda_energy App,演示了从初始化到运行的全过程。
2440

被折叠的 条评论
为什么被折叠?



