diff --git a/demo/apps/apijson_demo/settings.ini b/demo/apps/apijson_demo/settings.ini index c002a8d..bc4d844 100644 --- a/demo/apps/apijson_demo/settings.ini +++ b/demo/apps/apijson_demo/settings.ini @@ -6,19 +6,19 @@ moment = 'apijson_demo.models.Moment' [APIJSON_MODELS] moment = { "user_id_field" : "user_id", - "GET" : { "roles" : ["OWNER","LOGIN"] }, - "HEAD" : { "roles" : ["OWNER","LOGIN"] }, - "POST" : { "roles" : ["OWNER"] }, - "PUT" : { "roles" : ["OWNER"] }, - "DELETE" : { "roles" : ["OWNER"] }, + "GET" : { "roles" : ["OWNER","LOGIN","ADMIN"] }, + "HEAD" : { "roles" : ["OWNER","LOGIN","ADMIN"] }, + "POST" : { "roles" : ["OWNER","ADMIN"] }, + "PUT" : { "roles" : ["OWNER","ADMIN"] }, + "DELETE" : { "roles" : ["OWNER","ADMIN"] }, } comment = { "user_id_field" : "user_id", - "GET" : { "roles" : ["OWNER","LOGIN"] }, - "HEAD" : { "roles" : ["OWNER","LOGIN"] }, - "POST" : { "roles" : ["OWNER"] }, - "PUT" : { "roles" : ["OWNER"] }, - "DELETE" : { "roles" : ["OWNER"] }, + "GET" : { "roles" : ["OWNER","LOGIN","ADMIN"] }, + "HEAD" : { "roles" : ["OWNER","LOGIN","ADMIN"] }, + "POST" : { "roles" : ["OWNER","ADMIN"] }, + "PUT" : { "roles" : ["OWNER","ADMIN"] }, + "DELETE" : { "roles" : ["OWNER","ADMIN"] }, } [APIJSON_REQUESTS] diff --git a/demo/apps/settings.ini b/demo/apps/settings.ini index 0794738..11d0a6d 100644 --- a/demo/apps/settings.ini +++ b/demo/apps/settings.ini @@ -19,12 +19,14 @@ INSTALLED_APPS = [ 'uliweb_comui', 'uliweb_apijson.apijson', 'apijson_demo', + 'tables', ] [MENUS] MAINMENU = { 'subs':[ {'name': 'apijson', 'link':'/', 'title':u'APIJSON Demo'}, + {'name': 'tables', 'link':'/tables', 'title':u'APIJSON tables'}, ] } diff --git a/demo/apps/tables/README.md b/demo/apps/tables/README.md new file mode 100644 index 0000000..e69de29 diff --git a/demo/apps/tables/__init__.py b/demo/apps/tables/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/demo/apps/tables/static/readme.txt b/demo/apps/tables/static/readme.txt new file mode 100644 index 0000000..2ef657e --- /dev/null +++ b/demo/apps/tables/static/readme.txt @@ -0,0 +1 @@ +This directory is used to store static files. \ No newline at end of file diff --git a/demo/apps/tables/templates/Tables/layout.html b/demo/apps/tables/templates/Tables/layout.html new file mode 100644 index 0000000..cbe1ebc --- /dev/null +++ b/demo/apps/tables/templates/Tables/layout.html @@ -0,0 +1,11 @@ +{{extend "site/layout0.html"}} + +{{block title}}uliweb-apijson demo{{end title}} + +{{block mainmenu}} +{{<< mainmenu('tables')}} +{{end mainmenu}} + +{{block sidemenu}}{{end sidemenu}} + +{{block header_custom_menu}}{{end header_custom_menu}} diff --git a/demo/apps/tables/templates/Tables/list.html b/demo/apps/tables/templates/Tables/list.html new file mode 100644 index 0000000..510663a --- /dev/null +++ b/demo/apps/tables/templates/Tables/list.html @@ -0,0 +1,28 @@ +{{extend "Tables/layout.html"}} + +{{block content_main}} +{{use "ui.vue"}} +{{use "ui.iview"}} +{{include "vue/inc_apijson_table.html"}} +{{if role!="ADMIN":}} +