周末没事在家捣腾Django ,使用的最新版本1.1, 启用'django.contrib.admin'后login到admin显示"You don't have permission to edit anything", 查了下文档
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#hooking-adminsite-instances-into-your-urlconf,发现admin.autodiscover()这行注释没去掉,再试就可以编辑了。
# urls.py
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
('^admin/', include(admin.site.urls)),
)
Above we used admin.autodiscover() to automatically load the INSTALLED_APPS admin.py modules.
ModelAdmin objects
class ModelAdmin
The ModelAdmin class is the representation of a model in the admin interface. These are stored in a file named admin.py in your application. Let’s take a look at a very simple example of the ModelAdmin:
from django.contrib import admin
from myproject.myapp.models import Author
class AuthorAdmin(admin.ModelAdmin):
pass
admin.site.register(Author, AuthorAdmin)
分享到:
相关推荐
"Apache You don't have permission to access / on this server" 是一个经典的Apache服务器错误信息,它意味着用户尝试访问网站时遇到了权限问题。这个错误通常出现在Apache HTTP服务器的配置不当或者目录权限设置...
Apache服务器在运行过程中可能会遇到各种错误,其中"403 Forbidden"是一个常见的错误,提示用户没有权限访问指定的资源。这个错误通常出现在尝试访问某个网页或文件时,服务器返回的状态码为403,表示服务器理解了...
键字: Apache 403 Forbidden 系统配置: 操作系统:Red Hat Linux 6.2 Web服务器:Apache 3.1.1+jakarta-tomcat 3.1.1 数据库服务器:oracle 8i Apache服务器是目前应用... You don’t have permission to access
本文实例讲述了WampServer设置apache伪静态出现404 not found及You don’t have permission to access / on this server解决方法。分享给大家供大家参考。具体如下: 出现404 not found 时: 确保LoadModule rewrite_...
标题和描述中提到的问题是关于在易网主机上运行Shopex或Ecshop这两个电子商务平台时遇到的一个常见错误,即"Can't create/write to file"。这个错误通常发生在系统尝试写入或创建文件时,由于某些原因无法完成操作。...
在使用PHP和Apache服务器进行开发或测试时,可能会遇到一种常见的错误:“You don’t have permission to access /index.php on.” 这个错误信息表明,Web服务器没有足够的权限访问指定的PHP文件,导致用户无法正常...
主要介绍了WampServer设置apache伪静态出现404 not found及You don't have permission to access / on this server解决方法,较为详细的分析了几种常见情况,非常具有实用价值,需要的朋友可以参考下
You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not ...
t10k-labels-idx1-ubyte.gz
【ueditor图片上传至服务器地址的Demo详解】 ueditor是一款流行的富文本编辑器,广泛应用于网页内容编辑场景,提供丰富的文本格式化、图片上传、多媒体插入等功能。在实际应用中,用户经常需要将ueditor编辑器中...
You don’t have permission to access /repertory/on this server. 意思是:您没有访问此服务器上的权限。 我就纳闷了,检查了好久最后查看配置文件vhosts.conf文件 发现2018版配置变了 只能乖乖的按照默认格式...
Suggest changes to projects you don’t have permission to edit directly Use tools like issues, pull requests, and branches to specify and collaborate on changes Create a new GitHub repository to ...
Head on over to their website if you don't already have one. Download Step 1. Add the JitPack repository to your root build.gradle file. allprojects { repositories { ... maven { url '...
That doesn’t mean you can’t target iOS lower than 10 - you simply have to prepare fallback code to cover cases when user doesn’t have access to speech recognition (SpeechRecognizer.EngineExists() ...
$permission = Permission::findByName('edit articles'); $role->givePermissionTo($permission); // 添加权限 $role->revokePermissionTo($permission); // 删除权限 ``` 用户也可以直接被赋予或撤销权限: ```...
Be careful and be sure you know how to undo anything you might have done. For example, in Windows 98: * open Windows Explorer * View -> Folder Options * select the "File Types" tab * Find and select...
出现这种问题, ①首先检查用户对应的角色名,然后看路径设置是否正确,有没有相关的权限,如果这些都没问题,然后就尝试下面的操作: ②重起FTP服务,最好从服务里面重启(不能根本解决); ③重新设置Server-U帐号和...
之后,当该管理员注销并尝试重新访问登录面板时,系统会显示“You don't have permission to view this page”的错误消息。这表明尽管该用户是管理员,但并没有被赋予访问已删除登录面板的新实例的权限。 #### 三、...
在配置为对等网络环境中的工作组成员的计算机... You may not have permission to use this network resource. 注意:在对等网络中,各台计算机之间都是平等的,它们均可以启动通信。此方式不同于客户端/服务器网络。