예제 #1
0
파일: events.py 프로젝트: marghanita/slug
    def get(self, year=None, month=None, day=None):
        now = datetime.datetime.now()

        if users.is_current_user_admin():
            published_only=False
        else:
            published_only=True

        current_user = openid_users.get_current_user()

        events_lists = event_lists.get_event_lists(
                published_only=published_only, user=current_user)

        next_event = event_lists.get_next_event()

        self.response.headers['Content-Type'] = 'text/html'
        self.response.out.write(r(
            self.template, locals()))
예제 #2
0
파일: events.py 프로젝트: jamezpolley/slug
    def get(self, year=None, month=None, day=None):
        # We are using locals which confuses pylint.
        # pylint: disable-msg=W0613,W0612
        now = datetime.datetime.now()

        if users.is_current_user_admin():
            published_only = False
        else:
            published_only = True

        current_user = users.get_current_user()

        events_lists = event_lists.get_event_lists(
                published_only=published_only, user=current_user)

        next_event = event_lists.get_next_event()

        self.response.headers['Content-Type'] = 'text/html'
        self.response.out.write(r(
            self.template, locals()))
예제 #3
0
파일: events.py 프로젝트: marghanita/slug
 def get(self):
     self.redirect(event_lists.get_next_event().get_url())