Exemplo n.º 1
0
 def setUp(self):
     self.january = ssDate(year='2011', month='01', day='12', size='month')
     self.february = ssDate(year='2011', month='02', day='12', size='month')
     self.earlymarch = ssDate(year='2011', month='03', day='05', size='month')
     self.latemarch = ssDate(year='2011', month='03', day='31', size='month')
     self.july = ssDate(year='2011', month='07', day='12', size='month')
     self.earlyoctober = ssDate(year='2011', month='10', day='10', size='month')
     self.lateoctober = ssDate(year='2011', month='10', day='31', size='month')
     self.november = ssDate(year='2011', month='11', day='12', size='month')
Exemplo n.º 2
0
 def setUp(self):
     self.january = ssDate(year='2011', week='02')
     self.february = ssDate(year='2011', week='06')
     self.earlymarch = ssDate(year='2011', week='09')
     self.latemarch = ssDate(year='2011', week='12')
     self.july = ssDate(year='2011', week='28')
     self.earlyoctober = ssDate(year='2011', week='41')
     self.lateoctober = ssDate(year='2011', week='43')
     self.november = ssDate(year='2011', week='45')
Exemplo n.º 3
0
 def setUp(self):
     self.january = ssDate(year='2011', week='02')
     self.february = ssDate(year='2011', week='06')
     self.earlymarch = ssDate(year='2011', week='09')
     self.latemarch = ssDate(year='2011', week='12')
     self.july = ssDate(year='2011', week='28')
     self.earlyoctober = ssDate(year='2011', week='41')
     self.lateoctober = ssDate(year='2011', week='43')
     self.november = ssDate(year='2011', week='45')
Exemplo n.º 4
0
def monthReport(request, year, month):
    cal = ssDate(year=year, month=month, size='month')
    prog = Prog(cal=cal, all=True)
    return render_to_response('organisation/report.html', {
        'maintitle': cal.strftime("%B %Y"),
        'cal': cal,
        'prog': prog.byDate(),
    },
                              context_instance=RequestContext(request))
Exemplo n.º 5
0
def monthReport(request, year, month):
    cal = ssDate(year=year, month=month, size='month')
    prog = Prog(cal=cal, all=True)
    return render_to_response('organisation/report.html',
                              {
                                  'maintitle': cal.strftime("%B %Y"),
                                  'cal': cal,
                                  'prog': prog.byDate(),
                              },
                              context_instance=RequestContext(request)
    )
Exemplo n.º 6
0
def meetingsReport(request, year=None):
    if year is None:
        year = datetime.now().year
    cal = ssDate(size='year', year=year)
    prog = Prog(cal=cal, types=[Meeting.objects, ])
    return render_to_response('organisation/meetingReport.html',
                              {
                                  'maintitle': 'Meetings %s' % year,
                                  'cal': cal,
                                  'prog': prog.byDate(trimmed=True),
                              },
                              context_instance=RequestContext(request)
    )
Exemplo n.º 7
0
def meetingsReport(request, year=None):
    if year is None:
        year = datetime.now().year
    cal = ssDate(size='year', year=year)
    prog = Prog(cal=cal, types=[
        Meeting.objects,
    ])
    return render_to_response('organisation/meetingReport.html', {
        'maintitle': 'Meetings %s' % year,
        'cal': cal,
        'prog': prog.byDate(trimmed=True),
    },
                              context_instance=RequestContext(request))
Exemplo n.º 8
0
def listPeriod(request, dateObj=None, **kwargs):
    cal = ssDate(dateObj, **kwargs)
    prog = Prog(cal=cal, public=True, approved=True)
    return render_to_response('programming/listPeriod.html',
                              {
                                  'maintitle': kwargs['title'] if 'title' in kwargs else unicode(cal),
                                  'earliertext': kwargs['earliertext'] if 'earliertext' in kwargs else 'Earlier',
                                  'latertext': kwargs['latertext'] if 'latertext' in kwargs else 'Later',
                                  'fillerImage': Picture.objects.get(id=789),
                                  'cal': cal,
                                  'prog': prog.byDate(),
                              },
                              context_instance=RequestContext(request)
    )
Exemplo n.º 9
0
 def setUp(self):
     self.january = ssDate(
         datetime.datetime(2011, 01, 12, 14, 23, 01, 50))  # year='2011', month='01', day='12', size='month')
     self.february = ssDate(
         datetime.datetime(2011, 02, 12, 14, 23, 01, 50))  # year='2011', month='02', day='12', size='month')
     self.earlymarch = ssDate(
         datetime.datetime(2011, 03, 05, 14, 23, 01, 50))  # year='2011', month='03', day='05', size='month')
     self.latemarch = ssDate(
         datetime.datetime(2011, 03, 31, 14, 23, 01, 50))  # year='2011', month='03', day='31', size='month')
     self.july = ssDate(
         datetime.datetime(2011, 07, 12, 14, 23, 01, 50))  # year='2011', month='07', day='12', size='month')
     self.earlyoctober = ssDate(
         datetime.datetime(2011, 10, 10, 14, 23, 01, 50))  # year='2011', month='10', day='10', size='month')
     self.lateoctober = ssDate(
         datetime.datetime(2011, 10, 31, 14, 23, 01, 50))  # year='2011', month='10', day='31', size='month')
     self.november = ssDate(
         datetime.datetime(2011, 11, 12, 14, 23, 01, 50))  # year='2011', month='11', day='12', size='month')
