You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
717 B
21 lines
717 B
import os, sys, django, csv
|
|
|
|
sys.path.append("../")
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.settings")
|
|
django.setup()
|
|
|
|
from journals.models import Thread, Journal
|
|
|
|
if __name__ == '__main__':
|
|
csv.field_size_limit(500 * 1024 * 1024)
|
|
thread = Thread.objects.get(key='Student_teacher')
|
|
with open('./management/comment.csv') as comment_csv:
|
|
comment_reader = csv.DictReader(comment_csv)
|
|
for row in comment_reader:
|
|
if row['type'] == 'task':
|
|
if row['status'] == "Одобрено":
|
|
print(row)
|
|
elif row['status'] == "Отклонено":
|
|
print(row)
|
|
else:
|
|
print(row) |