wikidot 3.1.0.dev10__tar.gz → 3.1.0.dev11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wikidot-3.1.0.dev10/src/wikidot.egg-info → wikidot-3.1.0.dev11}/PKG-INFO +1 -1
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/pyproject.toml +1 -1
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/__init__.py +1 -1
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/common/decorators.py +12 -1
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11/src/wikidot.egg-info}/PKG-INFO +1 -1
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/LICENSE +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/MANIFEST.in +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/README.md +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/setup.cfg +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/common/__init__.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/common/exceptions.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/common/logger.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/connector/__init__.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/connector/ajax.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/connector/api.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/__init__.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/auth.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/client.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/forum_category.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/forum_post.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/forum_thread.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/page.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/page_revision.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/page_source.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/page_votes.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/private_message.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/site.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/site_application.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/site_member.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/module/user.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/util/__init__.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/util/parser/__init__.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/util/parser/odate.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/util/parser/user.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/util/quick_module.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/util/requestutil.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/util/stringutil.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/util/table/__init__.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot/util/table/char_table.py +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot.egg-info/SOURCES.txt +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot.egg-info/dependency_links.txt +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot.egg-info/requires.txt +0 -0
- {wikidot-3.1.0.dev10 → wikidot-3.1.0.dev11}/src/wikidot.egg-info/top_level.txt +0 -0
|
@@ -19,6 +19,7 @@ def login_required(func):
|
|
|
19
19
|
1. client という名前の引数
|
|
20
20
|
2. Client クラスのインスタンスである引数
|
|
21
21
|
3. self.client(呼び出し元オブジェクトの属性)
|
|
22
|
+
4. selfが持つ属性が持つclientクラス(例:self.site.client)
|
|
22
23
|
|
|
23
24
|
Parameters
|
|
24
25
|
----------
|
|
@@ -52,9 +53,19 @@ def login_required(func):
|
|
|
52
53
|
break
|
|
53
54
|
|
|
54
55
|
# selfに存在するか?
|
|
55
|
-
if client is None:
|
|
56
|
+
if client is None and args:
|
|
56
57
|
if hasattr(args[0], "client"):
|
|
57
58
|
client = args[0].client
|
|
59
|
+
else:
|
|
60
|
+
# selfが持つ属性にclientが存在するか探索する
|
|
61
|
+
for attr_name in dir(args[0]):
|
|
62
|
+
if attr_name.startswith("_"):
|
|
63
|
+
continue
|
|
64
|
+
attr = getattr(args[0], attr_name)
|
|
65
|
+
if hasattr(attr, "client"):
|
|
66
|
+
client = getattr(attr, "client")
|
|
67
|
+
if isinstance(client, Client):
|
|
68
|
+
break
|
|
58
69
|
|
|
59
70
|
if client is None:
|
|
60
71
|
raise ValueError("Client is not found")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|