def exportdox_csv(export_id):
# Create a time object to append to file
time = strftime("%Y-%m-%d-%H:%M:%S", gmtime())
_csv = open('{}.csv'.format(time), 'wb')
# Create CSV writer to newly created file.
outcsv = csv.writer(_csv)
# Get all records, and write to CSV.
records = db.session.query(Doxkit).all()
[outcsv.writerow([getattr(curr, column.name) for column in Doxkit.__mapper__.columns]) for curr in records]
_csv.close()
# Notify user
flash("Exported Dox! Stored in your D0xk1t path.", "success")
return redirect(url_for('dox'))
# GeoIP Module
评论列表
文章目录