Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install django-response-timeout

How to install django-response-timeout

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install django-response-timeout
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.1.0 Available View build log
 
License
LICENSE.txt
Dependencies
Lastest release
version 0.1.0 on Sep 20th, 2013
https://pypip.in/v/django-response-timeout/badge.png https://travis-ci.org/saulshanabrook/django-response-timeout.png

django-response-timeout allows you to set the cache time globally for all responses. It provides a way to override the client side cache time for the Django per site caching middleware.

Installation

Installation is as easy as:

pip install django-response-timeout

Setup

Add response_timeout.middleware.SetCacheTimeoutMiddleware and place it after dumper.middleware.UpdateCacheMiddleware so that it will set the header time first on cached responses.

System Message: ERROR/3 (<string>, line 30)

Unknown directive type "code-block".

.. code-block:: python

    MIDDLEWARE_CLASSES = (
        'django.middleware.cache.UpdateCacheMiddleware',
        'response_timeout.middleware.SetCacheTimeoutMiddleware',
        'django.middleware.common.CommonMiddleware',
        'django.middleware.cache.FetchFromCacheMiddleware',
    )

Then set RESPONSE_CACHE_SECONDS to the number of seconds each page should be cached on the front end.

The Django documention does not cohesively describe how your middleware should be ordered, however this stackoverflow discussion does a fine job.

Contributing

If you find issues or would like to see a feature suppored, head over to the issues section and report it. Don't be agraid, go ahead, do it!

To contribute code in any form, fork the repository and clone it locally. Create a new branch for your feature:

git commit -b feature/whatever-you-like

Then make sure all the tests past (and write new ones for any new features):

pip install -e .
pip install -r requirements-dev.txt
django-admin.py test --settings=test.settings

Check if the README.rst looks right:

restview --long-description

Then push the finished feature to github and open a pull request form the branch.

New Release

To create a new release:

  1. Add changes to CHANGES.txt
  2. Change version in setup.py
  3. python setup.py register
  4. python setup.py sdist upload

Subscribe to package updates

Last updated Sep 20th, 2013

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.