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

How can I change configuration from local project? #669

Closed YOBA1112 closed 3 years ago

YOBA1112 commented 3 years ago

So, I'm trying to import djangocms_blog.settings into settings.py of my project to override it with new values, but when I do - I get this error: django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. What's the proper way to change configuration?

fsbraun commented 3 years ago

Just a guess: djangocms_blog.settings needs not be imported or copied into settings.py. Rather use settings.py to overwrite standard settings in djangocms_blog.settings.

E.g., if you want to have 25 words before a summary is truncated, add

BLOG_POSTS_LIST_TRUNCWORDS_COUNT = 25

to your settings.py.

For a list of settings you might want to change (but not have to) , see https://djangocms-blog.readthedocs.io/en/latest/autodoc/settings.html

PS: SECRET_KEY is a Django setting that must not be empty. When you start a project, Django automatically gives you a SECRET_KEY setting. Once you change it, all passwords are lost.

YOBA1112 commented 3 years ago

Oh, so I didn't need to import anything, got it, thanks a lot!