Create an agenda on top of djangocms-blog!
Project description
Add an Agenda to your blog that displays upcoming events!
Easy! CheapFree! Not seen on TV!
Install
-
Install the package
python3 -m pip install djangocms-blog-agenda
-
Add it in your
INSTALLED_APPS
:"djangocms_blog_agenda",
-
Run the migration:
python3 manage.py migrate djangocms_blog_agenda
-
Update the
djangocms-blog
urls by the ones in this module, by using this lovely setting:BLOG_URLCONF = "djangocms_blog_agenda.patched_urls"
-
Create a new blog configuration.
- Instance namespace: put what you want.
- Application title: put what you want.
- Object name: put what you want.
- [...]
- Click on Layout (Show):
- [...]
- Template prefix:
djangocms_blog_agenda
.
That's very important since this application will check this value multiple times (to update the queryset, to check the templates, to add the post extension "event date" only to the Agenda app...).
- Save this config.
Explanations/Views/Misc
- A new
Event date
DateTime field has been added to blog posts that have the template prefix set todjangocms_blog_agenda
. - A new post list view was created for the Agenda view, it includes all the posts where the
event_date
is set to a date in the future. - Another view is available at
_("/past/")
, that will display each post where theevent_date
is in the past. - The templates are not in
djangocms_blog/templates
anymore, but indjangocms_blog_agenda/templates
. Something's not appearing on your templates? Try to edit the file indjangocms_blog_agenda/templates/
! - We removed the mention of comments & liveblog in the admin form, because we're not using this.
- We use some very special bits of code that are using some internal features of djangocms-blog (see
misc.py
, andapps.py
). Try the module before pushing an update.
Config
Multisite
This modules handles multisite just fine; just add BLOG_MULTISITE = True
in your settings, and our module will inject the get_site
function directly inside the class returned by get_user_model()
! (it is done in AppConfig ready()
method)
You will then need to create a new "Global Page Permission" entry with your user/group, and to select the site where the user/group will have the right to post new articles/agenda posts.
If you're curious about this function, here it is.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for djangocms_blog_agenda-0.7.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3227f045c31071719fb79d15b38d5fd5fb6c31e292fd79eafa6bc52a5400dcad |
|
MD5 | 54699a91570863ef43f0134ebe3a95a2 |
|
BLAKE2b-256 | 9a7433e3afd4e6caa190bd3608e6b16524dfb1d5354ba3edf59c030f6ea8ccae |
Hashes for djangocms_blog_agenda-0.7.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c13ab41a9c08c1137cc0e144e19ab69cfecd24d9d12a8e07efdd35522c839e4 |
|
MD5 | 7662e0fd8c234cb4206972da9bbae7f8 |
|
BLAKE2b-256 | 765d073ce60ac00442f8dcabe4fcc0a7f8786654fbbee96cec8ac218186f4501 |