Пример #1
0
 def get_context_data(self, *args, **kwargs):
   context = super(ClubManage, self).get_context_data(*args, **kwargs)
   context['stats'] = self.club.load_stats()
   context['links'] = self.club.links.all().order_by('name')
   context['roles'] = dict(ROLES)
   context.update(list_features())
   context['now'] = timezone.now()
   context['offers'] = PaymentOffer.objects.filter(target='club').order_by('amount')
   context['subscriptions'] = self.club.subscriptions.all()
   return context
Пример #2
0
    def get_context_data(self, *args, **kwargs):
        context = super(PaymentStatus, self).get_context_data(*args, **kwargs)
        context['now'] = timezone.now()

        # Load athlete offer
        context['offer'] = get_object_or_404(PaymentOffer, slug='athlete')

        # Load subscriptions & transactions
        subs = self.request.user.subscriptions.all()
        context['subscriptions'] = dict([(s.offer.slug, s) for s in subs])
        context['transactions'] = self.request.user.payment_transactions.all()

        # Load premium features
        context.update(list_features(only_premium=True))
        return context
Пример #3
0
  def get_context_data(self, *args, **kwargs):
    context = super(PaymentStatus, self).get_context_data(*args, **kwargs)
    context['now'] = timezone.now()

    # Load athlete offer
    context['offer'] = get_object_or_404(PaymentOffer, slug='athlete')

    # Load subscriptions & transactions
    subs = self.request.user.subscriptions.all()
    context['subscriptions'] = dict([(s.offer.slug, s) for s in subs])
    context['transactions'] = self.request.user.payment_transactions.all()

    # Load premium features
    context.update(list_features(only_premium=True))
    return context
Пример #4
0
 def get_context_data(self, *args, **kwargs):
   context = super(FeaturesView, self).get_context_data(*args, **kwargs)
   context.update(list_features())
   return context