lulu8109lu / django_vue_cmdb

8 stars 0 forks source link

需要一份数据 #10

Open yuanxiaotian666 opened 3 years ago

yuanxiaotian666 commented 3 years ago

项目能运行起来,但是没有数据库,很无奈啊.菜单都没有

lulu8109lu commented 3 years ago

需要运行下以下命令创建数据库表 python manage.py makemigrations python manage.py migrate

------------------ 原始邮件 ------------------ 发件人: "CJFJack/django_vue_cmdb" <notifications@github.com>; 发送时间: 2020年12月2日(星期三) 中午11:58 收件人: "CJFJack/django_vue_cmdb"<django_vue_cmdb@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [CJFJack/django_vue_cmdb] 需要一份数据 (#10)

项目能运行起来,但是没有数据库,很无奈啊.菜单都没有

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

yuanxiaotian666 commented 3 years ago

我已经迁移表了,但是没有任何数据。

yuanxiaotian666 commented 3 years ago

需要运行下以下命令创建数据库表 python manage.py makemigrations python manage.py migrate ------------------ 原始邮件 ------------------ 发件人: "CJFJack/django_vue_cmdb" <notifications@github.com>; 发送时间: 2020年12月2日(星期三) 中午11:58 收件人: "CJFJack/django_vue_cmdb"<django_vue_cmdb@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [CJFJack/django_vue_cmdb] 需要一份数据 (#10) 项目能运行起来,但是没有数据库,很无奈啊.菜单都没有 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

需要运行下以下命令创建数据库表 python manage.py makemigrations python manage.py migrate ------------------ 原始邮件 ------------------ 发件人: "CJFJack/django_vue_cmdb" <notifications@github.com>; 发送时间: 2020年12月2日(星期三) 中午11:58 收件人: "CJFJack/django_vue_cmdb"<django_vue_cmdb@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [CJFJack/django_vue_cmdb] 需要一份数据 (#10) 项目能运行起来,但是没有数据库,很无奈啊.菜单都没有 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

您这边能给我一份数据库吗?我迁移了表,但是没有任何的数据,很让我头疼.

ppkliu commented 3 years ago

在editor 中找到這段資料庫設定指令

    'NAME': 'django_vue_cmdb',
    'USER': 'root',
    'PASSWORD': 'Python@123', //改成你的密碼

在ubuntu環境下,先手動建立資料庫 $sudo mysql -p -u root

在database shell 下面新增資料庫

create database django_vue_cmdb; CREATE USER 'root'@'%' IDENTIFIED BY 'Python@123'; //改成你的密碼 GRANT ALL PRIVILEGES ON my_db.* TO 'root'@'%';

最後在shell 用python指令增加基礎資料表 $python manage.py makemigrations $python manage.py migrate

再使用以下指令创建 user $python manage.py createsuperuser

再到後台創建menu locahost:8000/admin/

qiaoqiao888 commented 3 years ago

如果创建menu 后台里面

qiaoqiao888 commented 3 years ago

@ppkliu

H0nGzA1 commented 3 years ago

项目能运行起来,但是没有数据库,很无奈啊.菜单都没有

自行添加即可

xiahuhu1 commented 3 years ago

用户菜单和用户路由这些该怎么配置啊?

yuanxiaotian666 commented 3 years ago

推荐使用 django-vue-admin

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年6月3日(星期四) 上午9:29 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [CJFJack/django_vue_cmdb] 需要一份数据 (#10)

用户菜单和用户路由这些该怎么配置啊?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.