Here, you will find some information helpful if you plan on developing upon or making changes to the Event Service source code itself.

Project Structure

The PREMIS Event Service is structured as a common Python project, providing a Python package named premis_event_service which is a Django app:

├──          ## Customizes the Django admin interface
├──          ## Form definitions and validation code
├──       ## Makes this directory a Python package
├── migrations        ## Django database migrations
│   ├──
│   ├──
│   └──
├──         ## Data models, using Django ORM
├──   ## Business logic
├──       ## App-specific settings
├── templates
│   └── premis_event_service
│       ├── agent.html
│       ├── base.html
│       ├── event.html
│       ├── recent_event_list.html
│       └── search.html
├──           ## App-specific url patterns/routes
└──          ## Route handlers which generate human- and machine-readable views

If you’re not sure where to look for something, is usually the best place to start. There you’ll find a list of every URL pattern handled by the application, along with its corresponding view (found in and arguments.


Models define the data objects Django keeps in its database. The PREMIS Event Service defines these three:

  • Event - Represents an event.
  • Agent - Represents an agent you’ve defined using the Django admin interface.
  • LinkObject - Contains an identifier for an object in your preservation workflow. Exists for the purpose of relating multiple events that pertain to the same object.

See premis_event_service/ for the full definitions to these models.


View are functions (or sometimes classes) that Django calls upon to generate the result of a request. Usually this just means rendering some HTML from a template and serving it, but sometimes this involves form processing and API interactions as well. Django decides which view to run based on what’s defined in

See premis_event_service/ for the full source code to all the views provided by the Event Service.