blob: edf537081f0fc0baf80c5fe8f30f38ab438c34a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#Dev/KoDe :)
import csv
import datetime
import os
import sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sbhs_server.settings") # To make a Django Environment.
from sbhs_server.tables.models import Board
board_details = Board.objects.values_list("online", flat=True)
board = str([x for x in board_details])
with open('new.csv', "a") as newcsv:
newcsv.write("{0} {1} \n".format(datetime.datetime.now(), board.replace(",", "").replace("[", "").replace("]","")))
newcsv.close()
|