nephila / djangocms-blog

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks
https://djangocms-blog.readthedocs.io
BSD 3-Clause "New" or "Revised" License
392 stars 192 forks source link

Adding custom placeholder #673

Open YOBA1112 opened 3 years ago

YOBA1112 commented 3 years ago

I'm trying to add custom placeholder, like so: news_title = PlaceholderField("news_title", related_name="news_title") This goes after line 267 in current version of models.py. After migration, I'm trying to insert this placeholder into my template, like so: {% render_placeholder post.news_title %} But it doesn't work, nothing happens and placeholder just doesn't show up. If I'm trying to add, let's say, media or liveblog placeholders - it works well. How can I fix that and finally add a new placeholder?

YOBA1112 commented 2 years ago

In order to placeholder show up - I needed to create new post after migration, but there is another problem, how can I add news_title = PlaceholderField("news_title", related_name="news_title") to post model from my local models?