Skip to content
Snippets Groups Projects
Commit 11997aa5 authored by Christian Dresen's avatar Christian Dresen
Browse files

[WarpAPI] Added WarpAPI sample application

parent 13304004
No related branches found
No related tags found
No related merge requests found
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class WarpmainConfig(AppConfig):
name = 'warpapi'
from __future__ import unicode_literals
from django.db import models
from django.test import TestCase
# Create your tests here.
from django.conf.urls import url, include
from warpapi import views
urlpatterns = [
url(r'^api/spaceapi/$', views.main),
]
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework import status
@api_view(['GET'])
def main(request):
if request.method == 'GET':
test = {"test":"value"}
return Response(test)
return Response()
...@@ -67,16 +67,17 @@ INSTALLED_APPS = ( ...@@ -67,16 +67,17 @@ INSTALLED_APPS = (
'django.contrib.humanize', 'django.contrib.humanize',
'bootstrapform', 'bootstrapform',
'bootstrap3_datetime', 'bootstrap3_datetime',
'rest_framework',
'rest_framework.authtoken',
'django_otp', 'django_otp',
'django_otp.plugins.otp_static', 'django_otp.plugins.otp_static',
'django_otp.plugins.otp_totp', 'django_otp.plugins.otp_totp',
'two_factor', 'two_factor',
'warpapi',
'warpmain', 'warpmain',
'warpauth', 'warpauth',
'warpfood', 'warpfood',
# WARPPAY
# 'rest_framework',
# 'rest_framework.authtoken',
# 'warppay' # 'warppay'
) )
......
...@@ -9,5 +9,6 @@ urlpatterns = [ ...@@ -9,5 +9,6 @@ urlpatterns = [
url(r'^', include('warpmain.urls')), url(r'^', include('warpmain.urls')),
url(r'^', include('warpauth.urls')), url(r'^', include('warpauth.urls')),
url(r'^', include('warpfood.urls')), url(r'^', include('warpfood.urls')),
url(r'^', include('warpapi.urls')),
# url(r'^', include('warppay.urls')), # url(r'^', include('warppay.urls')),
] ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment