
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
django-timeline
Advanced tools
There are two parts to using event streams. The first is to declare an Event, it looks like this::
from django.contrib.auth.models import User
from timeline.base import EventType
from yourapp.library.models import Item
class AddedToLibrary(EventType):
slug = "added-to-library"
context_shape = {
"user": User,
"item": Item,
}
queryable_by = ["user", "item"]
And then there is querying, all querying is encapsulated in the
timeline.base.Stream class. It is used like so::
Stream(request.user)
will return a Stream for all of the events for the request.user.pk User.
It can take any number of positional arguments and it will combine their streams.
It also takes a number of keyword arguments. event_type which will return
only Events for a given slug. limit a number saying how many
Events should be included, defaults to 20. cluster a boolean saying
whether the data returned should be clustered, if it is than it yields a list
of Events, rather than discrete Events.
FAQs
a Django timeline (activity stream) using redis
We found that django-timeline 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.