Commit a0cf9380 by Fukász Rómeó Ervin

small code changes in core and views

parent 788d4f38
...@@ -166,7 +166,7 @@ class Link(Entity): ...@@ -166,7 +166,7 @@ class Link(Entity):
kwargs) kwargs)
def render_as_json(self): def render_as_json(self):
json = {"kind": self.kind, "id": self.id, "source" : self.source, json = {"kind": self.kind, "id": self.id, "source": self.source,
"target": self.target} "target": self.target}
if hasattr(self, "mixins"): if hasattr(self, "mixins"):
json["mixins"] = self.mixins json["mixins"] = self.mixins
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
from django.views.generic import View from django.views.generic import View
from django.contrib.auth import logout from django.contrib.auth import logout
from django.http import HttpResponse, JsonResponse from django.http import JsonResponse
from vm.models.instance import Instance # from vm.models.instance import Instance
from common.models import HumanReadableException # from common.models import HumanReadableException
from forms import OcciAuthForm from forms import OcciAuthForm
import json import json
from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.csrf import ensure_csrf_cookie
...@@ -48,6 +48,7 @@ class OcciLogoutView(View): ...@@ -48,6 +48,7 @@ class OcciLogoutView(View):
result = {"result": "OK"} result = {"result": "OK"}
return JsonResponse(result) return JsonResponse(result)
class TestView(View): class TestView(View):
""" TEST VIEW """ """ TEST VIEW """
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
......
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