|
@@ -5,12 +5,15 @@ from lodel.leapi.exceptions import *
|
5
|
5
|
from lodel import logger
|
6
|
6
|
|
7
|
7
|
import leapi_dyncode as dyncode
|
|
8
|
+import warnings
|
|
9
|
+from lodel import logger
|
8
|
10
|
|
9
|
11
|
def index_admin(request):
|
10
|
12
|
return get_response('admin/admin.html')
|
11
|
13
|
|
12
|
14
|
def admin_update(request):
|
13
|
15
|
if request.method == 'POST':
|
|
16
|
+
|
14
|
17
|
error = None
|
15
|
18
|
datas = list()
|
16
|
19
|
classname = request.form['classname']
|
|
@@ -60,10 +63,8 @@ def admin_update(request):
|
60
|
63
|
target_leo = dyncode.Object.name2class(classname)
|
61
|
64
|
except LeApiError:
|
62
|
65
|
classname = None
|
63
|
|
- template_vars = {
|
64
|
|
- 'params': request.GET
|
65
|
|
- }
|
66
|
|
- return get_response('admin/admin_edit.html', target=target_leo, lodel_id =lodel_id, tpl_vars=template_vars)
|
|
66
|
+
|
|
67
|
+ return get_response('admin/admin_edit.html', target=target_leo, lodel_id =lodel_id)
|
67
|
68
|
|
68
|
69
|
def admin_create(request):
|
69
|
70
|
classname = None
|
|
@@ -106,11 +107,7 @@ def admin_create(request):
|
106
|
107
|
msg = request.GET['msg']
|
107
|
108
|
if classname is None or target_leo.is_abstract():
|
108
|
109
|
raise HttpException(400)
|
109
|
|
- template_vars = {
|
110
|
|
- 'params': request.GET,
|
111
|
|
- 'msg' : msg
|
112
|
|
- }
|
113
|
|
- return get_response('admin/admin_create.html', tpl_vars=template_vars, target=target_leo)
|
|
110
|
+ return get_response('admin/admin_create.html', target=target_leo)
|
114
|
111
|
|
115
|
112
|
def admin(request):
|
116
|
113
|
return get_response('admin/admin.html')
|