Django 应用程序未显示在管理界面中 [英] Django App Not Showing up in Admin Interface
本文介绍了Django 应用程序未显示在管理界面中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前正在从我的开发服务器转移到 Apache Web 生产服务器.
I'm currently moving from my development server to an Apache web production server.
我已经尝试通过复制它来执行以下操作,我可以登录到管理面板但它没有显示出来.
I've tried doing the following just by copying it over and I can login to the admin panel but it doesn't show up.
我的应用中的 admin.py 如下所示:
My admin.py in my app looks like this:
import models
from django.contrib import admin
admin.site.register(models.Organization)
这是我的models.py
And here is my models.py
from django.db import models
class Organization(models.Model):
name = models.CharField(max_length=100)
website = models.URLField()
azon_code = models.CharField(max_length=50)
gooe_code = models.CharField(max_length=50)
cj_code = models.CharField(max_length=50)
我重新同步了数据库并重新启动了 apache,并认为这可能会有所作为.
I've resyned the database and restarted apache as well thinking that might do something.
推荐答案
难道你不应该像这样导入:
Aren't you supposed to import like:
from mysite.myapp.models import Organization
admin.site.register(Organization)
这篇关于Django 应用程序未显示在管理界面中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文