Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placement cell #1304

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
82 changes: 82 additions & 0 deletions FusionIIIT/applications/placement_cell/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ def clean_company_name(self):

return company_name


def current_year():
return date.today().year

Expand Down Expand Up @@ -545,6 +546,87 @@ class SearchPbiRecord(forms.Form):
label="cname", required=False)



class SendInvitation(forms.Form):
"""
The form is used to send invite to students about upcoming placement or pbi events.
@variables:
company - name of company
"""
company = forms.ModelChoiceField(required=True, queryset=NotifyStudent.objects.all(), label="company")
rollno = forms.IntegerField(label="rollno", widget=forms.NumberInput(attrs={'min': 0}), required=False)
programme = forms.ChoiceField(choices = Con.PROGRAMME, required=False,
label="programme", widget=forms.Select(attrs={'style': "height:45px",
'onchange': "changeDeptForSend()",
'id': "id_programme_send"}))

dep_btech = forms.MultipleChoiceField(choices = Constants.BTECH_DEP, required=False, label="department",
widget=forms.CheckboxSelectMultiple)
dep_bdes = forms.MultipleChoiceField(choices = Constants.BDES_DEP, required=False, label="department",
widget=forms.CheckboxSelectMultiple)
dep_mtech = forms.MultipleChoiceField(choices = Constants.MTECH_DEP, required=False, label="department",
widget=forms.CheckboxSelectMultiple)
dep_mdes = forms.MultipleChoiceField(choices = Constants.MDES_DEP, required=False, label="department",
widget=forms.CheckboxSelectMultiple)
dep_phd = forms.MultipleChoiceField(choices = Constants.PHD_DEP, required=False, label="department",
widget=forms.CheckboxSelectMultiple)
cpi = forms.DecimalField(label="cpi", required=False)
no_of_days = forms.CharField(required=True, widget=forms.NumberInput(attrs={ 'min':0,
'max':30,
'max_length': 10,
'class': 'form-control'}))


class AddPlacementSchedule(forms.Form):
"""
The form is used to placement or pbi schedule.
@variables:
time - time of placement activity
ctc - salary
company_name - name of company
placement_type - placement type (placement/pbi)
location - location of company
description - description of company
placement_date - date of placement activity
"""
time = forms.TimeField(label='time', widget=forms.widgets.TimeInput(attrs={'type': "time",
'value':"00:00",
'min':"0:00",
'max':"24:00"}))
ctc = forms.DecimalField(label="ctc", widget=forms.NumberInput(attrs={ 'min':0, 'step': 0.25}) )
company_name = forms.CharField(widget=forms.TextInput(attrs={'max_length': 100,
'class': 'field',
'list': 'company_dropdown1',
'id': 'company_input'}),
label="company_name")
placement_type = forms.ChoiceField(widget=forms.Select(attrs={'style': "height:45px"}), label="placement_type",
choices=Constants.PLACEMENT_TYPE)
location = forms.CharField(widget=forms.TextInput(attrs={'max_length': 100,
'class': 'field'}),
label="location")
description = forms.CharField(widget=forms.Textarea(attrs={'max_length': 1000,
'class': 'form-control'}),
label="description", required=False)
attached_file = forms.FileField(required=False)
placement_date = forms.DateField(label='placement_date', widget=forms.DateInput(attrs={'class':'datepicker'}))

def clean_ctc(self):
ctc = self.cleaned_data['ctc']
# print('form validation \n\n\n\n', ctc)
if ctc <= 0:
raise forms.ValidationError("CTC must be positive value")

return ctc

def clean_company_name(self):
company_name = self.cleaned_data['company_name']
# print('form validation \n\n\n\n', ctc)
if NotifyStudent.objects.filter(company_name=company_name):
raise forms.ValidationError("company_name must be unique")

return company_name


class SearchHigherRecord(forms.Form):
"""
The form is used to search from higher study record based on various parameters .
Expand Down
1 change: 1 addition & 0 deletions FusionIIIT/applications/placement_cell/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class Constants:
('CSE', 'CSE'),
('ME','ME'),
('ECE','ECE'),
('SM','SM'),
)

BDES_DEP = (
Expand Down
1 change: 1 addition & 0 deletions FusionIIIT/applications/placement_cell/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
url(r'^student_records/$', views.student_records, name='student_records'),
url(r'^manage_records/$', views.manage_records, name='manage_records'),
url(r'^statistics/$', views.placement_statistics, name='placement_statistics'),

url(r'^delete_placement_statistics/$', views.delete_placement_statistics, name='delete_placement_statistics'),
url(r'^cv/(?P<username>[a-zA-Z0-9\.]{1,20})/$', views.cv, name="cv"),

Expand Down
Loading