File: cookbook.rst

package info (click to toggle)
python-restless 2.0.1-5~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 472 kB
  • sloc: python: 1,879; makefile: 149
file content (20 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.. _cookbook:

========
Cookbook
========

This is a place for community-contributed patterns & ideas for extending
Restless.


Authentication
==============

If your framework has the concept of a logged-in user (like Django), you can
do something like::

    class MyResource(DjangoResource):
        def is_authenticated(self):
            return self.request.user.is_authenticated()