semvec/pypi-packages huggingface dataset:
django-fallthrough-cache 0.1.0
A Django cache backend with fallthrough
License: MIT

# django-fallthrough-cache

An implementation of Django's cache backend interface that allows you to put a
fast cache (e.g. `LocMemCache`) in front of a slower one (e.g. `PyLibMCCache`).

## Usage

The configuration below sets up 3 caches: 'locmem', 'memcache', and
'fallthrough'. The fallthrough cache will look up values in the local memory
cache, and on cache misses it will fall through to memcache.

```python
CACHES = {
    'locmem': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
        'LOCATION': 'local-memory',
        'TIMEOUT': 60,
        'VERSION': 1
    },
    'memcache': {
        'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
        'LOCATION': os.environ['MEMCACHE_HOST'],
        'TIMEOUT': None,
        'OPTIONS': {
            'connect_timeout': 1000,
            'receive_timeout': 1000000,
            'send_timeout': 1000000,
            'dead_timeout': 5,
        },
        'VERSION': 1
    },
    'fallthrough': {
        'BACKEND': 'fallthrough_cache.FallthroughCache',
        'OPTIONS': {
            'cache_names': ['locmem', 'memcache']
        }
    }
}
```
django-initial-field 0.1.1
Sometimes it is needed to pass some default values to the objects created by ModelForm. This simple mixin enables that by creating HiddenInput fields and passing initial parameters to the created Model
License: MIT
Keywords: django-initial-field

=============================
Django initial form field
=============================

.. image:: https://badge.fury.io/py/django-initial-field.svg
    :target: https://badge.fury.io/py/django-initial-field

.. image:: https://travis-ci.org/PetrDlouhy/django-initial-field.svg?branch=master
    :target: https://travis-ci.org/PetrDlouhy/django-initial-field

.. image:: https://codecov.io/gh/PetrDlouhy/django-initial-field/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/PetrDlouhy/django-initial-field

Sometimes it is needed to pass some default values to the objects created by ModelForm. This simple mixin enables that by creating HiddenInput fields and passing initial parameters to the created Model

Documentation
-------------

The full documentation is at https://django-initial-field.readthedocs.io.

Quickstart
----------

Install Django initial form field::

    pip install django-initial-field

Use InitialFieldMixin in your `ModelForm` and set `initial_field` parameter:

.. code-block:: python

    class MyForm(InitialFieldsMixin, forms.ModelForm):
        initial_fields = ('my_field')

Then set initial value in your FormView:

.. code-block:: python

	class MyView(FormView):
		 def get_initial(self):
			  return {'my_field': "some value"}

Running Tests
-------------

Does the code actually work?

::

    source <YOURVIRTUALENV>/bin/activate
    (myenv) $ pip install tox
    (myenv) $ tox

Credits
-------

Tools used in rendering this package:

*  Cookiecutter_
*  `cookiecutter-djangopackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage




History
-------

0.1.0 (2017-08-11)
++++++++++++++++++

* First release on PyPI.