def errors_snippet(request, pk=None): form, queryset = get_filtered(request) paginated = Paginator(queryset, 50) page = get_page(request, paginated) template = loader.get_template('list-snippet.html') html = template.render(RequestContext(request, {"object_list": page.object_list, })) return {"html":html, "count": len(page.object_list) }
def notifications_list(request): queryset = Notification.objects.all().order_by("-timestamp") paginated = Paginator(queryset, 10) page = get_page(request, paginated) return direct_to_template(request, "notification_list.html", extra_context={ "page": page, "nav": {"selected": "notifications"} })
def groups_list(request): form, queryset = get_group_filtered(request) paginated = Paginator(queryset, 50) page = get_page(request, paginated) return direct_to_template(request, "group.html", extra_context={ "page": page, "form": form, "nav": {"selected": "list", "subnav": "group"}, })
def notifications_list(request): queryset = Notification.all().order("-timestamp") # this number doesn't need to be high and its quite an expensive # page to generate paginated = Paginator(queryset, 10) page = get_page(request, paginated) return direct_to_template(request, "notification_list.html", extra_context={ "page": page, "nav": {"selected": "notifications"} })
def user_list(request): queryset = User.all() # this number doesn't need to be high and its quite an expensive # page to generate paginated = Paginator(queryset, 10) page = get_page(request, paginated) return direct_to_template(request, "user_list.html", extra_context={ "page": page, "nav": {"selected": "setup"} })
def issue_log_view(request, pk): issue = issue_by_number(pk) logs = Log.all().filter("issue = ", issue) paginated = Paginator(logs, 50) page = get_page(request, paginated) return direct_to_template(request, "issue_log_list.html", extra_context={ "page": page, "issue": issue, "nav": {"selected": "issues", "subnav": "list"}, })
def errors_list(request): form, queryset = get_filtered(request) paginated = Paginator(queryset, 50) page = get_page(request, paginated) if request.GET.get("lucky") and len(page.object_list): return HttpResponseRedirect(reverse("error-view", args=[page.object_list[0].id])) return direct_to_template( request, "list.html", extra_context={"page": page, "nav": {"selected": "list", "subnav": "list"}, "form": form, "refresh": True}, )
def errors_list(request): form, queryset = get_filtered(request) paginated = Paginator(queryset, 50) page = get_page(request, paginated) if request.GET.get("lucky") and len(page.object_list): return HttpResponseRedirect(reverse("error-view", args=[page.object_list[0].id,])) return direct_to_template(request, "list.html", extra_context={ "page": page, "nav": {"selected": "list", "subnav": "list"}, "form": form, "refresh": True })
def notifications_list(request): queryset = Notification.objects.all().order_by("-timestamp") paginated = Paginator(queryset, 10) page = get_page(request, paginated) return direct_to_template(request, "notification_list.html", extra_context={ "page": page, "nav": { "selected": "notifications" } })
def notifications_list(request): queryset = Notification.all().order("-timestamp") # this number doesn't need to be high and its quite an expensive # page to generate paginated = Paginator(queryset, 10) page = get_page(request, paginated) return direct_to_template(request, "notification_list.html", extra_context={ "page": page, "nav": { "selected": "notifications" } })
def issue_log_view(request, pk): issue = issue_by_number(pk) logs = Log.all().filter("issue = ", issue) paginated = Paginator(logs, 50) page = get_page(request, paginated) return direct_to_template(request, "issue_log_list.html", extra_context={ "page": page, "issue": issue, "nav": { "selected": "issues", "subnav": "list" }, })
def errors_list(request): errors = Error.all().order("-timestamp") paginated = Paginator(errors, 50) page = get_page(request, paginated) return direct_to_template(request, "list.html", extra_context={"page":page})