开发者

Why can't I view pages in the admin section of django-cms?

开发者 https://www.devze.com 2022-12-10 03:41 出处:网络
I install django-cms. I try to use the example spplied 开发者_运维百科by the installation package.

I install django-cms. I try to use the example spplied 开发者_运维百科by the installation package.

I have some questions :

I can add pages to my site. but when I try to list all my pages in the tree-view (using the "Select page to change" view) . The tree view is blank? Does anyone had the same problem?


  • Are you running the local web server?
  • When you load the page that shows the tree view, are the static files being loaded?
  • Can you see successful requests for .js and .css files?
  • When you load the default site http://127.0.0.1:8080/ can you see the Django Logo?
  • When you load the tree view, all you see is some text like "filtering off"?

My guess is that the static files aren't being served correctly.
This isn't hard to fix, just requires a little trouble shooting.


Ensure your Static Files Are Setup correctly

In your settings.py:

  1. Ensure that you have set your own MEDIA_URL variable to something other than 'Media' as this conflicts with the default CMS Admin media Url. There's a note at the bottom of the documentation about this.
    I created a folder in my project called site_media and then set MEDIA_URL = '/site_media/'

  2. Have you copied the contents of pythonpath\site-packages\django_cms\cms\media\ into your media directory?

In your urls.py have you setup the static routes? This isn't in the CMS documentation as its part of the Django doco.

The following is what I have:

urlpatterns += patterns
(r'^site_media/(?P.*)$',
  'django.views.static.serve',
 {'document_root': 'D:/myproject/site_media'}),

HTH - feel free to ask questions.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号