Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Install & Setup

Byron Ruth edited this page May 2, 2013 · 2 revisions

Install

Serrano's source code is hosted on GitHub. Releases follow the SemVer spec. All tagged versions are uploaded to PyPi, but tagged versions can be downloaded directly.

pip install serrano --use-mirrors

Setup

Include serrano.urls in your ROOT_URLCONF module:

urlpatterns = patterns('',
    url(r'^api/', include('serrano.urls')),
    ...
)

In this example, /api/ is the root endpoint for Serrano. Hitting this endpoint will expose the available URLs for the API.

Add django.contrib.sessions to your project's INSTALLED_APPS:

INSTALLED_APPS = (
    'django.contrib.sessions',
    ...
)

Add the serrano.middleware.SessionMiddleware to the MIDDLEWARE_CLASSES setting after Django's session and authentication middleware (if installed):

MIDDLEWARE_CLASSES = (
    ...
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'serrano.middleware.SessionMiddleware',
    ...
)

Next: Settings

Clone this wiki locally