relation-auth-user-does-not-exist
来源:互联网 发布:python java薪资 编辑:程序博客网 时间:2024/05/17 09:44
title: 【ERROR】relation auth_user does not exist
type: categories
date: 2017-05-09 16:46:30
categories: Python
tags: [Django, Heroku, autn_user]
Django应用在本地通过
heroku local web
测试没有问题,但部署到Heroku后,打开admin站点,出现的relation auth_user does not exist
问题。
原因
应用只在本地创建了超级管理员,但在部署到Heroku后处于生产环境,而生产环境中没有配置超级管理员。
解决
heroku run python manage.py makemigrationsheroku run python manage.py migrateheroku run python manage.py createsuperuser
执行以上指令,创建生产环境的管理员。
需要注意的是,运行 heroku run
指令,需要先指定 heroku应用,否则会一直出现 Error: No app specified
的报错,如没报错,可忽略。
指定Heroku应用的操作,如下:
# 如果存在heroku仓库,但不是当前应用,可先执行删除git remote rm heroku# 添加应用仓库到herokugit remote add heroku https://git.heroku.com/myzz.git
本文参考:http://stackoverflow.com/questions/29689365/auth-user-error-with-django-1-8-and-syncdb-migrate
0 0
- relation-auth-user-does-not-exist
- relation "hibernate_sequence" does not exist
- ERROR: relation "public.userinfo" does not exist
- relation "hibernate_sequence" does not exist解决
- 【error】postgresql relation does not exist
- 关于PostgreSQL数据库的 ERROR: relation "tableName" does not exist
- User settings file does not exist
- Privilege separation user sshd does not exist
- org.postgresql.util.PSQLException: ERROR: column "loginid" of relation "userinfo" does not exist
- Caused by: org.postgresql.util.PSQLException: ERROR: relation "item" does not exist
- pgAdmin的column "yearapply" of relation "your_application_0" does not exist 位置:40 at
- The user specified as a definer (@'''') does not exist
- The user specified as a definer ('root'@'%') does not exist。
- The user specified as a definer ('root'@'%') does not exist
- #HY000The user specified as a definer ('root'@'%') does not exist
- The user specified as a definer ('root'@'%') does not exist。 .
- The user specified as a definer ('root'@'%') does not exist。
- The user specified as a definer ('XXXXX'@'%') does not exist
- 机器学习基石笔记10——Logistic Regression
- 括号分行
- 压缩解压命令 & 用户管理
- android:onClick 设置Button监听
- angualr2遇见的错误
- relation-auth-user-does-not-exist
- Java面向对象设计模式(二十二)——中介者模式(Mediator)
- RN设置占位图
- java 23中设计模式 浅谈
- 使用dict和set
- Java 并发编程 runable,callable,future,futuretask
- echarts简单日历
- CentOS7 配置 vsftpd 服务
- Fiddler手机抓包教程