def users(request):

    queryset = SUser.objects.all()
    columns = ('username', 'first_name', 'last_name', 'email')

    return search_view(request,
                       queryset,
                       'sadmin2/autocomplete/users.html',
                       'sadmin2/autocomplete/users.html',
                       search_columns=columns)
def attendees(request):

    queryset = Attend.objects.all().select_related('event', 'user')
    columns = ('event__title', 'user__username', 'user__first_name', 'user__last_name', 'user__email')

    return search_view(request,
                       queryset,
                       'sadmin2/autocomplete/attendees.html',
                       'sadmin2/autocomplete/attendees.html',
                       search_columns=columns)
Beispiel #3
0
def templates(request):

    queryset = EmailSpecification.objects.all().\
        order_by('-pk')

    columns = ('subject',)

    context = {
        'sadmin2_menu_main_active': 'emails',
        'sadmin2_breadcrumbs_active': 'emails_templates',
        'sadmin2_menu_tab': menu.sadmin2_menu_tab_emails,
        'sadmin2_menu_tab_active': 'templates'
    }

    return search_view(request,
                       queryset,
                       'sadmin2/emails/templates_list.html',
                       'sadmin2/emails/templates_list_inner.html',
                       search_columns=columns,
                       context=context)
Beispiel #4
0
def queue(request):

    queryset = MailerMessage.objects.all().\
        order_by('sent', '-last_attempt', '-pk')

    columns = ('subject', 'app', 'to_address')

    context = {
        'sadmin2_menu_main_active': 'emails',
        'sadmin2_breadcrumbs_active': 'emails_queue',
        'sadmin2_menu_tab': menu.sadmin2_menu_tab_emails,
        'sadmin2_menu_tab_active': 'queue',
    }

    return search_view(request,
                       queryset,
                       'sadmin2/emails/queue_list.html',
                       'sadmin2/emails/queue_list_inner.html',
                       search_columns=columns,
                       context=context)