{
"compilerOptions": {
"baseUrl": "./src",
"target": "ES6",
"jsx": "preserve",
"allowSyntheticDefaultImports": true
},
"exclude": ["build", "node_modules"]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework.authentication import TokenAuthentication | |
from .models import MongoToken | |
from rest_framework import exceptions | |
class MongoTokenAuthentication(TokenAuthentication): | |
model = MongoToken | |
def authenticate_credentials(self, key): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls import patterns, url, include | |
from rest_framework_mongoengine.routers import MongoSimpleRouter | |
from api.views import TodoViewSet | |
router = MongoSimpleRouter() | |
router.register(r'todo', TodoViewSet) | |
urlpatterns = patterns( | |
'', |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake' | |
require 'rake/testtask' | |
Rake::TestTask.new do |t| | |
t.test_files = Dir.glob('spec/**/*_spec.rb') | |
end | |
task(default: :test) |