Gitlab CSE Unil

Commit c3ac5f4f authored by Julien Furrer's avatar Julien Furrer
Browse files

Small fix for 1.8 compatibility

parent 25c336e7
......@@ -4,29 +4,25 @@ from django.contrib import admin
from eav.admin import BaseEntityAdmin, BaseSchemaAdmin
# from sorl.thumbnail.admin import AdminImageMixin
from adim.models import AnObj, AOSchema, AOType, AOAttribute, AOChoice, Annotation
from adim.models import AnObj, Annotation # AOSchema, AOType, AOAttribute, AOChoice
from adim.forms import AnObjForm
# from adim.forms import AnObjForm
class AnObjAdmin(BaseEntityAdmin):
form = AnObjForm
# form = AnObjForm, AnObjAdmin)
class AOSchemaAdmin(BaseSchemaAdmin):
filter_horizontal = ('ao_types', ), AOSchemaAdmin)
class AOChoiceAdmin(admin.ModelAdmin):
list_filter = ('schema', )
# class AOSchemaAdmin(BaseSchemaAdmin):
# filter_horizontal = ('ao_types', )
#, AOSchemaAdmin), AOChoiceAdmin)
# class AOChoiceAdmin(admin.ModelAdmin):
# list_filter = ('schema', )
#, AOChoiceAdmin)
\ No newline at end of file
......@@ -5,7 +5,7 @@ import user
import uuid, random
from django.db import models
from django.conf import settings
from django.contrib.contenttypes import generic
# from django.contrib.contenttypes import generic
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.utils import timezone
# coding=utf-8
from __future__ import unicode_literals
import json
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied
from django.http.response import HttpResponseForbidden, Http404
from django.conf import settings
from django.db.models import get_model, Q
from django.db.models import Q
from django.shortcuts import get_object_or_404
from adim.models import AnObj, AnObjMembership, Annotation
......@@ -182,7 +183,7 @@ class UserViewSet(viewsets.ReadOnlyModelViewSet):
The anobj uuid is given as a querystring variable
model = get_model(*settings.AUTH_USER_MODEL.split('.'))
model = get_user_model()
serializer_class = UserSerializer
def get_queryset(self):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment