Molodetz blogrol volgens DPP-template
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# retoor <retoor@molodetz.nl>
|
||||
from molodetz.docs_api import account, admin, community, content
|
||||
from molodetz.docs_api.registry import endpoint, field, substitute
|
||||
|
||||
|
||||
def ordered_groups():
|
||||
return [content.GROUP, community.GROUP, account.GROUP, admin.GROUP]
|
||||
|
||||
|
||||
def all_endpoints():
|
||||
return [item for group in ordered_groups() for item in group["endpoints"]]
|
||||
|
||||
|
||||
def group_by_slug(slug):
|
||||
for group in ordered_groups():
|
||||
if group["slug"] == slug:
|
||||
return group
|
||||
return None
|
||||
|
||||
|
||||
__all__ = ["all_endpoints", "endpoint", "field", "group_by_slug", "ordered_groups", "substitute"]
|
||||
Reference in New Issue
Block a user