Removed debugging info; moved to standard admin, redirect not working

svn: r23414
This commit is contained in:
Doug Blank 2013-10-25 22:49:55 +00:00
parent 507a1f9b9f
commit 81ca515038
2 changed files with 3 additions and 5 deletions

View File

@ -26,15 +26,15 @@ from __future__ import print_function
from gramps.webapp.grampsdb.models import *
from django.contrib import admin
## FIXME: this no longer works in Django 1.5
class MyAdmin(admin.ModelAdmin):
def change_view(self, request, object_id, extra_context=None):
print("object_id:", object_id)
result = super(MyAdmin, self).change_view(request, object_id, extra_context)
if '_addanother' not in request.POST and '_continue' not in request.POST:
result['Location'] = "/"
return result
for type_name in get_tables("all"):
admin.site.register(type_name[1], MyAdmin)
admin.site.register(Profile, MyAdmin)
admin.site.register(type_name[1], admin.ModelAdmin)
admin.site.register(Profile, admin.ModelAdmin)

View File

@ -190,8 +190,6 @@ class DjangoInterface(object):
return models.clear_tables(*args)
def get_tag_list(self, obj):
print(obj)
print(dir(obj))
return obj.get_tag_list()
def get_attribute_list(self, obj):