示例#1
0
 def get(self, course_id):
     course = Course.get_by_id(int(course_id))
     applications = CourseApplication.query(
         CourseApplication.course_id == int(course_id),
         CourseApplication.deleted == False).fetch()
     params = {"course": course, "applications": applications}
     self.render_template("admin/course_details.html", params)
示例#2
0
文件: auth.py 项目: Janja1/smartninja
    def update(cls, user, first_name, last_name, address, phone_number):
        if user.first_name != first_name or user.last_name != last_name:
            user.first_name = first_name
            user.last_name = last_name
            applications = CourseApplication.query(CourseApplication.student_id == user.get_id).fetch()

            for application in applications:
                application.student_name = "%s %s" % (first_name, last_name)
                application.put()

        user.address = address
        user.phone_number = phone_number
        user.put()
        return user
示例#3
0
    def update(cls, user, first_name, last_name, address, phone_number):
        if user.first_name != first_name or user.last_name != last_name:
            user.first_name = first_name
            user.last_name = last_name
            applications = CourseApplication.query(
                CourseApplication.student_id == user.get_id).fetch()

            for application in applications:
                application.student_name = "%s %s" % (first_name, last_name)
                application.put()

        user.address = address
        user.phone_number = phone_number
        user.put()
        return user
示例#4
0
 def get(self, course_id):
     course = Course.get_by_id(int(course_id))
     applications = CourseApplication.query(CourseApplication.course_id == int(course_id), CourseApplication.deleted == False).fetch()
     params = {"course": course, "applications": applications}
     self.render_template("admin/course_details.html", params)