Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
5c61a54
GAD-5: Fix responsiveness (#1125)
Lawful2002 Feb 23, 2023
9a4fc4d
Merge branch 'main' into gad-5
akshatnema Mar 15, 2023
b295d7f
Merge branch 'main' into gad-5
akshatnema Mar 15, 2023
72e34e7
Merge branch 'main' into gad-5
akshatnema Mar 18, 2023
721ee82
Merge branch 'main' into gad-5
akshatnema Mar 19, 2023
91ef4e9
Merge branch 'main' into gad-5
akshatnema Mar 23, 2023
da49572
Merge branch 'main' into gad-5
akshatnema Mar 26, 2023
83e2e73
updated models
Feb 18, 2024
b8644f9
Revert "updated models"
Feb 18, 2024
c39e300
revert to old
Feb 18, 2024
d40f61b
some changes in frontend
Feb 18, 2024
15b27a8
some updates in frontend files
Feb 18, 2024
e2733d3
added the api for mobiles and updated urls and views of web
Feb 18, 2024
62607fd
some updates in backend
Feb 18, 2024
a50d9db
Merge pull request #2 from Harshit0009/sa-2
Harshul-25 Feb 18, 2024
bc2b569
Merge pull request #3 from hn2006/sa-2
Harshul-25 Feb 18, 2024
e17f7db
Added frontend for new apis
hemantsinghhere Feb 18, 2024
07140f4
Merge pull request #4 from hemantsinghhere/sa-2
Harshul-25 Feb 18, 2024
d38666d
updated admin and ui
Harshul-25 Feb 18, 2024
01a58b0
resolved errors
Feb 18, 2024
2a52b64
Merge pull request #5 from Harshit0009/sa-2
Harshul-25 Feb 18, 2024
89c29e0
Menu UI changes
HritikYadav7 Feb 18, 2024
847d44b
Merge pull request #1 from HritikYadav7/sa-2
Harshul-25 Feb 18, 2024
9ef971b
Updated Menu_card
HritikYadav7 Feb 19, 2024
5d56ed1
Merge pull request #6 from HritikYadav7/sa-2
Harshul-25 Feb 19, 2024
b509d5e
some fixes
Harshul-25 Feb 24, 2024
4821c26
migrations fixed
Harshul-25 Mar 6, 2024
9b2d38d
added mess registration request model
Mar 7, 2024
772b081
Merge pull request #8 from hn2006/sa-2
Harshul-25 Mar 7, 2024
5d119eb
minor changes
Harshul-25 Mar 7, 2024
55f932e
Merge branch 'sa-2' of github.com:Harshul-25/Fusion into sa-2
Harshul-25 Mar 7, 2024
d8ab9f0
added model and view for registeration
Harshul-25 Mar 7, 2024
6f11e20
url fixed
Harshul-25 Mar 7, 2024
c06cae5
fixed rebate
Harshit0009 Mar 7, 2024
eec02db
added new form for registration request
Mar 7, 2024
d4081f2
fixed gitignore
Mar 7, 2024
1d3b0be
Merge pull request #9 from hn2006/sa-2
Harshul-25 Mar 7, 2024
2e75447
context
Harshul-25 Mar 7, 2024
cab18a5
Registration UI Changes
HritikYadav7 Mar 7, 2024
26a4706
registration UI changes
HritikYadav7 Mar 7, 2024
2487286
Merge pull request #10 from HritikYadav7/sa-2
Harshul-25 Mar 7, 2024
4f58a43
restored migration file
Harshul-25 Mar 7, 2024
88c7791
completed registration
Harshul-25 Mar 7, 2024
631dfd0
made some ui changes
Mar 8, 2024
3ffc64b
Merge pull request #12 from hn2006/sa-2
Harshul-25 Mar 8, 2024
6a162c4
migration fix
Harshul-25 Mar 8, 2024
2cf06d6
Merge branch 'Harshul-25:sa-2' into sa-2
Harshit0009 Mar 8, 2024
6b83377
done things about payments
Harshit0009 Mar 8, 2024
19aaea4
changed some views
Harshit0009 Mar 8, 2024
cf8e7f7
Added Registration Remark and Dropdown
HritikYadav7 Mar 8, 2024
e0fc0a3
Changed id in reg
HritikYadav7 Mar 8, 2024
94c2395
rectified error with rebate response frontend
Harshit0009 Mar 8, 2024
f9a840d
Merge pull request #16 from Harshit0009/sa-2
Harshul-25 Mar 8, 2024
efb2daf
Merge pull request #17 from HritikYadav7/sa-2
Harshul-25 Mar 8, 2024
ee96c83
fixed datetime in reg
Harshul-25 Mar 8, 2024
df17932
worked on manage reg
Harshul-25 Mar 8, 2024
0f3713f
deregistration request functionality added
Mar 8, 2024
11b3633
rectified the backend issues for generate bills
Harshit0009 Mar 8, 2024
f03ad1f
added registration list
Harshul-25 Mar 8, 2024
8fadd6c
Merge branch 'sa-2' into sa-2
Harshul-25 Mar 9, 2024
d43f960
Merge pull request #18 from hn2006/sa-2
Harshul-25 Mar 9, 2024
659c743
Merge pull request #19 from Harshit0009/sa-2
Harshul-25 Mar 9, 2024
97d0519
completed dereg
Harshul-25 Mar 10, 2024
8999e6f
student bill functionality addded
Harshit0009 Mar 10, 2024
da39441
rectified error of previous commit
Harshit0009 Mar 10, 2024
ce8cd17
added view reg records
Harshul-25 Mar 11, 2024
f8eba3d
added filter in view mess students
Mar 11, 2024
13f7a68
Merge pull request #21 from hn2006/sa-2
Harshul-25 Mar 10, 2024
250b144
Merge branch 'Harshul-25:sa-2' into sa-2
Harshit0009 Mar 11, 2024
01cf899
worked on bills caretaker side
Harshit0009 Mar 11, 2024
729e035
changed development
Harshit0009 Mar 11, 2024
db099d3
Updated special food request
hemantsinghhere Mar 11, 2024
ac4443b
Merge branch 'Harshul-25:sa-2' into sa-2
hemantsinghhere Mar 11, 2024
47af12c
GAD -5 Dashboard Changes (#1325)
BlackHAWK2001 Mar 11, 2024
dd7df22
Updated Special food Functionality
hemantsinghhere Mar 11, 2024
ed642ee
dashboard and usercard updated (#1329)
Arpittak Mar 12, 2024
9f2d1ed
Merge pull request #22 from hemantsinghhere/sa-2
Harshul-25 Mar 12, 2024
1154fa4
minor ui fixes
Harshul-25 Mar 12, 2024
85e9263
Merge branch 'Harshul-25:sa-2' into sa-2
Harshit0009 Mar 12, 2024
5730d6c
added search
Harshul-25 Mar 12, 2024
49623e9
Merge pull request #23 from Harshit0009/sa-2
Harshul-25 Mar 13, 2024
f4adbb6
updated manage registration
Harshul-25 Mar 13, 2024
7a051a1
added view bills and payments of students for mess caretaker
Mar 13, 2024
33d7454
Merge branch 'sa-2' into sa-2
Harshul-25 Mar 13, 2024
051d6a4
Merge pull request #25 from hn2006/sa-2
Harshul-25 Mar 13, 2024
10c9e02
added notification functionality in right rail
hemantsinghhere Mar 13, 2024
5d39633
Merge branch 'sa-2' into sa-2
Harshul-25 Mar 13, 2024
6d93893
Merge pull request #27 from hemantsinghhere/sa-2
Harshul-25 Mar 13, 2024
31dc505
Added Sem start and end date form (#26)
HritikYadav7 Mar 14, 2024
7a3c044
Merge pull request #30 from hn2006/sa-2
Harshul-25 Mar 15, 2024
64c7df2
added start date to registration form
Mar 15, 2024
eccad0d
made some ui changes
Mar 15, 2024
070e935
added modal for details of a student
harshuln123 Mar 15, 2024
1b6a455
Merge pull request #31 from hn2006/sa-2
Harshul-25 Mar 16, 2024
947d1bf
made some ui improvements
harshuln123 Mar 16, 2024
95d10ee
Merge pull request #33 from hn2006/sa-2
Harshul-25 Mar 16, 2024
5df7465
tested crontab
Harshul-25 Mar 14, 2024
7207f06
added excel upload for bill and reg
Harshul-25 Mar 16, 2024
ecba8fe
added add student to mess
Harshul-25 Mar 16, 2024
796be4a
fixes
Harshul-25 Mar 16, 2024
93beff0
update bill added and dates added (#32)
Harshit0009 Mar 16, 2024
8d00a94
Some UI changes (#35)
HritikYadav7 Mar 16, 2024
91b8291
merge fixes
Harshul-25 Mar 16, 2024
225a7b0
added remove
Harshul-25 Mar 16, 2024
f23742d
some ui fixes
Harshul-25 Mar 16, 2024
66c8297
fixed cronjobs
Harshul-25 Mar 16, 2024
506d77b
semdate fixes
Harshul-25 Mar 17, 2024
bb45836
removed migrations
Harshul-25 Mar 17, 2024
d40e94d
Fixing ui bugs (#1335)
SukulSarve Mar 17, 2024
2d847c7
Merge branch 'gad-5' into sa-2
Harshul-25 Mar 18, 2024
f113bf9
automation of bills
Harshit0009 Mar 13, 2024
6ed189e
useless commit for pulling
Harshit0009 Mar 13, 2024
b7bcd39
completed automation of mess bill generation and payment history feat…
Harshit0009 Mar 31, 2024
4ef5c88
resolved a merge error
Harshit0009 Mar 31, 2024
639954f
Merge pull request #29 from Harshit0009/sa-2
Harshul-25 Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ node_modules/

FusionIIIT/static/
package-lock.json

migrations/
5 changes: 5 additions & 0 deletions FusionIIIT/Fusion/context_processors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def global_vars(request):
return {
'global_var': request.session.get('currentDesignationSelected', 'default_value'),
'global_var2': request.session.get('allDesignations', 'default_value2'),
}
48 changes: 48 additions & 0 deletions FusionIIIT/Fusion/middleware/custom_middleware.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# custom_middleware.py
from django.contrib.auth.signals import user_logged_in
from django.dispatch import receiver
from applications.globals.models import (ExtraInfo, Feedback, HoldsDesignation,
Issue, IssueImage, DepartmentInfo)
from django.shortcuts import get_object_or_404, redirect, render

def user_logged_in_middleware(get_response):
@receiver(user_logged_in)
def user_logged_in_handler(sender, user, request, **kwargs):
if 'function_executed' not in request.session:
# Run the function only if the flag is not set
# Assuming user is a model with the desired data field, retrieve the data
# For example, if your User model has a field named 'custom_field', you can access it like:
if user.is_authenticated:
desig = list(HoldsDesignation.objects.select_related('user','working','designation').all().filter(working = request.user).values_list('designation'))
print(desig)
b = [i for sub in desig for i in sub]
design = HoldsDesignation.objects.select_related('user','designation').filter(working=request.user)

designation=[]

designation.append(str(user.extrainfo.user_type))
for i in design:
if str(i.designation) != str(user.extrainfo.user_type):
print('-------')
print(i.designation)
print(user.extrainfo.user_type)
print('')
designation.append(str(i.designation))

for i in designation:
print(i)

request.session['currentDesignationSelected'] = designation[0]
request.session['allDesignations'] = designation
print("logged iN")

# Set the flag in the session to indicate that the function has bee+n executed
request.session['function_executed'] = True

def middleware(request):
if request.user.is_authenticated:
user_logged_in_handler(request.user, request.user, request)
response = get_response(request)
return response

return middleware
5 changes: 4 additions & 1 deletion FusionIIIT/Fusion/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
'django.contrib.staticfiles',
'django.contrib.sites',
'django.contrib.humanize',

'django_crontab',
'corsheaders',

'applications.eis',
Expand Down Expand Up @@ -163,6 +163,7 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'Fusion.middleware.custom_middleware.user_logged_in_middleware',
]

ROOT_URLCONF = 'Fusion.urls'
Expand All @@ -178,6 +179,7 @@
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'Fusion.context_processors.global_vars',
],
},
},
Expand Down Expand Up @@ -277,5 +279,6 @@
YOUTUBE_DATA_API_KEY = 'api_key'



CORS_ORIGIN_ALLOW_ALL = True
ALLOW_PASS_RESET = True
16 changes: 15 additions & 1 deletion FusionIIIT/Fusion/settings/development.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from Fusion.settings.common import *

DEBUG = True

TEMPLATE_DEBUG = True
SECRET_KEY = '=&w9due426k@l^ju1=s1)fj1rnpf0ok8xvjwx+62_nc-f12-8('

ALLOWED_HOSTS = ['*']
Expand All @@ -19,6 +19,7 @@
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
),
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
Expand Down Expand Up @@ -53,3 +54,16 @@
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
}

CRONJOBS = [
# the below job will update the bill at every minute can be used for testing
# ('* * * * *', 'applications.central_mess.tasks.generate_bill'),

#the below job which we need to add in production server, to update the mess bill of student everyday at 10 pm in night
('0 22 * * *', 'applications.central_mess.tasks.generate_bill'),
]

CRONTAB_DJANGO_MANAGE_PATH = '/home/owlman/Desktop/Fuse/Fusion/FusionIIIT/manage.py'

MEDIA_URL = "/media/"
MEDIA_ROOT=os.path.join(BASE_DIR,"media/")

This file was deleted.

Empty file.
Loading