Exemplo n.º 10
0
 def setUp(self):
     self.january = ssDate(year='2011', month='01', day='12', size='week')
     self.february = ssDate(year='2011', month='02', day='12', size='week')
     self.earlymarch = ssDate(year='2011',
                              month='03',
                              day='05',
                              size='week')
     self.latemarch = ssDate(year='2011', month='03', day='23', size='week')
     self.july = ssDate(year='2011', month='07', day='12', size='week')
     self.earlyoctober = ssDate(year='2011',
                                month='10',
                                day='10',
                                size='week')
     self.lateoctober = ssDate(year='2011',
                               month='10',
                               day='26',
                               size='week')
     self.november = ssDate(year='2011', month='11', day='12', size='week')
Exemplo n.º 11
0
def returnReport(request, year, month):
    cal = ssDate(year=year, month=month, size='month')
    prog = Prog(types=[
        Film.objects,
    ], cal=cal)
    prog = prog.byDate(trimmed=True)
    totals = {
        'newMembers': 0,
        'membershipTake': Decimal('0.00'),
        'normalTickets': 0,
        'normalTake': Decimal('0.00'),
        'concessionTickets': 0,
        'concessionTake': Decimal('0.00'),
        'ticketTake': Decimal('0.00'),
        'totalTake': Decimal('0.00'),
    }
    for day, events in prog:
        for event in events:
            try:
                ret = event.boxofficereturn_set.all()[0]
                totals['newMembers'] += ret.newMembers
                totals['membershipTake'] += ret.membershipTake()
                totals['normalTickets'] += ret.normalTickets
                totals['normalTake'] += ret.normalTake()
                totals['concessionTickets'] += ret.concessionTickets
                totals['concessionTake'] += ret.concessionTake()
                totals['ticketTake'] += ret.ticketTake()
                totals['totalTake'] += ret.totalTake()
            except IndexError:
                pass
    return render_to_response(
        'organisation/returnReport.html', {
            'maintitle': 'Box Office Returns ' + cal.strftime("%B %Y"),
            'cal': cal,
            'prog': prog,
            'totals': totals,
        },
        context_instance=RequestContext(request))
Exemplo n.º 12
0
def returnReport(request, year, month):
    cal = ssDate(year=year, month=month, size='month')
    prog = Prog(types=[Film.objects, ], cal=cal)
    prog = prog.byDate(trimmed=True)
    totals = {
        'newMembers': 0,
        'membershipTake': Decimal('0.00'),
        'normalTickets': 0,
        'normalTake': Decimal('0.00'),
        'concessionTickets': 0,
        'concessionTake': Decimal('0.00'),
        'ticketTake': Decimal('0.00'),
        'totalTake': Decimal('0.00'),
    }
    for day, events in prog:
        for event in events:
            try:
                ret = event.boxofficereturn_set.all()[0]
                totals['newMembers'] += ret.newMembers
                totals['membershipTake'] += ret.membershipTake()
                totals['normalTickets'] += ret.normalTickets
                totals['normalTake'] += ret.normalTake()
                totals['concessionTickets'] += ret.concessionTickets
                totals['concessionTake'] += ret.concessionTake()
                totals['ticketTake'] += ret.ticketTake()
                totals['totalTake'] += ret.totalTake()
            except IndexError:
                pass
    return render_to_response('organisation/returnReport.html',
                              {
                                  'maintitle': 'Box Office Returns ' + cal.strftime("%B %Y"),
                                  'cal': cal,
                                  'prog': prog,
                                  'totals': totals,
                              },
                              context_instance=RequestContext(request)
    )
Exemplo n.º 13
0
 def get_object(self, request, *args, **kwargs):
     return ssDate(None, **kwargs)
Exemplo n.º 14
0
 def get_object(self, request, *args, **kwargs):
     return ssDate(date.today() + timedelta(days=30), size='month')
Exemplo n.º 15
0
 def get_object(self, request, *args, **kwargs):
     return ssDate(date.today(), size='week')
Exemplo n.º 16
0
 def setUp(self):
     self.year = ssDate(year='2011', size='year')
Exemplo n.º 17
0
 def setUp(self):
     self.year = ssDate(year='2011', size='year')
Exemplo n.º 18
0
 def get_object(self, request, *args, **kwargs):
     return ssDate(date.today(), size='week')
Exemplo n.º 19
0
 def get_object(self, request, *args, **kwargs):
     return ssDate(None, **kwargs)
Exemplo n.º 20
0
 def get_object(self, request, *args, **kwargs):
     return ssDate(date.today() + timedelta(days=30), size='month')