Skip to main content

django-epfl-misc

Build Status Coverage Status PyPI version PyPI Python version

A Django application with helper functions and utilities.

Requirements

  • Python 3.7 or later
  • Django 2.2, 3.2, 4.2 or 5.2

Installation

Installing from PyPI is as easy as doing:

pip install django-epfl-misc

Documentation

Auth

superuser_required_or_403()

from django_epflmisc.decorators import superuser_required_or_403

@superuser_required_or_403()
def my_view(request):
    # I can assume now that the view is only accessible as a superuser.

Cache

The cache system requires a small amount of setup. Namely, you have to tell it where your cached data should live – whether in a database, on the filesystem or directly in memory.

See Django's cache framework

cache_anonymous_user(timeout, cache="default")

from django_epflmisc.decorators import cache_anonymous_user

@cache_anonymous_user(60 * 15)
def my_view(request):
    # I can assume now that the view is cached for anonymous users.

License

The MIT License (MIT)

Copyright (c) 2021-2025 ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland.

Metadata

Release files for django-epfl-misc 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-epfl-misc 2.2.0
File Size Uploaded
django_epfl_misc-2.2.0.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-epfl-misc 2.2.0
File Interpreter ABI Platform
django_epfl_misc-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / django_epfl_misc-2.2.0.tar.gz

Download URL django_epfl_misc-2.2.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7f6983d4d780211215cd7f6ef2532da8bda14fdb705d106349126f8a2155d025
BLAKE2b-256 checksum
How to use checksums
c9f7309a893a938ea9795a089aadc661c5bc1784d20c76b19d33c8c87a50b980
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.26.2 CPython/3.14.0 Linux/6.11.0-1018-azure

Release files / django_epfl_misc-2.2.0-py3-none-any.whl

Download URL django_epfl_misc-2.2.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05d3762e2aeb2e306c12b4746d2f1fbb9176fb3d646fefa53cc19d0aeaf6c349
BLAKE2b-256 checksum
How to use checksums
c271091c292329252c42de90de98b9fbf3541276a8d397d8fe247d7eaf8d80e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.26.2 CPython/3.14.0 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page