resolved merge conflicts

This commit is contained in:
CDC 2024-08-06 15:16:09 +05:30
parent 60ed13588c
commit bd4fbdc49a
11 changed files with 7 additions and 8 deletions

1
.gitignore vendored
View File

@ -130,6 +130,7 @@ dmypy.json
/venv/ /venv/
./CDC_Backend/static ./CDC_Backend/static
CDC_Backend/static_url*
./CDC_Backend/Storage ./CDC_Backend/Storage
/CDC_Backend/CDC_Backend/__pycache__/ /CDC_Backend/CDC_Backend/__pycache__/
/CDC_Backend/APIs/__pycache__/ /CDC_Backend/APIs/__pycache__/

View File

@ -784,7 +784,6 @@ def getStats(request, id, email, user_type):
status=status.HTTP_200_OK) status=status.HTTP_200_OK)
except: except:
logger.warning("Get Stats: " + str(sys.exc_info())) logger.warning("Get Stats: " + str(sys.exc_info()))
print(sys.exc_info())
return Response({'action': "Get Stats", 'message': "Something Went Wrong"}, return Response({'action': "Get Stats", 'message': "Something Went Wrong"},
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)

View File

@ -47,7 +47,6 @@ def addPlacement(request):
opening.eligiblestudents = json.loads(data[ELIGIBLESTUDENTS]) opening.eligiblestudents = json.loads(data[ELIGIBLESTUDENTS])
else: else:
raise ValueError('Allowed Branch must be a subset of ' + str(ELIGIBLE)) raise ValueError('Allowed Branch must be a subset of ' + str(ELIGIBLE))
print(opening.eligiblestudents)
if data[PWD_ELIGIBLE] == 'Yes': if data[PWD_ELIGIBLE] == 'Yes':
opening.pwd_eligible = True opening.pwd_eligible = True
else: else:

View File

@ -50,6 +50,7 @@ def refresh(request):
@isAuthorized(allowed_users=[STUDENT]) @isAuthorized(allowed_users=[STUDENT])
def studentProfile(request, id, email, user_type): def studentProfile(request, id, email, user_type):
try: try:
studentDetails = get_object_or_404(Student, id=id) studentDetails = get_object_or_404(Student, id=id)
data = StudentSerializer(studentDetails).data data = StudentSerializer(studentDetails).data

View File

@ -450,7 +450,6 @@ def internship_eligibility_filters(student, internships):
@background_task.background(schedule=2) @background_task.background(schedule=2)
def send_opening_notifications(opening_id, opening_type=PLACEMENT): def send_opening_notifications(opening_id, opening_type=PLACEMENT):
try: try:
# print(opening_id, opening_type)
if opening_type == PLACEMENT: if opening_type == PLACEMENT:
opening = get_object_or_404(Placement, id=opening_id) opening = get_object_or_404(Placement, id=opening_id)
else: else:

View File

@ -30,7 +30,7 @@ DEBUG = os.environ.get('DEBUG') == "True"
ALLOWED_HOSTS = ['cdc.iitdh.ac.in', 'localhost'] ALLOWED_HOSTS = ['cdc.iitdh.ac.in', 'localhost']
ADMINS = [ ('Jaya Surya', '210020040@iitdh.ac.in')] ADMINS = [ ('Jaya Surya', '210020051@iitdh.ac.in')]
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
@ -143,10 +143,10 @@ DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/ # https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = '/static_url/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATIC_ROOT = os.path.join(BASE_DIR, 'static_url')
STATICFILES_DIR = ( STATICFILES_DIR = (
os.path.join(BASE_DIR, 'static'), os.path.join(BASE_DIR, 'static_url'),
) )
CORS_ORIGIN_ALLOW_ALL = False CORS_ORIGIN_ALLOW_ALL = False

0
CDC_Backend/run_prod.sh Normal file → Executable file
View File

0
nginx.conf Executable file → Normal file
View File

0
setup.sh Executable file → Normal file
View File

0
start_backend_service.sh Normal file → Executable file
View File

2
start_email_service.sh Executable file → Normal file
View File

@ -4,4 +4,4 @@ source /home/cdc/Desktop/CDC_Web_Portal_Backend/cdc-placement-website-backend/ve
cd /home/cdc/Desktop/CDC_Web_Portal_Backend/cdc-placement-website-backend/CDC_Backend cd /home/cdc/Desktop/CDC_Web_Portal_Backend/cdc-placement-website-backend/CDC_Backend
python manage.py process_tasks python3 manage.py process_tasks