def home_messages(request): result = [] member = request.user.member if member.confirmed is False: result.append(get_template('messages/not_confirmed.html').render()) if member.subscription is None and member.future_subscription is None: result.append(get_template('messages/no_subscription.html').render()) if len(ShareDao.unpaid_shares(member)) > 0: render_dict = { 'amount': len(ShareDao.unpaid_shares(member)), } template = get_template('messages/unpaid_shares.html') render_result = template.render(render_dict) result.append(render_result) return result
def messages(request): result = [] if request.user.member.confirmed is False: result.append(get_template('messages/not_confirmed.html').render()) if request.user.member.subscription is None: result.append(get_template('messages/no_subscription.html').render()) if len(ShareDao.unpaid_shares(request.user.member)) > 0: render_dict = { 'amount': len(ShareDao.unpaid_shares(request.user.member)), } result.append( get_template('messages/unpaid_shares.html').render(render_dict)) return result
def share_canceledlist(request): render_dict = get_menu_dict(request) render_dict.update({'change_date_disabled': True}) return subscription_management_list(ShareDao.canceled_shares(), render_dict, 'management_lists/share_canceledlist.html', request)
def paid_shares(self): return ShareDao.paid_shares(self).count()
def all_shares(self): return ShareDao.all_shares_subscription(self).count()