def verify_performer_app_paid(user_name, conference):
    '''
    Verifies if a user has paid his or her application fee.
    NOTE:  This function assumes that there is a record of the application,
    saved in the database with a status of "submitted", at the time the check
    is performed.
    user_name - This is the user name of the user in question.
    returns - true if the system recognizes the application submittal fee is
      paid
    '''
    from gbe.models import Act
    acts_submitted = 0
    # First figure out how many acts this user has purchased
    act_fees_purchased = Transaction.objects.filter(
        ticket_item__add_on=False,
        ticket_item__ticketing_event__act_submission_event=True,
        ticket_item__ticketing_event__conference=conference,
        purchaser__matched_to_user__username=str(user_name)).count()
    # Then figure out how many acts have already been submitted.
    acts_submitted = Act.objects.filter(
        submitted=True,
        b_conference=conference,
        performer__contact__user_object__username=user_name).count()

    logger.info("Purchased Count:  %s  Submitted Count:  %s" %
                (act_fees_purchased, acts_submitted))
    return act_fees_purchased > acts_submitted
Пример #2
0
 def handle(self, *args, **options):
     sched_days = EmailFrequency.objects.filter(
         email_type="act_tech_reminder").values_list('weekday', flat=True)
     if datetime.now().weekday() in sched_days:
         logger.info('Executing ReminderSend Script....')
         self.stdout.write('Executing ReminderSend Script....')
         number_emails = act_tech_reminder()
         logger.info('%s tech reminders sent.' % number_emails)
         self.stdout.write('%s tech reminders sent.' % number_emails)
     else:
         self.stdout.write('Today is day %s, and not a scheduled day.' %
                           (day_of_week[datetime.now().weekday()][1]))
Пример #3
0
 def handle(self, *args, **options):
     logger.info('Executing SyncBPTTrans Script....')
     self.stdout.write('Executing SyncBPTTrans Script....')
     count = process_bpt_order_list()
     logger.info('%s transactions imported.' % count)
     self.stdout.write('%s transactions imported.' % count)
 def handle(self, *args, **options):
     logger.info('Executing ScheduleSend Script....')
     self.stdout.write('Executing ScheduleSend Script....')
     number_emails = schedule_email()
     logger.info('%s schedule notifications sent.' % number_emails)
     self.stdout.write('%s schedule notifications sent.' % number_emails)