Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
djangocms-blog-agenda
Advanced tools
Add an Agenda to your blog that displays upcoming events!
Easy! CheapFree! Not seen on TV!
Install the package
python3 -m pip install djangocms-blog-agenda
Add it in your INSTALLED_APPS
:
"djangocms_blog_agenda",
"recurrence",
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.
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...).
Event date
DateTime field has been added to blog posts that have the template prefix set to djangocms_blog_agenda
.event_date
is set to a date in the future._("/past/")
, that will display each post where the event_date
is in the past.djangocms_blog/templates
anymore, but in djangocms_blog_agenda/templates
. Something's not appearing on your templates? Try to edit the file in djangocms_blog_agenda/templates/
!misc.py
, and apps.py
). Try the module before pushing an update.DJANGOCMS_BLOG_AGENDA_HIDE_UPCOMING_EVENTS_AFTER_CHOICES
a tuple of choices describing when AgendaUpcomingEntriesPlugin
will hide events.
Default choices are:
(
("start", _("just after event start date")),
("start+1h", _("1 hour after event start date")),
("start+4h", _("4 hours after event start date")),
("start+1d", _("1 day after event start date")),
("start+2d", _("2 days after event start date")),
("start+3d", _("3 days after event start date")),
("start+7d", _("7 days after event start date")),
("end", _("just after event end date")),
)
DJANGOCMS_BLOG_AGENDA_RECURRENCE_MAX_DAYS_SEARCH
a number of days (int) to limit the search of recurring events. Defaults to 365
.
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.
Recurring events are handled with the help of django-recurrence package. Only the first event is saved into database, and following recurring events are added into querysets just before they are displayed. Only events that occurs n
days after the first event are displayed. You can change this n
with the setting DJANGOCMS_BLOG_AGENDA_RECURRENCE_MAX_DAYS_SEARCH
.
FAQs
Create an agenda on top of djangocms-blog!
We found that djangocms-blog-agenda demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.