简体   繁体   English

我可以从 Django 管理面板访问我的网站吗?

[英]Can I access my website from Django admin panel?

I am trying to develop a website where I can see the homepage as it is from Django admin panel.我正在尝试开发一个网站,我可以在其中看到来自 Django 管理面板的主页。 The reason I want that is I want to edit the name of the static content like 'Home' to 'All' along with the change of slide show picture.我想要的原因是我想将静态内容的名称(如“Home”)编辑为“All”以及幻灯片图片的更改。 In summary, I want to change the website layout from Django admin panel that is not accessible to users.总之,我想从用户无法访问的 Django 管理面板更改网站布局。 Is that possible?那可能吗? I just want an idea of how to implement the process.我只是想知道如何实施这个过程。

Static texts you can change in admin panel with different modules: for example django-rosetta or my own library Django-tof .您可以在管理面板中使用不同的模块更改静态文本:例如django-rosetta或我自己的库Django-tof https://github.com/wP-soft-GmbH/django-tof https://github.com/wP-soft-GmbH/django-tof

But in your case, i think, you want to made something more.但在你的情况下,我认为,你想做更多的事情。

For this case you can use django-flat-pages , already included in Django, if you have a static web-page.对于这种情况,如果你有一个静态网页,你可以使用 Django 中已经包含的django-flat-pages you can edit every element on the page and after save, you can see it on the front.您可以编辑页面上的每个元素,保存后,您可以在前面看到它。

if you really want to change the django templates, which you use in your views, you can create a simple template editor in the admin panel based on a widget like django-Ckeditor .如果您真的想更改您在视图中使用的 django 模板,您可以在管理面板中基于django-Ckeditor类的小部件创建一个简单的模板编辑器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM