コード例 #1
0
def ReviewProposalListView(request):
    '''
    Show the list of class bids, review results,
    and give a way to update the reviews
    '''
    reviewer = validate_perms(request, ('Class Coordinator',))
    if request.GET and request.GET.get('conf_slug'):
        conference = Conference.by_slug(request.GET['conf_slug'])
    else:
        conference = Conference.current_conf()

    header = ClassProposal().bid_review_header
    classes = ClassProposal.objects.filter(
        conference=conference).order_by('type', 'title')
    rows = []
    for aclass in classes:
        bid_row = {}
        bid_row['bidder_active'] = True
        bid_row['bid'] = aclass.bid_review_summary
        bid_row['id'] = aclass.id
        bid_row['review_url'] = reverse('proposal_publish',
                                        urlconf='gbe.urls',
                                        args=[aclass.id])
        rows.append(bid_row)
    conference_slugs = Conference.all_slugs()
    return render(request,
                  'gbe/bid_review_list.tmpl',
                  {'header': header,
                   'rows': rows,
                   'conference': conference,
                   'conference_slugs': conference_slugs})
コード例 #2
0
def FashionFaireView(request):
    '''
    The Vintage Fashion Faire.  Glorified vendor list
    '''
    current_conference = Conference.current_conf()
    if request.GET:
        conference = Conference.by_slug(request.GET.get('conference', None))
    else:
        conference = current_conference
    user_message = UserMessage.objects.get_or_create(
        view="FashionFaireView",
        code="INTRODUCTION",
        defaults={
            'summary': "Top of Fashion Fair Page",
            'description': fashion_fair_intro
        })
    vendors = list(
        Vendor.objects.filter(accepted=3, b_conference=conference).exclude(
            level="Featured").order_by('b_title'))
    featured_vendors = list(
        Vendor.objects.filter(accepted=3,
                              b_conference=conference,
                              level="Featured").order_by('b_title'))
    template = 'gbe/fashionfair.tmpl'
    context = {
        'vendors': vendors,
        'featured_vendors': featured_vendors,
        'user_message': user_message[0]
    }
    return render(request, template, context)
コード例 #3
0
 def groundwork(self, request):
     self.reviewer = validate_perms(request, self.reviewer_permissions)
     if request.GET.get('conf_slug'):
         self.conference = Conference.by_slug(request.GET['conf_slug'])
     else:
         self.conference = Conference.current_conf()
     self.conference_slugs = Conference.all_slugs()
コード例 #4
0
def get_gbe_schedulable_items(confitem_type,
                              filter_type=None,
                              conference=None):
    '''
    Queries the database for the conferece items relevant for each type
    and returns a queryset.
    '''
    if confitem_type in ['Panel', 'Movement', 'Lecture', 'Workshop']:
        filter_type, confitem_type = confitem_type, 'Class'
    elif confitem_type in [
            'Special Event', 'Volunteer Opportunity', 'Master Class',
            'Drop-In Class'
    ]:
        filter_type, confitem_type = confitem_type, 'GenericEvent'

    if not conference:
        conference = Conference.current_conf()
    confitem_class = eval(confitem_type)
    confitems_list = confitem_class.objects.filter(e_conference=conference)

    if filter_type is not None:
        confitems_list = [
            confitem for confitem in confitems_list
            if confitem.type == filter_type
        ]

    return confitems_list
コード例 #5
0
ファイル: functions.py プロジェクト: bethlakshmi/GBE2
def get_gbe_schedulable_items(confitem_type,
                              filter_type=None,
                              conference=None):
    '''
    Queries the database for the conferece items relevant for each type
    and returns a queryset.
    '''
    if confitem_type in ['Panel', 'Movement', 'Lecture', 'Workshop']:
        filter_type, confitem_type = confitem_type, 'Class'
    elif confitem_type in ['Special Event',
                           'Volunteer Opportunity',
                           'Master Class',
                           'Drop-In Class']:
        filter_type, confitem_type = confitem_type, 'GenericEvent'

    if not conference:
        conference = Conference.current_conf()
    confitem_class = eval(confitem_type)
    confitems_list = confitem_class.objects.filter(e_conference=conference)

    if filter_type is not None:
        confitems_list = [
            confitem for confitem in confitems_list if
            confitem.type == filter_type]

    return confitems_list
コード例 #6
0
def review_staff_area_view(request):
    '''
      Shows listing of staff area stuff for drill down
    '''
    viewer_profile = validate_perms(request, 'any', require=True)
    if request.GET and request.GET.get('conf_slug'):
        conference = Conference.by_slug(request.GET['conf_slug'])
    else:
        conference = Conference.current_conf()

    header = ['Area', 'Leaders', 'Check Staffing']

    return render(
        request, 'gbe/report/staff_areas.tmpl', {
            'header': header,
            'areas': StaffArea.objects.filter(conference=conference),
            'conference_slugs': conference_slugs(),
            'conference': conference
        })
