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


Download files

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

Files for django-rest-signature, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size django_rest_signature-0.0.2-py3.4.egg (10.2 kB) File type Egg Python version 3.4 Upload date Hashes View
Filename, size django-rest-signature-0.0.2.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page