如何将Django-CMS集成到现有项目中 [英] How to integrate Django-CMS into an existing project

查看:134
本文介绍了如何将Django-CMS集成到现有项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将Django-CMS 3.x集成到现有项目(此后称为 mypjc )。我已经检查了这个问题(以及其他类似问题)但它们指向教程页面,

I need to integrate Django-CMS 3.x into an existing project (mypjc hereafter). I already checked this question (and other similar) but they point to a tutorial page that is no longer available.

我对您可以在网上找到的大量信息感到困惑,而且我还不太了解是否可以集成Django-CMS / strong>作为应用到现有且独立运行的Django项目中。

I'm a bit confused by the tons of infos you can find online and I have not really understood if Django-CMS can be integrated as an app into an existing and independently running Django project.

mypjc (使用Django 1.8)将受益于用户友好的CMS。基本上,我希望用户能够写文本并将其存储在(公用)数据库中的图像加载到用户的 mypjc 中。

mypjc (using Django 1.8) would benefit from a user friendly CMS. Basically I'd the user to be able to write texts and to load in their posts images stored in the (common) database, images that are created by the user in mypjc.

有可能吗?如果是,是否有人可以帮助我违反使集成整洁和成功所需的步骤?

Is it possible? if yes, could anyone help me defying the steps needed to make the integration clean and successful?

在此先感谢您提供的任何帮助。

Thank you in advance for any help you could provide.

推荐答案

使用Django CMS,确实可以将其集成到现有项目中。

With Django CMS, it is indeed possible to integrate it into an existing project.

如果您已经有一个具有URL /菜单管理的现有项目,则只需集成每页CMS,就可以将其作为附加字段添加到模型中:

If you already have an existing project with URL/menu management, then you can simply integrate just the per-page CMS, which can be added as additional field to your model:

from django.db import models
from cms.models.fields import PlaceholderField

class MyModel(models.Model):
    # your fields
    my_placeholder = PlaceholderField('placeholder_name')
    # your methods

您可以找到更多信息此处

对于任何现有项目,您可能需要使用此处

For any existing projects, you are likely to need to use the manual installation process outlined here.

这篇关于如何将Django-CMS集成到现有项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