Ticket 5454
[auf_rh_dae.git] / project / qbe_admin / admin.py
1 from django.contrib import admin
2 from django_qbe.models import SavedQuery
3 from django_qbe.admin import SavedQueryAdmin
4
5
6 class CustomSavedQueryAdmin(SavedQueryAdmin):
7
8 def has_add_permission(self, request):
9 print "test"
10 return True
11
12 def has_change_permission(self, request, obj=None):
13 print "test"
14 return True
15
16 def has_delete_permission(self, request, obj=None):
17 print "test"
18 return True
19
20
21 # from hashlib import md5
22 # from django.conf import settings
23 # from django.http import HttpResponseRedirect
24 # from django.core.urlresolvers import reverse
25 # from django.utils.translation import ugettext_lazy as _
26 # from django.contrib.admin.util import unquote
27 # from django_qbe.utils import pickle_encode
28 # from django_qbe.models import SavedQuery
29
30
31 admin.site.unregister(SavedQuery)
32 admin.site.register(SavedQuery, CustomSavedQueryAdmin)