semvec/pypi-packages huggingface dataset:
django-simple-poll 0.2.3
Django simple poll application

Simple Django poll application.

Installation
------------

```
pip install django-simple-poll
```

Install latest from github:
```
pip install -e git+https://github.com/applecat/django-simple-poll.git#egg=django-simple-poll
```

Requirements
------------
Django 1.10+, Python 2.7, 3.4+

Usage
-----

1. Add 'poll' application in the ``INSTALLED_APPS`` settings:

    ```
    INSTALLED_APPS = (
        ...
        'poll',
    )
    ```

2. Add the poll's url to your urls.py.

    ```
    urlpatterns = [
        ...
        url(r'^poll/', include('poll.urls')),
    ]
    ```

3. Run ```python manage.py migrate```

4. Go to site's admin area and create a new poll:
![82721122-13db-11e7-905a-b90019b0fbde](https://cloud.githubusercontent.com/assets/390483/24417739/393a782a-13f2-11e7-8c09-fd6d0cf228f0.png)

5. Add this tags in your template file to show the poll:

    ```
    {% load poll_tags %}
    ...
    {% poll %}
    ```

6. Check if jQuery is already included on the page. If don't — add it:
```
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
```

7. Make vote, see the results:

![2017-03-28 17 17 10](https://cloud.githubusercontent.com/assets/390483/24410357/8973a134-13db-11e7-9788-94fe3462d1ce.png)
![2017-03-28 17 17 05](https://cloud.githubusercontent.com/assets/390483/24410353/870887e8-13db-11e7-81b6-b5a721696e32.png)


Customization
-------------

Of course, you can (and probably, should) customize Simple Poll's templates. You can simply do this by overriding `base.html`, `poll.html` and `result.html` in `templates/poll` directory.
responses_proxy 0.1.4
allow you to easily mock HTTP responses in your tests
Keywords: requests responses

===================
responses proxy
===================

.. image:: https://travis-ci.org/bearstech/responses_proxy.png?branch=master
  :target: https://travis-ci.org/bearstech/responses_proxy

responses_proxy allow you to easily mock HTTP responses in your tests

Installation
=============

With pip::

    $ pip install responses_proxy

Using docker::

    $ docker run --rm -v tests/responses:/tests/responses bearstech/responses_proxy -h

Usage
=====

Check command line arguments::

    $ responses-proxy -h

First save some stuff using the proxy mode::

    $ responses-proxy --proxy

If your target site use ssl then use::

    $ responses-proxy --proxy --use-ssl

The proxy do not support ssl so you need to make http request. But first set
the `HTTP_PROXY` env var::

    $ export HTTP_PROXY=http://localhost:3333

Then run some code to make some requests::

    python -c "import requests; requests.get('http://bearstech.com')"

This will generate some file in `tests/responses/`

NB: With docker you'll have to mount the volume::

    $ docker run --rm -v tests/responses:/tests/responses bearstech/responses_proxy

You can now restart the server without the proxy mode and the client will react
the same way without calling the real server.

You can aslo use a `RequestsMock` in you unit tests::

    import responses_proxy
    import requsests

    def test_url():
        with responses_proxy.RequestsMock():
            requests.get('http://bearstech.com')
            # https will work to. both are registered
            requests.get('https://bearstech.com')