Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc95dd2

Browse files
authored
Merge pull request#10 from zhangchunlin/master
modify demo navigation strings; update document
2 parents4a323a5 +26bdea4 commitfc95dd2

File tree

2 files changed

+39
-9
lines changed

2 files changed

+39
-9
lines changed

‎demo/apps/settings.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ INSTALLED_APPS = [
2525
[MENUS]
2626
MAINMENU = {
2727
'subs':[
28-
{'name':'apijson','link':'/','title':u'APIJSON Demo'},
29-
{'name':'tables','link':'/tables','title':u'APIJSONtables'},
28+
{'name':'apijson','link':'/','title':u'requests demo'},
29+
{'name':'tables','link':'/tables','title':u'tables'},
3030
]
3131
}
3232

3333
[LAYOUT]
34-
logo_lg ="Uliweb"
34+
logo_lg ="uliweb-apijson"
3535
logo_mini ="U"
3636

3737
[SESSION]

‎uliweb_apijson/apijson/README.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
uliweb-apijson is a subset and slightly different variation of[apijson](https://github.com/TommyLemon/APIJSON/blob/master/Document.md)
44

5-
#uliweb model configuration
5+
#apijson model configuration
66

77
##example
88

@@ -11,21 +11,51 @@ uliweb-apijson is a subset and slightly different variation of [apijson](https:/
1111
user = {
1212
"user_id_field" : "id",
1313
"secret_fields" : ["password"],
14-
"rbac_get" : {
15-
"roles" : ["ADMIN","OWNER"]
16-
}
14+
"GET" : { "roles" : ["ADMIN","OWNER"] },
15+
"HEAD" : { "roles" : ["ADMIN","OWNER"] },
16+
"POST" : { "roles" : ["ADMIN","OWNER"] },
17+
"PUT" : { "roles" : ["ADMIN","OWNER"] },
18+
"DELETE" : { "roles" : ["ADMIN","OWNER"] },
1719
}
1820
```
1921

2022
##document
2123

22-
settings.APIJSON_MODEL_CONFIG.[MODEL_NAME]
24+
settings.APIJSON_MODELS.[MODEL_NAME]
2325

2426
| Field| Doc|
2527
| -------------| ----------------------------------------------------------|
2628
| user_id_field| Field name of user id, related to query user own data.|
2729
| secret_fields| Secret fields won't be exposed.|
28-
| rbac_get| Configure of roles or permissions for apijson 'get' method|
30+
| GET/HEAD/POST/PUT/DELETE| Configure of roles or permissions for apijson methods|
31+
32+
#apijson request configuration
33+
34+
##example
35+
36+
```
37+
[APIJSON_REQUESTS]
38+
moment = {
39+
"moment": {
40+
"POST" :{
41+
"ADD":{"@role": "OWNER"},
42+
"DISALLOW" : ["id"],
43+
"NECESSARY" : ["content"],
44+
},
45+
"PUT" :{
46+
"ADD":{"@role": "OWNER"},
47+
"NECESSARY" : ["id","content"],
48+
},
49+
}
50+
}
51+
```
52+
##document
53+
54+
settings.APIJSON_REQUESTS.[TAG_NAME]
55+
56+
request types currently support: POST, PUT
57+
request configuration currently support: ADD,DISALLOW,NECESSARY (still not fully support[all the configuration items](https://github.com/TommyLemon/APIJSON/wiki#%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86))
58+
2959

3060
#Supported API Examples
3161

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp