zoukankan      html  css  js  c++  java
  • [Dynamic Language] Python Django: You don't have permission to edit anything

    Python Django 在配置完Admin管理界面后,用super admin登录管理界面显示:"You don't have permission to edit anything"

    查文档发现:Above we used admin.autodiscover() to automatically load theINSTALLED_APPS admin.py modules.

    很明显Django 用admin.autodiscover()来自动载入INSTALLED_APPS admin.py 模块。

    找到urls.py,将  admin.autodiscover()的注释去掉后权限正常了。

    1 1 from django.conf.urls.defaults import *
    2 2 from mysite.views import *
    3 3 # Uncomment the next two lines to enable the admin:
    4   4 from django.contrib import admin
    5 5 admin.autodiscover()
    6 6
    7 7 urlpatterns = patterns(
    8 8 '',
    9 9 ('^$', index),
    10 10 ('^hello/$',hello),
    11 11 ('^time$', current_datetime),
    12 12 ('^test$',test),
    13 13 ('^admin/', include(admin.site.urls)),
    14 14 )
    15 ~6

  • 相关阅读:
    poj2955(区间dp)
    poj3280(区间dp)
    poj1651(区间dp)
    hdu5001(概率dp)
    hdu4389(数位dp)
    hdu4352(数位dp)
    CF 148D(概率dp)
    zoj3329(概率dp)
    POJ1028 Web Navigation
    POJ1027 The Same Game
  • 原文地址:https://www.cnblogs.com/abeen/p/1824427.html
Copyright © 2011-2022 走看看