semvec/pypi-packages huggingface dataset:
drfpolicy 0.3.0
An ad-hoc DRF policy service to assist with complex authorization requirements
License: BSD

drfpolicy
======================================

|build-status-image| |pypi-version|

Overview
--------

An ad-hoc DRF policy service to assist with complex authorization requirements

Requirements
------------

-  Python (2.7, 3.3, 3.4)
-  Django (1.6, 1.7, 1.8)
-  Django REST Framework (2.4, 3.0, 3.1)

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

Install using ``pip``\ …

.. code:: bash

    $ pip install drfpolicy

Example
-------

TODO: Write example.

Testing
-------

Install testing requirements.

.. code:: bash

    $ pip install -r requirements.txt

Run with runtests.

.. code:: bash

    $ ./runtests.py

You can also use the excellent `tox`_ testing tool to run the tests
against all supported versions of Python and Django. Install tox
globally, and then simply run:

.. code:: bash

    $ tox

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

To build the documentation, you’ll need to install ``mkdocs``.

.. code:: bash

    $ pip install mkdocs

To preview the documentation:

.. code:: bash

    $ mkdocs serve
    Running at: http://127.0.0.1:8000/

To build the documentation:

.. code:: bash

    $ mkdocs build

.. _tox: http://tox.readthedocs.org/en/latest/

.. |build-status-image| image:: https://secure.travis-ci.org/sassoo/drfpolicy.svg?branch=master
   :target: http://travis-ci.org/sassoo/drfpolicy?branch=master
.. |pypi-version| image:: https://img.shields.io/pypi/v/drfpolicy.svg
   :target: https://pypi.python.org/pypi/drfpolicy
django-dbes 0.1.0
A django package to speed-up your HTML email developpement workflow in django
License: BSD
Keywords: django-dbes

=============================
django-dbes
=============================

.. image:: https://badge.fury.io/py/django-dbes.png
    :target: https://badge.fury.io/py/django-dbes

.. image:: https://travis-ci.org/EliotBerriot/django-dbes.png?branch=master
    :target: https://travis-ci.org/EliotBerriot/django-dbes

A django package to speed-up your HTML email developpement workflow in django.

**Warning**: this package is intended for developpement only.

Use case
--------

Working on email templates/styling in django can be really painful and slow:

* Dumping the email content to console via django's `ConsoleBackend` is just not enough when you work with HTML emails
* Sending the emails to a real adress is slow, requires a working SMTP server, and may be dangerous. It will also quickly spam your inbox.

A possible answer
-----------------

What if we could display sent emails directly in browser during developpement ? It's actually quite simple, and it's exactly
what django-dbes does:

1. Instead of sending mails or logging them to console, it's stored as a model instances in database
2. The email URL is logged on the console so it can be accessed it in a web browser
3. The view behind this URL retrieve the Email instance in database and render the content in a template

The project is also bundled with an admin module so you can quickly see what are the last sent emails and display them.

Quickstart
----------

Install django-dbes::

    pip install django-dbes

Then add the app to your settings.py::

    INSTALLED_APPS = [
        # other apps
        'dbes',
    ]

    EMAIL_BACKEND = 'dbes.backends.EmailBackend'

Add this to your URLs conf::

    urlpatterns = [
        # your urls
        url(r'^emails/', include('dbes.urls', namespace='dbes')),
    ]

Run the migrations::

    python manage.py migrate dbes

From now on, each time you send an email, it will be saved as a model instead of being sent. You'll also see
a log output in your console, such as:

    Sending email to contact@test.com with subject "Test". You can access this email at URL http://127.0.0.1:8000/emails/8b2b0bf2-bfb3-4771-a14c-f6d4dc9a635b

Just click the email link to display it.


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

Does the code actually work?

::

    source <YOURVIRTUALENV>/bin/activate
    (myenv) $ pip install -r requirements-test.txt
    (myenv) $ python runtests.py

Credits
---------

Tools used in rendering this package:

*  Cookiecutter_
*  `cookiecutter-pypackage`_

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




History
-------

0.1.0 (2016-04-20)
++++++++++++++++++

* First release on PyPI.
django-basic-authentication-decorator 0.9
Decorator to provide Basic Authentication for Django Views
License: BSD

What
=====

This is a decorator for a django view that will request Basic Authentication.
This is a copy of https://djangosnippets.org/snippets/243/

Why
====

There are serveral reasons for this Package:

  * I wanted Basic Authentication for just a couple of views. So the RemoteUserAuthBackend was no option. Also I did not want to configure the webserver to do Basic Authentication.
  * As you can read in the comments of https://djangosnippets.org/snippets/243/ there are some bugs in it - so I wanted to have them fixed - but also documented that they were fixed and in the end provide a fixed version of it
  * Also I just want to install it via pip

How to use
===========

Apache
-------

Add this to your apache config to tell apache to pass the Authorication Headers to your application:

  WSGIPassAuthorization On