Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Marin-Tony committed Apr 11, 2021
1 parent d088c64 commit e4f17c3
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
43 changes: 43 additions & 0 deletions recognition/forms.py
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()))




3 changes: 3 additions & 0 deletions recognition/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
21 changes: 21 additions & 0 deletions recognition/urls.py
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'),

]

0 comments on commit e4f17c3

Please sign in to comment.