Skip to content

Commit

Permalink
Merge pull request #1543 from prabhatsuman/ac-4
Browse files Browse the repository at this point in the history
Ac-4 (forked) to AC-4 (fusion)
  • Loading branch information
prabhatsuman authored Apr 23, 2024
2 parents 1039d8b + f8cb495 commit 545a935
Show file tree
Hide file tree
Showing 745 changed files with 68,019 additions and 13,675 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ node_modules/

FusionIIIT/static/
package-lock.json


.DS_Store

6 changes: 4 additions & 2 deletions FusionIIIT/Fusion/middleware/custom_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ def user_logged_in_handler(sender, user, request, **kwargs):
design = HoldsDesignation.objects.select_related('user','designation').filter(working=request.user)

designation=[]

designation.append(str(user.extrainfo.user_type))
if str(user.extrainfo.user_type) == "student":
designation.append(str(user.extrainfo.user_type))


for i in design:
if str(i.designation) != str(user.extrainfo.user_type):
print('-------')
Expand Down
10 changes: 6 additions & 4 deletions FusionIIIT/Fusion/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,14 @@
'django.contrib.staticfiles',
'django.contrib.sites',
'django.contrib.humanize',

'django_crontab',
'corsheaders',

'applications.eis',
'notification',
'notifications',
'applications.academic_procedures',
'applications.examination',
'applications.academic_information',
'applications.leave',
'applications.library',
Expand Down Expand Up @@ -172,7 +173,7 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, '..', 'templates/'),],
'DIRS': [os.path.join(BASE_DIR, '..', 'templates'),],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -257,9 +258,9 @@

# os.path.join(BASE_DIR, 'static/')
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, '..', 'static/')
STATIC_ROOT = os.path.join(BASE_DIR, '..', 'static')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
MEDIA_ROOT = os.path.join(BASE_DIR, '..', 'media/')
MEDIA_ROOT = os.path.join(BASE_DIR, '..', 'media')
MEDIA_URL = '/media/'

ACCOUNT_USERNAME_REQUIRED = False
Expand All @@ -280,5 +281,6 @@
YOUTUBE_DATA_API_KEY = 'api_key'



CORS_ORIGIN_ALLOW_ALL = True
ALLOW_PASS_RESET = True
12 changes: 11 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 @@ -16,9 +16,11 @@
}
}


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 +55,11 @@
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'),
]
1 change: 1 addition & 0 deletions FusionIIIT/Fusion/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
url(r'^income-expenditure/', include('applications.income_expenditure.urls')),
url(r'^hr2/', include('applications.hr2.urls')),
url(r'^recruitment/', include('applications.recruitment.urls')),
url(r'^examination/', include('applications.examination.urls')),
url(r'^otheracademic/', include('applications.otheracademic.urls')),

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
1 change: 0 additions & 1 deletion FusionIIIT/applications/academic_information/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ class Curriculum_InstructorAdmin(admin.ModelAdmin):
admin.site.register(Holiday)
admin.site.register(Curriculum,CurriculumAdmin)

#Hello!
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Meta:

class CurriculumSerializer(serializers.ModelSerializer):
course_id = CourseSerializer()

class Meta:
model = Curriculum
fields = ('curriculum_id','course_code','course_id','credits','course_type',
Expand Down
2 changes: 1 addition & 1 deletion FusionIIIT/applications/academic_information/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
# url(r'^grades',views.grades_api,name='grades-get-api'),

# url(r'^spi',views.spi_api,name='spi-get-api')
]
]
Loading

0 comments on commit 545a935

Please sign in to comment.