Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
393 views
in Technique[技术] by (71.8m points)

python - How to integrate Django-CMS into an existing project

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.

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 (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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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

You can find more information here.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...