Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 277
user123892 Avatar asked Oct 13 '16 13:10

user123892


1 Answers

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.

like image 60
petr Avatar answered Nov 13 '22 07:11

petr