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

Commit20a9c31

Browse files
authored
Merge pull request#42 from zhangchunlin/master
Sync
2 parents6962b31 +1b303bf commit20a9c31

File tree

6 files changed

+434
-17
lines changed

6 files changed

+434
-17
lines changed

‎CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#Changelog
22

3+
- 0.2.1(2019-10-22)
4+
-**apison-post: modify to be same with original apijson, just return "id" and "count", not other fields**
5+
- apijson-table: fix key and title problem in viewedit_items
6+
- apijson-viewedit: fix@role
7+
- apijson-table: fix apijson-put and apijson-delete@role not work problem
8+
- doc: add difference in tag parameter in apijson post/put
9+
-**tests: add 97 test cases, and fix bugs found by tests**
10+
- fix "NameError: name 'log' is not defined"
11+
- fix py2/3 compatible
12+
- fix issue#4 :"NameError: name 'UliwebError' is not defined"
13+
- apijson-table: add hook_add, for customizing the add action in apijson-table component
314
- 0.2.0(2019-09-17)
415
- setup: add fix utf8 for reading file
516
-**fix json response structure to be same as original apijson api (java)**

‎tests/demo/apps/apijson_demo/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ class Comment(Model):
3131
classPublicNotice(Model):
3232
date=Field(datetime.datetime,auto_now_add=True)
3333
content=Field(TEXT)
34+
35+
classNoRequestTag(Model):
36+
user_id=Reference("user")
37+
content=Field(TEXT)

‎tests/demo/apps/apijson_demo/settings.ini

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ privacy = 'apijson_demo.models.Privacy'
33
comment ='apijson_demo.models.Comment'
44
moment ='apijson_demo.models.Moment'
55
publicnotice ='apijson_demo.models.PublicNotice'
6+
norequesttag ='apijson_demo.models.NoRequestTag'
67

78
[APIJSON_MODELS]
89
user = {
@@ -42,8 +43,8 @@ publicnotice = {
4243
"GET" : {"roles" : ["OWNER","LOGIN","ADMIN","UNKNOWN"] },
4344
"HEAD" : {"roles" : ["OWNER","LOGIN","ADMIN","UNKNOWN"] },
4445
"POST" : {"roles" : ["OWNER","ADMIN"] },
45-
"PUT" : {"roles" : ["OWNER","ADMIN"] },
46-
"DELETE" : {"roles" : ["OWNER","ADMIN"] },
46+
"PUT" : {"roles" : ["OWNER","ADMIN","UNKNOWN"] },
47+
"DELETE" : {"roles" : ["OWNER","ADMIN","UNKNOWN"] },
4748
}
4849

4950
[APIJSON_REQUESTS]
@@ -68,5 +69,12 @@ comment = {
6869
"PUT" :{
6970
"ADD":{"@role":"OWNER"},
7071
"NECESSARY" : ["id","content"],
72+
"DISALLOW" : ["user_id","to_id"],
7173
},
7274
}
75+
76+
publicnotice = {
77+
"PUT" :{
78+
"NECESSARY" : ["id","content"],
79+
}
80+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp