Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bfae2f7
login page error mssg
Pritishchugh22 May 21, 2021
a4ccd49
Merge pull request #35 from Pritishchugh22/log
dev-preetamraj May 21, 2021
fd63220
Added student add and view attendance for staff and created automatic…
dev-preetamraj May 23, 2021
85442ad
Merge pull request #36 from iitianpreetam/prsms6
dev-preetamraj May 23, 2021
33abcdc
fixed a bug in view attendance
dev-preetamraj May 24, 2021
bec348c
Manage Subject Edit and Delete Feature
RaviKumar7870 May 25, 2021
d0261af
Merge pull request #37 from RaviKumar7870/rk10
dev-preetamraj May 29, 2021
0518db4
updated profile thing
dev-preetamraj Jun 22, 2021
58cd450
sab sudhar diye
dev-preetamraj Jun 22, 2021
7f8bee5
added postgresql
dev-preetamraj Jun 22, 2021
6aeafeb
staticfiles
dev-preetamraj Jun 22, 2021
084d41d
Update README.md
RaviKumar7870 Jul 14, 2021
ecd1ed8
Update README.md
RaviKumar7870 Jul 14, 2021
e58ae89
Update README.md
RaviKumar7870 Jul 14, 2021
a7b8bf0
UI improve
RaviKumar7870 Aug 11, 2021
0fb91e7
Merge pull request #39 from RaviKumar7870/rk10
dev-preetamraj Aug 12, 2021
cd44a0a
configured settings
dev-preetamraj Jun 25, 2024
31b766a
configured settings for render
dev-preetamraj Jun 25, 2024
eb07272
updated navbar
dev-preetamraj Jun 25, 2024
6e1c988
updated settings for static file and added build script
dev-preetamraj Jun 25, 2024
47be969
updated settings
dev-preetamraj Jun 25, 2024
c90b089
updated staticfiles
dev-preetamraj Jun 25, 2024
a08d718
updated staticfiles
dev-preetamraj Jun 25, 2024
713f30a
updated README.md
dev-preetamraj Jun 25, 2024
cc78175
updated README.md
dev-preetamraj Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Student Management System
Sara content baad mai dalengye, filal ke liye kaisye contribute krna vo step nichye likye hain
# School Management System
The School Management System is a sleek web-based application to manage the record of students and teachers.
The objective of the “School Management System” is to design a scheduling system for an education center. There will be three main actors of the application 1) Admin 2) Student 3) Faculty.

Admin can manage student records, the Attendance record of the students, Subject details ETC. Admin can add new records as well as can view and delelte the details of all the records.

Faculty/Teachers/Staff can add attendance, Subject, and mark sheet, as well as they can view the record for the same.

A student can view the mark sheet can check the attendance details fees details and subject details.

One can access the webapp from below link:
https://sms-uygv.onrender.com


## Available Scripts

Expand All @@ -14,4 +25,9 @@ Sara content baad mai dalengye, filal ke liye kaisye contribute krna vo step nic
<pre>
Runs the app in the development mode.<br />
Open (http://localhost:8000) to view it in the browser.
</pre>
</pre>

### You can test this website as admin but please do not add unnecessary data.
username: admin

password: Test@123
Binary file modified db.sqlite3
Binary file not shown.
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
asgiref==3.3.1
Brotli==1.1.0
click==8.1.7
Django==3.1.7
gunicorn==20.1.0
h11==0.14.0
Pillow==8.2.0
psycopg2==2.9.9
python-dotenv==1.0.1
pytz==2021.1
setuptools==70.1.1
sqlparse==0.4.1
uvicorn==0.30.1
whitenoise==5.2.0
10 changes: 8 additions & 2 deletions sms_app/HODurls.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
path('student_leave/', HODviews.student_leave_view, name='student_leave_view'),
path('student_leave_approve/<str:leave_id>/',HODviews.student_leave_approve,name='student_leave_approve'),
path('student_leave_reject/<str:leave_id>/',HODviews.student_leave_reject,name='student_leave_reject'),
path('add_student/', HODviews.add_student_view, name='add_student'),
path('add_staff/', HODviews.add_staff_view, name='add_staff'),
path('add_subjects/', HODviews.add_subjects_view, name='add_subjects'),
path('add_session/', HODviews.add_session_view, name='add_session'),
path('update_student/<str:pk>',
Expand All @@ -44,7 +42,15 @@
path('delete_student/<str:pk>',
HODviews.delete_student_view, name='delete_student'),
path('delete_staff/<str:pk>', HODviews.delete_staff_view, name='delete_staff'),
path('delete_session/<str:pk>', HODviews.delete_session_view, name='delete_session'),
path('update_session/<str:pk>',
HODviews.update_session_view, name='update_session'),
path('see_detail/<str:pk>', HODviews.see_detail_view, name='see_detail'),
path('see_detail_staff/<str:pk>',
HODviews.see_detail_staff_view, name='see_detail_staff'),

#------------------------url for students-----------------------------------

#------------------------url for staffs-------------------------------------

]
114 changes: 82 additions & 32 deletions sms_app/HODviews.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.shortcuts import render, redirect
from .decorators import allowed_users, unauthenticated_user
from .models import Attendance, SessionYear, Staff, Staff_Leave, Staffs_FeedBack, Student, Course, StudentAttendance, Student_Leave, Students_FeedBack, Subject
from .models import Attendance, HODTable, SessionYear, Staff, Staff_Leave, Staffs_FeedBack, Student, Course, StudentAttendance, Student_Leave, Students_FeedBack, Subject
from django.contrib.auth.models import User, Group
from .forms import AddStaffForm, RegisterUserForm, AddStudentForm, UpdateUserForm, AddCourseForm, AddSubjectForm, AddSessionForm
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
Expand Down Expand Up @@ -63,13 +63,32 @@ def register_user_view(request):
if form.cleaned_data.get('user_type') == 'hod':
set_group = Group.objects.get(name='hod')
user_save.groups.add(set_group)
gender = form.cleaned_data.get('gender')
create_hod = HODTable(
user = user_save,
gender = gender
)
create_hod.save()
elif form.cleaned_data.get('user_type') == 'staff':
set_group = Group.objects.get(name='staff')
user_save.groups.add(set_group)
gender = form.cleaned_data.get('gender')
create_staff = Staff(
user = user_save,
gender = gender,
)
create_staff.save()
else:
set_group = Group.objects.get(name='student')
user_save.groups.add(set_group)
return redirect('admin_dashboard')
gender = form.cleaned_data.get('gender')
create_student = Student(
user = user_save,
gender = gender,
)
create_student.save()

return redirect('register_user')
else:
return redirect('register_user')
context = {'form': form}
Expand Down Expand Up @@ -132,10 +151,15 @@ def add_course_view(request):
@login_required
@allowed_users(allowed_roles=['hod'])
def manage_subjects_view(request):
context = {}
subjects = Subject.objects.all()
context = {
'subjects' : subjects
}
return render(request, 'HOD/manage_subjects.html', context)




@login_required
@allowed_users(allowed_roles=['hod'])
def add_subjects_view(request):
Expand Down Expand Up @@ -164,16 +188,68 @@ def add_session_view(request):
}
return render(request, 'HOD/add_session.html', context)


# ====================== Session ========================== #


@login_required
@allowed_users(allowed_roles=['hod'])
def manage_sessions_view(request):
context = {}
sessions = SessionYear.objects.all()
context = {
'sessions' : sessions
}
return render(request, 'HOD/manage_sessions.html', context)



@login_required
@allowed_users(allowed_roles=['hod'])
def delete_session_view(request, pk):
session = SessionYear.objects.get(id=pk)
if request.method == "POST":
session.delete()
return redirect('manage_sessions_view')
context = {'item': session}
return render(request, 'HOD/delete_session.html',context)


@login_required
@allowed_users(allowed_roles=['hod'])
def update_student_view(request, pk):
students = Student.objects.get(id=pk)
student_form = AddStudentForm(instance=students)
user_form = UpdateUserForm(instance=students.user)
if request.method == 'POST':
student_form = AddStudentForm(
request.POST, request.FILES, instance=students)
user_form = UpdateUserForm(request.POST, instance=students.user)
if student_form.is_valid() and user_form.is_valid():
student_form.save()
user_form.save()
return redirect('manage_student_view')
context = {
'student_form': student_form,
'user_form': user_form
}
return render(request, 'HOD/update_student.html', context)

@login_required
@allowed_users(allowed_roles=['hod'])
def update_session_view(request, pk):
session = SessionYear.objects.get(id=pk)
session_form = AddSessionForm(instance=session)

if request.method == 'POST':
session_form = AddSessionForm(
request.POST, request.FILES, instance=session)
if session_form.is_valid():
session_form.save()
return redirect('manage_sessions_view')
context = {
'session_form': session_form
}
return render(request, 'HOD/update_session.html', context)

@login_required
@allowed_users(allowed_roles=['hod'])
def view_attendance(request):
Expand Down Expand Up @@ -329,20 +405,7 @@ def tables_view(request):
return render(request, 'HOD/tables.html', context)


@login_required
@allowed_users(allowed_roles=['hod'])
def add_student_view(request):
form = AddStudentForm()
form.fields['user'].queryset = User.objects.filter(groups__name='student')
if request.method == 'POST':
form = AddStudentForm(request.POST, request.FILES)
if form.is_valid():
form.save()
return redirect('manage_student_view')
context = {
'form': form
}
return render(request, 'HOD/add_student.html', context)



@login_required
Expand Down Expand Up @@ -386,19 +449,6 @@ def see_detail_view(request, pk):
return render(request, 'HOD/see_detail.html', context)


@login_required
@allowed_users(allowed_roles=['hod'])
def add_staff_view(request):
form = AddStaffForm()
if request.method == 'POST':
form = AddStaffForm(request.POST, request.FILES)
if form.is_valid():
form.save()
return redirect('manage_staff_view')
context = {
'form': form
}
return render(request, 'HOD/add_staff.html', context)


@login_required
Expand Down
6 changes: 5 additions & 1 deletion sms_app/StaffUrls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

urlpatterns = [
path("", Staff_views.staff_dashboard, name='staff_dashboard'),
path("attendance/", Staff_views.take_attendance, name='take_attendance'),
path('staff_take_attendance/', Staff_views.staff_take_attendance, name="staff_take_attendance"),
path('get_students/', Staff_views.get_students, name="get_students"),
path('save_attendance_data/', Staff_views.save_attendance_data, name="save_attendance_data"),
path("view_attendance/", Staff_views.view_attendance, name='staffView_attendance'),
path('staff_get_attendance_dates/',Staff_views.staff_get_attendance_dates,name='staff_get_attendance_dates'),
path('staff_get_attendance_student/',Staff_views.staff_get_attendance_student,name='staff_get_attendance_student'),
path("add_result/", Staff_views.add_result, name='add_result'),
path("leave/", Staff_views.leave, name='leaveStaff'),
path('staff_leave_save', Staff_views.staff_leave_save,name='staff_leave_save'),
Expand Down
Loading