GitHub PullRequestReviewCommentEvent at 2014-04-20 02:31:46
Repository: third-impact
Actor: lambdalisue
Payload: {"comment":{"url":"https://api.github.com/repos/kawazrepos/third-impact/pulls/comments/11796623","id":11796623,"diff_hunk":"@@ -1,3 +1,127 @@\n-from django.shortcuts import render\n+from django.views.generic.detail import DetailView\n+from django.views.generic.list import ListView, MultipleObjectMixin\n+from django.views.generic.edit import ModelFormMixin, CreateView, UpdateView, DeleteView\n+from django.views.generic.dates import YearArchiveView, MonthArchiveView, BaseArchiveIndexView\n+from django.core.urlresolvers import reverse_lazy\n+from django.core.exceptions import PermissionDenied\n+from django.http.response import HttpResponseRedirect, HttpResponseForbidden, HttpResponseNotAllowed\n+\n+from permission.decorators import permission_required\n+\n+from .models import Event\n+from .forms import EventForm\n+\n+class EventPublishedQuerySetMixin(MultipleObjectMixin):\n+    def get_queryset(self):\n+        return Event.objects.published(self.request.user).order_by()\n+\n+\n+class EventActiveQuerySetMixin(MultipleObjectMixin):\n+    def get_queryset(self):\n+        return Event.objects.active(self.request.user)\n+\n+class EventDateArchiveMixin(BaseArchiveIndexView):\n+    def get(self, request, *args, **kwargs):\n+        self.date_list, self.object_list, extra_context = self.get_dated_items()\n+        self.object_list = self.object_list.order_by('period_start') # 日付昇順にならない\n+        context = self.get_context_data(object_list=self.object_list,\n+                                        date_list=self.date_list)\n+        context.update(extra_context)\n+        return self.render_to_response(context)\n+\n+class EventSetOrganizerMixin(ModelFormMixin):\n+    def form_valid(self, form):\n+        form.instance.organizer = self.request.user\n+        return super().form_valid(form)\n+\n+class EventListView(ListView, EventActiveQuerySetMixin):\n+    model = Event\n+\n+\n+@permission_required('events.view_event')\n+class EventDetailView(DetailView):\n+    model = Event\n+\n+\n+@permission_required('events.add_event')\n+class EventCreateView(CreateView, EventSetOrganizerMixin):\n+    model = Event\n+    form_class = EventForm\n+\n+@permission_required('events.change_event')\n+class EventUpdateView(UpdateView, EventSetOrganizerMixin):","path":"src/kawaz/apps/events/views.py","position":53,"original_position":53,"commit_id":"81c7051266f91baf47bf8f4eb299c876b81bee72","original_commit_id":"81c7051266f91baf47bf8f4eb299c876b81bee72","user":{"login":"lambdalisue","id":546312,"avatar_url":"https://avatars.githubusercontent.com/u/546312?","gravatar_id":"2be992d8a8cd8b523ca0b1467e165376","url":"https://api.github.com/users/lambdalisue","html_url":"https://github.com/lambdalisue","followers_url":"https://api.github.com/users/lambdalisue/followers","following_url":"https://api.github.com/users/lambdalisue/following{/other_user}","gists_url":"https://api.github.com/users/lambdalisue/gists{/gist_id}","starred_url":"https://api.github.com/users/lambdalisue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambdalisue/subscriptions","organizations_url":"https://api.github.com/users/lambdalisue/orgs","repos_url":"https://api.github.com/users/lambdalisue/repos","events_url":"https://api.github.com/users/lambdalisue/events{/privacy}","received_events_url":"https://api.github.com/users/lambdalisue/received_events","type":"User","site_admin":false},"body":"大問題。\r\n参加者が書き換えた場合管理者になる","created_at":"2014-04-20T02:31:46Z","updated_at":"2014-04-20T02:31:46Z","html_url":"https://github.com/kawazrepos/third-impact/pull/25#discussion_r11796623","pull_request_url":"https://api.github.com/repos/kawazrepos/third-impact/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/kawazrepos/third-impact/pulls/comments/11796623"},"html":{"href":"https://github.com/kawazrepos/third-impact/pull/25#discussion_r11796623"},"pull_request":{"href":"https://api.github.com/repos/kawazrepos/third-impact/pulls/25"}}}}