Search code examples
pythondjangodjango-cms

How can I modify models.py in external app in Django CMS


I am trying to modify existing model(In Django CMS Blog application). There is a Post class, I can modify it in models.py that located inside the Django CMS Blog project, like so:

media = PlaceholderField("media", related_name="media")
post_title = PlaceholderField("post_title", related_name="post_title") # My code
content = PlaceholderField("post_content", related_name="post_content")
liveblog = PlaceholderField("live_blog", related_name="live_blog")

And after the migration the DB looks like this. As you can see, the field is added. But how can I do that from my local project files? I don't want to add this code inside 3d party app models, because it will lead to problems with updating this 3d party app.


Solution

  • Didn't find any solutions except to copy that app to your project folder and alter it there.