コード例 #7
0
    def get(self, request, *args, **kwargs):
        self.reviewer = validate_perms(request, self.reviewer_permissions)
        self.user = request.user
        if request.GET.get('conf_slug'):
            self.conference = Conference.by_slug(request.GET['conf_slug'])
        else:
            self.conference = Conference.current_conf()

        if request.GET.get('changed_id'):
            self.changed_id = int(request.GET['changed_id'])
        else:
            self.changed_id = -1

        try:
            self.get_bid_list()
        except IndexError:
            return HttpResponseRedirect(reverse('home', urlconf='gbe.urls'))

        self.conference_slugs = Conference.all_slugs()
        return render(request, self.template, self.get_context_dict())
コード例 #8
0
def review_staff_area_view(request):
    '''
      Shows listing of staff area stuff for drill down
    '''
    viewer_profile = validate_perms(request, 'any', require=True)
    if request.GET and request.GET.get('conf_slug'):
        conference = Conference.by_slug(request.GET['conf_slug'])
    else:
        conference = Conference.current_conf()

    header = ['Area', 'Leaders', 'Check Staffing']

    return render(
        request,
        'gbe/report/staff_areas.tmpl',
        {'header': header,
         'areas': StaffArea.objects.filter(conference=conference),
         'shows': Show.objects.filter(e_conference=conference),
         'volunteer_types': AvailableInterest.objects.filter(visible=True),
         'conference_slugs': conference_slugs(),
         'conference': conference})
コード例 #9
0
    def get(self, request, *args, **kwargs):
        self.reviewer = validate_perms(request, self.reviewer_permissions)
        self.user = request.user
        if request.GET.get('conf_slug'):
            self.conference = Conference.by_slug(request.GET['conf_slug'])
        else:
            self.conference = Conference.current_conf()

        if request.GET.get('changed_id'):
            self.changed_id = int(request.GET['changed_id'])
        else:
            self.changed_id = -1

        try:
            self.get_bid_list()
        except IndexError:
            return HttpResponseRedirect(reverse('home', urlconf='gbe.urls'))

        self.conference_slugs = Conference.all_slugs()
        return render(request, self.template,
                      self.get_context_dict())
コード例 #10
0
def FashionFaireView(request):
    '''
    The Vintage Fashion Faire.  Glorified vendor list
    '''
    current_conference = Conference.current_conf()
    if request.GET:
        conference = Conference.by_slug(request.GET.get('conference', None))
    else:
        conference = current_conference
    user_message = UserMessage.objects.get_or_create(
        view="FashionFaireView",
        code="INTRODUCTION",
        defaults={
            'summary': "Top of Fashion Fair Page",
            'description': fashion_fair_intro})
    vendors = list(Vendor.objects.filter(
        accepted=3,
        b_conference=conference))
    template = 'gbe/fashionfair.tmpl'
    context = {'vendors': vendors,
               'user_message': user_message[0]}
    return render(request, template, context)
コード例 #11
0
def conference_slugs():
    return Conference.all_slugs()
コード例 #12
0
def get_conference_by_slug(slug):
    return Conference.by_slug(slug)
コード例 #13
0
def get_current_conference_slug():
    conf = Conference.current_conf()
    if conf:
        return conf.conference_slug
コード例 #14
0
def get_current_conference():
    return Conference.current_conf()
コード例 #15
0
 def volunteer_schedule(self, conference=None):
     conference = conference or Conference.current_conf()
     return self.workeritem.get_bookings(role="Volunteer",
                                         conference=conference).order_by(
                                             'starttime')
コード例 #16
0
ファイル: profile.py プロジェクト: bethlakshmi/GBE2
 def volunteer_schedule(self, conference=None):
     conference = conference or Conference.current_conf()
     return self.workeritem.get_bookings(role="Volunteer",
                                         conference=conference).order_by(
                                             'starttime')
コード例 #17
0
ファイル: functions.py プロジェクト: bethlakshmi/GBE2
def conference_slugs():
    return Conference.all_slugs()
コード例 #18
0
ファイル: functions.py プロジェクト: bethlakshmi/GBE2
def get_conference_by_slug(slug):
    return Conference.by_slug(slug)
コード例 #19
0
ファイル: functions.py プロジェクト: bethlakshmi/GBE2
def get_current_conference_slug():
    conf = Conference.current_conf()
    if conf:
        return conf.conference_slug
コード例 #20
0
ファイル: functions.py プロジェクト: bethlakshmi/GBE2
def get_current_conference():
    return Conference.current_conf()