Commit 682fa2b9 by Czémán Arnold

minor modifications

parent 01bf8c3a
from django.contrib import admin
# Register your models here.
from django.db import models
# Create your models here.
...@@ -215,8 +215,8 @@ CREDENTIALS_MIXIN = Mixin("http://circlecloud.org/occi/infrastructure#", ...@@ -215,8 +215,8 @@ CREDENTIALS_MIXIN = Mixin("http://circlecloud.org/occi/infrastructure#",
"credentials", "credentials",
title="Credentials Mixin", title="Credentials Mixin",
attributes=CREDENTIALS_ATTRIBUTES, attributes=CREDENTIALS_ATTRIBUTES,
applies="http://schemas.ogf.org/occi/infrastructure" + applies="http://schemas.ogf.org/occi/" +
"#compute") "infrastructure#compute")
OS_TPL_MIXIN = Mixin("http://schemas.ogf.org/occi/infrastructure#", OS_TPL_MIXIN = Mixin("http://schemas.ogf.org/occi/infrastructure#",
"os_tpl", "os_tpl",
......
...@@ -87,8 +87,8 @@ def validate_request(request, authentication_required=True, ...@@ -87,8 +87,8 @@ def validate_request(request, authentication_required=True,
if has_data: if has_data:
# checking content type # checking content type
if request.META.get("CONTENT_TYPE") != "application/json": if request.META.get("CONTENT_TYPE") != "application/json":
raise OcciRequestNotValid("Only application/json content type is " + raise OcciRequestNotValid("Only application/json content type" +
"allowed.") " is allowed.")
# checking if the data is a valid json # checking if the data is a valid json
try: try:
data = json.loads(request.body.decode("utf-8")) data = json.loads(request.body.decode("utf-8"))
......
from django.test import TestCase
# Create your tests here.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment