def delete_app(app_id): """Delete an example object""" app = AdNetwork.get_by_id(app_id) try: app.delete() flash(u'App %s successfully deleted.' % app_id, 'success') return redirect(url_for('apps')) except CapabilityDisabledError: flash(u'App Engine Datastore is currently in read-only mode.', 'info') return redirect(url_for('apps'))
def get_img(app_id): """k = db.Key.from_path('MediaKit', category_id)""" applist = AdNetwork.get_by_id(app_id) return app.response_class(applist.app_url,mimetype=applist.content_type,direct_passthrough=False)