-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d088c64
commit e4f17c3
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from django.forms import ModelForm | ||
from django.contrib.auth.models import User | ||
from django import forms | ||
from datetime import datetime | ||
from users.models import staff_mesg,desig,Notify,Time,Present | ||
|
||
|
||
DESIGNATION_CHOICES=[('teacher','Teacher'),('parent_student','Parent_Student'),('staff','Staff')] | ||
#SUBJECT_CHOICES=[('dbms','DBMS'),('sql','SQL'),('python','Python'),('java','Java'),('maths','Maths'),('aws','AWS')] | ||
|
||
class checkForm(forms.Form): | ||
username=forms.CharField(max_length=30) | ||
notification=forms.CharField(widget=forms.Textarea(),label='Notification') | ||
class Meta: | ||
model = Notify | ||
fields=['username','notification'] | ||
|
||
|
||
class TextAreaForm(forms.ModelForm): | ||
username=forms.CharField(label='Username:',max_length=30) | ||
message=forms.CharField(widget=forms.Textarea(),label='Message') | ||
class Meta: | ||
model = staff_mesg | ||
fields=['username','message'] | ||
|
||
|
||
class DateForm(forms.Form): | ||
date=forms.DateField(widget = forms.SelectDateWidget(empty_label=("Choose Year", "Choose Month", "Choose Day"))) | ||
|
||
|
||
class UsernameAndDateForm(forms.ModelForm): | ||
username=forms.CharField(label='Username:',max_length=30) | ||
designation= forms.ChoiceField(label='Designation:',required=True,choices=DESIGNATION_CHOICES) | ||
class Meta: | ||
model = desig | ||
fields = ['username','designation'] | ||
|
||
class DateForm_2(forms.Form): | ||
date_from=forms.DateField(label='Date:',widget = forms.SplitDateTimeWidget(date_format=datetime.now())) | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from django.urls import path | ||
from . import views as recog_views | ||
|
||
|
||
urlpatterns = [ | ||
path('', recog_views.home, name='home'), | ||
path('dashboard/', recog_views.dashboard, name='dashboard'), | ||
path('train/', recog_views.train, name='train'), | ||
path('add_photos/', recog_views.add_photos, name='add-photos'), | ||
path('mark_your_attendance', recog_views.mark_your_attendance ,name='mark-your-attendance'), | ||
path('mark_your_attendance_out', recog_views.mark_your_attendance_out ,name='mark-your-attendance-out'), | ||
path('view_attendance_home', recog_views.view_attendance_home ,name='view-attendance-home'), | ||
path('view_attendance_date', recog_views.view_attendance_date ,name='view-attendance-date'), | ||
path('view_attendance_employee', recog_views.view_attendance_employee ,name='view-attendance-employee'), | ||
path('view_my_attendance', recog_views.view_my_attendance_employee_login ,name='view-my-attendance-employee-login'), | ||
path('not_authorised', recog_views.not_authorised, name='not-authorised'), | ||
path('add_notification',recog_views.add_notification,name='add_notification'), | ||
#path('add_events',recog_views.add_events,name='add_events'), | ||
path('mesg_staff',recog_views.mesg_staff,name='mesg_staff'), | ||
|
||
] |