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

modify demo navigation strings; update document#10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
TommyLemon merged 1 commit intoAPIJSON:masterfromzhangchunlin:master
Jan 2, 2019
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletionsdemo/apps/settings.ini
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,13 +25,13 @@ INSTALLED_APPS = [
[MENUS]
MAINMENU = {
'subs':[
{'name': 'apijson', 'link':'/', 'title':u'APIJSON Demo'},
{'name': 'tables', 'link':'/tables', 'title':u'APIJSONtables'},
{'name': 'apijson', 'link':'/', 'title':u'requests demo'},
{'name': 'tables', 'link':'/tables', 'title':u'tables'},
]
}

[LAYOUT]
logo_lg = "Uliweb"
logo_lg = "uliweb-apijson"
logo_mini = "U"

[SESSION]
Expand Down
42 changes: 36 additions & 6 deletionsuliweb_apijson/apijson/README.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@

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

#uliweb model configuration
#apijson model configuration

## example

Expand All@@ -11,21 +11,51 @@ uliweb-apijson is a subset and slightly different variation of [apijson](https:/
user = {
"user_id_field" : "id",
"secret_fields" : ["password"],
"rbac_get" : {
"roles" : ["ADMIN","OWNER"]
}
"GET" : { "roles" : ["ADMIN","OWNER"] },
"HEAD" : { "roles" : ["ADMIN","OWNER"] },
"POST" : { "roles" : ["ADMIN","OWNER"] },
"PUT" : { "roles" : ["ADMIN","OWNER"] },
"DELETE" : { "roles" : ["ADMIN","OWNER"] },
}
```

## document

settings.APIJSON_MODEL_CONFIG.[MODEL_NAME]
settings.APIJSON_MODELS.[MODEL_NAME]

| Field | Doc |
| ------------- | ---------------------------------------------------------- |
| user_id_field | Field name of user id, related to query user own data. |
| secret_fields | Secret fields won't be exposed. |
| rbac_get | Configure of roles or permissions for apijson 'get' method |
| GET/HEAD/POST/PUT/DELETE | Configure of roles or permissions for apijson methods |

# apijson request configuration

## example

```
[APIJSON_REQUESTS]
moment = {
"moment": {
"POST" :{
"ADD":{"@role": "OWNER"},
"DISALLOW" : ["id"],
"NECESSARY" : ["content"],
},
"PUT" :{
"ADD":{"@role": "OWNER"},
"NECESSARY" : ["id","content"],
},
}
}
```
## document

settings.APIJSON_REQUESTS.[TAG_NAME]

request types currently support: POST, PUT
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))


# Supported API Examples

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp