Collection of magics.
Project description
Because i dont want to do the same thing all over again. If you are using Django Rest Framework, then this will might help you.
Features
Registration and Login
Different Authentication Logic (Basic , Token, HMAC Signature)
Basic Helpers
Since it use DRF, Browsable Rest API!
Quick start
Add “codebehind” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'codebehind', 'rest_framework', ]
Run python manage.py migrate to create the useful models.
In your *settings.py:
REST_FRAMEWORK = { # Use Django's standard `django.contrib.auth` permissions, # or allow read-only access for unauthenticated users. 'DEFAULT_PERMISSION_CLASSES': ( 'rest_framework.permissions.IsAdminUser', 'rest_framework.permissions.IsAuthenticated', ), 'DEFAULT_AUTHENTICATION_CLASSES': ( 'codebehind.authentication.CodeBehindAuthentication', 'rest_framework.authentication.BasicAuthentication', 'rest_framework.authentication.SessionAuthentication', ), 'PAGE_SIZE': 20 }
in urls.py:
from rest_framework import routers from django.conf.urls import include, url from codebehind.views import UsersViewSet, GroupViewSet router = routers.DefaultRouter() router.register(r'users', UsersViewSet,'users') router.register(r'groups', GroupViewSet,'groups') urlpatterns += [ # add this url(r'^v1/', include(router.urls)), ]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
codebehind-1.4.17.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file codebehind-1.4.17.tar.gz
.
File metadata
- Download URL: codebehind-1.4.17.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd5bd307c1133e154c44bba68eda9aae188d6e9e06bb8be8e60ee09614c3c035 |
|
MD5 | 1e247b04ca59797093331fef2b099878 |
|
BLAKE2b-256 | 1f51e51f63b29905ea296800c32af995582342f9c05e39f3760adf61f58a6a8a |
File details
Details for the file codebehind-1.4.17-py2-none-any.whl
.
File metadata
- Download URL: codebehind-1.4.17-py2-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed5147c1f377945f2784924fad9cd0794f3932e8246f2ecbcdbcffb6a6c79fd2 |
|
MD5 | f49540c045a54b2d175cb8f1b9f9510e |
|
BLAKE2b-256 | 6eb9d8cd5006ae553d216d767b58a20f4aa1749b9bbd21206732b014120eaee4 |