def get(self, id_modulo): campanyas = Campanyas.all().filter('modulo', int(id_modulo)) module = Modules.get(db.Key.from_path('Modules', int(id_modulo))) self.render_template( 'campanya.html', { "campanyas": campanyas, "module": module, "user": users.get_current_user(), "admin": users.is_current_user_admin() })
def get(self, module_id, campain_id): comments = Comments.all().filter('module = ', module_id).filter( 'campanya = ', campain_id).order('-createDate') modulo = Modules.get(db.Key.from_path('Modules', int(module_id))) self.render_template( "foro.html", { "module": module_id, "moduleName": modulo.name, "campain": campain_id, "comments": comments, "user": users.get_current_user().nickname() if users.get_current_user() != None else None, "user_id": users.get_current_user().user_id() if users.get_current_user() != None else None, "admin": users.is_current_user_admin() })