Skip to main content

django-rest-signature for multisite

Project description

django-rest-signature是一个多站点的网站签名

Overview

这个包支持 Django REST framework.


Requirements

  • python(3.4)
  • Django(1.8)
  • Django REST Framework (3.1.0)
  • PyJwt

只在上述环境中测试过

Installation

install using pip

$ pip install django-rest-signature

Settings

在INSTALLED_APPS 中增加 ‘rest_signature’.

INSTALLED_APPS = (
    ....
    'rest_signature',
)

在MIDDLEWARE_CLASSES 中 AuthenticationMiddleware之前增加 ‘rest_signature.middleware.SignatureMiddleware’

MIDDLEWARE_CLASSES = (
    ...
    'rest_signature.middleware.SignatureMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    ...
)

Usage

通过request.site获取 site 对象


Issue

  1. 对GET和非GET请求未处理

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_rest_signature-0.0.2-py3.4.egg (10.2 kB) Copy SHA256 hash SHA256 Egg 3.4
django-rest-signature-0.0.2.tar.gz (3.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page