|
@@ -110,6 +110,23 @@ def admin_create(request):
|
110
|
110
|
raise HttpException(400)
|
111
|
111
|
return get_response('admin/admin_create.html', target=target_leo)
|
112
|
112
|
|
|
113
|
+def admin_classes(request):
|
|
114
|
+ return get_response('admin/list_classes_admin.html', my_classes = dyncode.dynclasses)
|
|
115
|
+
|
|
116
|
+def admin_class(request):
|
|
117
|
+ if 'classname' in request.GET:
|
|
118
|
+ classname = request.GET['classname']
|
|
119
|
+ if len(classname) > 1:
|
|
120
|
+ raise HttpException(400)
|
|
121
|
+ classname = classname[0]
|
|
122
|
+ try:
|
|
123
|
+ target_leo = dyncode.Object.name2class(classname)
|
|
124
|
+ except LeApiError:
|
|
125
|
+ classname = None
|
|
126
|
+ if classname is None or target_leo.is_abstract():
|
|
127
|
+ raise HttpException(400)
|
|
128
|
+ return get_response('admin/show_class_admin.html', target=target_leo)
|
|
129
|
+
|
113
|
130
|
def admin(request):
|
114
|
131
|
return get_response('admin/admin.html')
|
115
|
132
|
|