Skip to content

multivrac/django_sleep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

django_sleep

Django middleware to create a delay in loading pages for debug purpose (or any other reasons)

Usage

In the settings.py file, key SLEEP_TIME = x define sleep time in second.

Installation

If not existing : create a folder

yourproject/yourapp/middleware

Put the django_sleep.py file into.

Add the middleware in your settings.py file.

MIDDLEWARE = [ 'corsheaders.middleware.CorsMiddleware', .... 'project.middleware.django_sleep.SleepMiddleware', ]

Add timing (example 2 seconds) by adding SLEEP_TIME = 2 key in settings.py

SLEEP_TIME = 2

That's it !

About

Django middleware to create a delay in loading pages for debug purpose (or any other reasons)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages