本文整理汇总了Python中c3smembership.models.C3sMember.get_num_mem_other_features方法的典型用法代码示例。如果您正苦于以下问题:Python C3sMember.get_num_mem_other_features方法的具体用法?Python C3sMember.get_num_mem_other_features怎么用?Python C3sMember.get_num_mem_other_features使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c3smembership.models.C3sMember
的用法示例。
在下文中一共展示了C3sMember.get_num_mem_other_features方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: stats_view
# 需要导入模块: from c3smembership.models import C3sMember [as 别名]
# 或者: from c3smembership.models.C3sMember import get_num_mem_other_features [as 别名]
def stats_view(request):
"""
This view lets accountants view statistics:
how many membership applications, real members, shares, etc.
"""
# countries_dict = C3sMember.get_countries_list()
_cl = C3sMember.get_countries_list()
_cl_sorted = _cl.items()
# print "die liste: {}".format(_cl_sorted)
import operator
_cl_sorted.sort(key=operator.itemgetter(1), reverse=True)
# print "sortiert: {}".format(_cl_sorted)
return {
# form submissions
'_number_of_datasets': C3sMember.get_number(),
'afm_shares_unpaid': C3sMember.afm_num_shares_unpaid(),
'afm_shares_paid': C3sMember.afm_num_shares_paid(),
# shares
# 'num_shares': C3sMember.get_total_shares(),
'num_shares_members': Shares.get_total_shares(),
# 'num_shares_mem_norm': Shares.get_sum_norm(),
# 'num_shares_mem_inv': Shares.get_sum_inv(),
# memberships
'num_members_accepted': C3sMember.get_num_members_accepted(),
'num_non_accepted': C3sMember.get_num_non_accepted(),
'num_nonmember_listing': C3sMember.nonmember_listing_count(),
'num_duplicates': len(C3sMember.get_duplicates()),
# 'num_empty_slots': C3sMember.get_num_empty_slots(),
# normal persons vs. legal entities
'num_ms_nat_acc': C3sMember.get_num_mem_nat_acc(),
'num_ms_jur_acc': C3sMember.get_num_mem_jur_acc(),
# normal vs. investing memberships
'num_ms_norm': C3sMember.get_num_mem_norm(),
'num_ms_inves': C3sMember.get_num_mem_invest(),
'num_ms_features': C3sMember.get_num_mem_other_features(),
# membership_numbers
'num_memnums': C3sMember.get_num_membership_numbers(),
'max_memnum': C3sMember.get_highest_membership_number(),
'next_memnum': C3sMember.get_next_free_membership_number(),
# countries
'num_countries': C3sMember.get_num_countries(),
'countries_list': _cl_sorted,
# key=lambda x: x[1]
# ), # XXX TODO: sorte
# dues stats
'dues15_stats': Dues15Invoice.get_monthly_stats(),
'dues16_stats': Dues16Invoice.get_monthly_stats(),
# staff figures
'num_staff': len(C3sStaff.get_all())
}