-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
232 changed files
with
21,404 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<html> | ||
<body> | ||
<form action="/Search/" method="post"> | ||
{% csrf_token %} | ||
<input type="hidden" name="ControlsInfo" value="{{ControlsInfo}}"/> | ||
<select name="Search_Options"> | ||
{{options|safe}} | ||
</select> | ||
<input type="submit" name="Add" value="Add"/> | ||
<br/> | ||
{{Search_Controls|safe}} | ||
<input type="submit" name="Search" value="Search"/> | ||
<input type="submit" name="Excel" value="Save To Excel"/> | ||
</form> | ||
{% if StudentList|length %} | ||
<table border="1"> | ||
{% for rows in StudentList %} | ||
<tr> | ||
<td>{%if forloop.counter != 1%}{{forloop.counter|add:"-1"}}{%endif%}</td> | ||
{% for col in rows %} | ||
<td> | ||
{{ col }} | ||
</td> | ||
{% endfor %} | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
{% else %} | ||
<h1> | ||
No Data was found | ||
</h1> | ||
{% endif %} | ||
</body> | ||
</html> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from django.db import models | ||
from django.contrib.contenttypes.models import ContentType | ||
from tx2.UserReg.models import RegisterUser | ||
from tx2.Users.models import User | ||
from tx2.Security.models import SecurityStates,SecurityPermissions | ||
|
||
# Create your models here. | ||
|
||
class AppEventType(models.Model): | ||
EventTypeName = models.CharField(max_length=100) | ||
EventTypeDesc = models.CharField(max_length=500) | ||
|
||
class AppEvent(models.Model): | ||
EventType = models.ForeignKey(AppEventType) | ||
EventName = models.CharField(max_length=100) | ||
EventDesc = models.TextField() | ||
EventStart = models.DateTimeField() | ||
EventDuration = models.IntegerField() | ||
EventRounds = models.IntegerField() | ||
EventRef = models.IntegerField() | ||
EventFolders = models.CharField(max_length=500) | ||
EventState = models.ForeignKey(SecurityStates) | ||
|
||
class AppEventRound(models.Model): | ||
RoundName = models.CharField(max_length=100) | ||
RoundDesc = models.TextField() | ||
RoundStart = models.DateTimeField() | ||
RoundDuration = models.IntegerField() | ||
Event = models.ForeignKey(AppEvent) | ||
RoundRegUsers = models.ForeignKey(RegisterUser) | ||
EventRoundState = models.ForeignKey(SecurityStates) | ||
|
||
class AppEventLogs(models.Model): | ||
# user making changes | ||
LogsUser = models.ForeignKey(User) | ||
ContentType = models.ForeignKey(ContentType) | ||
# row id being changed | ||
LogsObject = models.IntegerField() | ||
LogsPermission = models.ForeignKey(SecurityPermissions) | ||
LogsIP = models.CharField(max_length=20) | ||
LogsTimeStamp = models.DateTimeField() | ||
LogsDescription = models.CharField(max_length=200) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
This file demonstrates writing tests using the unittest module. These will pass | ||
when you run "manage.py test". | ||
Replace this with more appropriate tests for your application. | ||
""" | ||
|
||
from django.test import TestCase | ||
|
||
|
||
class SimpleTest(TestCase): | ||
def test_basic_addition(self): | ||
""" | ||
Tests that 1 + 1 always equals 2. | ||
""" | ||
self.assertEqual(1 + 1, 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Create your views here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
LoggerSecurity = 'LOGGER_Security' | ||
LoggerQuery = 'LOGGER_Query' | ||
LoggerUser = 'LOGGER_User' | ||
|
||
CACHE_LOGGED_IN_USERS_DICT = 'CACHE_LOGGED_IN_USERS_DICT' | ||
|
||
|
||
SECONDAR_GROUP = { | ||
'VALIDATION_EMAIL':'Group_Comm_EmailValidation', | ||
} | ||
|
||
GROUP_MENU_PREFIX = 'group_menu_' | ||
TEMPLATE_PARAM_USER_NOT_LOGGED_IN = 'NotDefined' | ||
LOGGER_USER = 'LOGGER_UserSystem' | ||
LOGGER_MISC = 'LOGGER_MiscSystem' | ||
LOGGER_MENU = '' | ||
LOGGER_QUERY = 'LOGGER_QueryLogger' | ||
LOGGER_UserReg = 'LOGGER_UserReg' | ||
LOGGER_COMMUNICATION = 'LOGGER_Communication' | ||
LoggerAdress = 'LOGGER_Adress' | ||
LoggerJob = 'LOGGER_Job' | ||
AlumniLogger = 'AlumniLogger' | ||
LOGGER_USER_PROFILE = 'LOGGER_UserProfile' | ||
LOGGER_ADRESS = 'LOGGER_Adress' | ||
|
||
SESSION_MESSAGE = 'UserMessages' | ||
SESSION_USER_EXPIRY_TIME = 5*60*1000 | ||
CACHE_TIME_FOR_GROUP_MENU = 24*60*60 | ||
CACHE_TIME_FOR_SECURITY = 30*24*60*60 | ||
CACHE_CONTENTTYPES = 'ThoughtXploreContentTypes' | ||
|
||
Login_From_Type = 1 | ||
LogOut_From_Type = 10 |
56 changes: 56 additions & 0 deletions
56
tx2.backup.sept22/Communication/BusinessFunctions/AttachmentFunctions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
from tx2.Communication.DBFunctions.DBFunctions import DBInsertAttachment, DBUpdateAttachment | ||
from tx2.CONFIG import LOGGER_COMMUNICATION | ||
import logging | ||
|
||
|
||
class AttachmentFnx(): | ||
def __init__(self): | ||
self.CommunicationLogger = logging.getLogger(LOGGER_COMMUNICATION) | ||
|
||
|
||
def InsertAttachment(self,ContentType,Record, AttachmentType, AttachmentDesc, AttachmentName, AttachmentRef,by,ip,RequestedOperation): | ||
try: | ||
details= { | ||
'ContentType': ContentType, | ||
'Record': Record, | ||
'AttachmentType':AttachmentType, | ||
'AttachmentName':AttachmentName, | ||
'AttachmentDesc':AttachmentDesc, | ||
'AttachmentRef':AttachmentRef, | ||
'op':RequestedOperation, | ||
'by':by, | ||
'ip':ip | ||
|
||
} | ||
res= DBInsertAttachment(details) | ||
return res | ||
except: | ||
error_msg = 'Error @ InsertAttachment in Business Functions' | ||
self.CommunicationLogger.exception('[%s] == Exception =='%('InsertAttachment')) | ||
return (-5,error_msg) | ||
|
||
def UpdateAttachment(self,Content,Record, AttachmentType, AttachmentDesc, AttachmentName, AttachmentRef,by,ip,RequestedOperation,LogsDesc): | ||
try: | ||
details= { | ||
'Content': Content, | ||
'Record': Record, | ||
'AttachmentType':AttachmentType, | ||
'AttachmentName':AttachmentName, | ||
'AttachmentDesc':AttachmentDesc, | ||
'AttachmentRef':AttachmentRef, | ||
'op':RequestedOperation, | ||
'by':by, | ||
'ip':ip, | ||
'LogsDesc':LogsDesc | ||
|
||
} | ||
res= DBUpdateAttachment(details) | ||
return res | ||
except: | ||
error_msg = 'Error @ UpdateAttachment in Business Functions' | ||
self.CommunicationLogger.exception('[%s] == Exception =='%('UpdateAttachment')) | ||
return (-5,error_msg) | ||
|
||
|
||
|
||
|
Oops, something went wrong.