コード例 #1
0
ファイル: main.py プロジェクト: Sindalf/SocEventCalendar
    def get(self):
        id = self.request.get("id")
        delete = 0
        is_admin = 0
        event = models.get_event_info(id)
        email = get_user_email()
        # logging.warning(event)
        comments = event.get_comments()

        if event.user == email:
            delete = 1

        if users.is_current_user_admin():
            delete = 1
            is_admin = 1

        page_params = {
            'user_email': email,
            'login_url': users.create_login_url(),
            'logout_url': users.create_logout_url('/'),
            "event": event,
            "comments": comments,
            "delete": delete,
            "is_admin": is_admin,
            'user_id': get_user_id(),
        }

        render_template(self, 'event.html', page_params)
コード例 #2
0
	def get(self):
		id = self.request.get("id")
		delete = 0
		is_admin = 0
		event = models.get_event_info(id)
		email = get_user_email()
		#logging.warning(event)
		comments = event.get_comments()

		if event.user == email:
			delete = 1

		if users.is_current_user_admin():
			delete = 1
			is_admin = 1

		page_params = {
		  'user_email': email,
		  'login_url': users.create_login_url(),
		  'logout_url': users.create_logout_url('/'),
		  "event": event,
		  "comments": comments,
		  "delete": delete,
		  "is_admin": is_admin,
		  'user_id': get_user_id(),
		}

		render_template(self, 'event.html', page_params)
コード例 #3
0
ファイル: main.py プロジェクト: Sindalf/SocEventCalendar
    def get(self):
        id = self.request.get("id")

        page_params = {
            "user_email": get_user_email(),
            'login_url': users.create_login_url(),
            'logout_url': users.create_logout_url('/'),
            'event': models.get_event_info(id),
            'user_id': get_user_id(),
        }
        render_template(self, 'editEventPage.html', page_params)
コード例 #4
0
	def get(self):
		id = self.request.get("id")

		page_params = {
		"user_email": get_user_email(),
		'login_url': users.create_login_url(),
		'logout_url': users.create_logout_url('/'),
		'event': models.get_event_info(id),
		'user_id': get_user_id(),
		}
		render_template(self, 'editEventPage.html', page_params)
コード例 #5
0
ファイル: main.py プロジェクト: TKosmacki/socialCalNoCal
	def post(self):
		id = self.request.get("id")
		event = models.get_event_info(id)
		email = get_user_email()
		if not email:
			email = "Anonymous"

		text = self.request.get("comment")
		event.create_comment(email,text)
		self.redirect("/event?id=" + id)

		if event.user != "Anonymous":

			mail.send_mail(sender="*****@*****.**", to=event.user, subject="Someone commented on your post!", body="Someone commented on your post! Click here to see it: socialcalender1520.appspot.com/event?id=" + id)
コード例 #6
0
	def post(self):
		id = self.request.get("id")
		event = models.get_event_info(id)
		email = get_user_email()
		if not email:
			email = "Anonymous"

		text = self.request.get("comment")
		event.create_comment(email,text)
		self.redirect("/event?id=" + id)

		if event.user != "Anonymous":

			mail.send_mail(sender="*****@*****.**", to=event.user, subject="Someone commented on your post!", body="Someone commented on your post! Click here to see it: socialcalender1520.appspot.com/event?id=" + id)