-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
131 lines (108 loc) · 5.12 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
WEB_URL = "http://127.0.0.1:5000"
# ROOT_DIR = "/var/www/ME/"
ROOT_DIR = "C:/Users/HP/myprojects/mechweb/"
APP_DIR = ROOT_DIR + "/flaskapp/"
DATA_DIR = ROOT_DIR + "data/"
MAIL_DIR = DATA_DIR + "/mails/"
EXCEL_DIR = DATA_DIR + '/excels/'
PDF_DIR = DATA_DIR + '/pdfs/'
DATABASE_FILE = DATA_DIR + 'site.db'
# Mail Configuration
mail_port = 587
mail_server = 'smtp-auth.iitb.ac.in'
sender_email = ''
server_email = ""
server_password = ''
attendance_mail_reciever = '[email protected]'
faculty_password_timeout = {'hours':12, 'minutes':00}
student_token_timeout = {'hours':12, 'minutes':00}
'''Send mails to student who havent marked attendance for last __ days'''
attendance_days = 7
debug = True
#----------------------------------------------------------------------------
grade_map = ['AA','AB','BB','BC','CC','CD','DD','DE','EE','EF','FF']
course_columns = ['field', 'code', 'name']
faculty_columns=['name', 'ldap', 'email', 'field', 'phone_number','status']
student_columns=['name', 'email', 'rollno', 'program', 'field', 'status','category']
pandas_course_map = {'code' : 'code', \
'field' : 'field', \
'name' : 'name'}
pandas_faculty_map = {'name': 'name',\
'ldap' : 'ldap', \
'email' : 'email',\
'field' : 'field', \
'phone_number' : 'phone_number', \
'status' : 'status'}
pandas_student_map = {'name' : 'name', \
'email' : 'email',\
'rollno' : 'rollno', \
'program' : 'program', \
'field' : 'field', \
'category' : 'category', \
'status' : 'status'}
# Semester Seasons
''' 1st Semester in each institute year'''
NEW_SEM = 'Fall'
''' Defines which semester comes after Fall / Spring / Summer'''
SEASONS = {'Fall':'Spring', 'Spring':'Summer', 'Summer':'Fall',}
# Default program for students
default_program = 'BTech'
''' Default program for students if not mentioned'''
PROGRAMS = ['BTech', 'Phd', 'MTech', 'DD']
# Field for Course Students Facultys
default_field = 'ALL'
'''Field for entries with no specific field'''
FIELDS = ['TFE','MFG','DES']
ALLFIELDS = FIELDS + ['ALL']
# Student Categories
CATEGORIES = ['rap', 'miscellaneous','external','externalgovernmentfellowship','instituteta','projectstaff',
'tap','sponsored','pmrf','foreignnational','selffinance','researchassistant']
active_ta_categories = ['rap','instituteta','pmrf','miscellaneous']
default_category = 'miscellaneous'
# Mails to Coordinators.
# Don't Change dict keys
coord_mail = {
'subject':"Assigned as Coordinator",
'body_':"Dear Prof., <br> You have been assigned as coordinator for %s field for semester %s. <br>"
'You can login using -<br> <a href="%s"> Login Link </a><br>'
}
# Mails to Faculty that contains login links.
# Don't Change dict keys
faculty_login_mail = {
'subject':"Faculty login details",
'body_':'You can login using -<br><a href="%s"> My Link </a><br><br>'
"This link will be valid for "+str(faculty_password_timeout['hours'])+" hours & "+str(faculty_password_timeout['minutes'])+" minutes.<br><br>"
"If the above link doesnt work use your ldap and alond with this password : %s to login at %s.<br><br>"
"If the link has expired you will need to generate a new link at %s<br>"
}
# Mails Send to Faculty After Course Allot.
# Don't Change dict keys
faculty_course_allot_mail = {
'subject':'TA Allotment',
'body_':"Dear Prof. %s,<br>"
"You can check the courses you have been alloted for Semester : %s at<br><br>"
'<a href="%s"> Login Link </a><br>'
"At this point, please indicate your preference for Teaching Assistants by making your choices via the above link.<br>"
}
# Mails Send to Faculty who are part of Student Grading committee
# Don't Change dict keys
grade_mail_committee = {
'subject':'Student Grade',
'body_':"Dear Prof. %s,<br>"
"Faculty Advisor %s of Student %s has graded the student."
"%s"
}
# in body_ %s (faculty name, student name, faculty name, html table showing grade data)
# Student token mail configuration
# Don't Change dict keys
student_token_mail = {
'subject' : 'Login Details',
'body_' : 'Dear %s,<br><br>Go to <a href="%s"> My Link </a> to update your details and acknowledge your employement with ME @ IITB.<br><br>The provided token is valid for %s hours & %s minutes'
}
# Mail configuration for regular student mails.
# Don't Change dict keys
student_mail = {
'subject':"Acknowldegement Notice",
'body_':"This is a reminder to acknowldege your employment with IITB.<br>"
'Go to <a href="%s"> Login Link </a> and generate link to update your profile data, check TA duties, Faculty advisor(s), and acknowldege your employment with ME @ IITB.<br><br> Please note that this is NOT an attendance. You still need to mark your bio-metric attendance regularly in the ME building.<br><br>'
}