-
Notifications
You must be signed in to change notification settings - Fork 282
Functional Document
Jayesh Lahori edited this page Aug 15, 2014
·
4 revisions
This document contains formal documentation to methods used in various files.
Since, Django is an MVC framework. VMS is following the MVC architecture, where models are basically located in model.py
, controllers in views.py
and views in VMS/templates/AdminUnit
. Models have been described in Design Document. This document will basically serve to add documentation for methods in views.py
. All unit-tests are written in tests.py
.
All routes which exists in urls.py
are actual controllers, other methods in this files are Decorators or auxiliary functions. Following are documentations for all the views contained in this file.
- index
"""
Method displays the index page(dashboard) to the user
as per his access rights (Volunteer/Admin). Distinction
is done on the basis of checkAdmin and checkVolunteer
methods
"""
- register
"""
This method is responsible for siplaying the register user view
Register Admin or volunteer is judged on the basis of users
access rights.
Only if user is registered and logged in and registered as an
admin user, he/she is allowed to register others as an admin user
"""
- login_process
"""
Checks user's credentials and logs him to admin or volunteer
dashboard accordingly.
"""
- logout
"""
Logout a user object
"""
- editEvent
"""
Use to Edit/Create Event Objects
"""
- job
"""
Used to Edit/Create Job
"""
- allEvents
"""
This method is responsible for the all events view
"""
- allJobs
"""
This method is responsible for the all jobs view
"""
- deleteEvent
"""
Delete's an event with a given primary key
"""
- deleteJob
"""
Delete's a job with a given primary key
"""
- editOrg
"""
Use to Edit/Create Organization
"""
- allOrgs
"""
This method is responsible for displating th all Organizations view
"""
- deleteOrg
"""
Delete's an org with a given primary key
"""
- searchByEvent
"""
This method displays all jobs inside an event.
Will be used by volunteer's to search jobs
"""
- searchByTime
"""
This method displays all jobs within a time range.
Will be used by volunteer's to search jobs
"""
- searchEmployeeByOrg
"""
This method displays all employees belonging to an Org.
"""
- manageShift
"""
Use to Edit/Create Shifts
Used by admin to assign shifts to voluneers
"""
- allShifts
"""
Controller for all Shifts views
"""
- deleteShift
"""
Delete's a shift with a given primary key
"""
- createSat
"""
Will be used by admin to assign a shift to a volunteer
Each entry will be logged in SAT Table
Also, accordingly updates the NOVAssigned in the job table
"""
- sat
"""
Use to Edit/Create SATs
Used by admin to assign shifts to voluneers
"""
- allSats
"""
Controller for all SATs views
"""
- deleteSat
"""
Deletes a SAT with given pk
"""
- wlt
"""
Use to Edit/Create WLTs
Used by admin to log hours of any voluneers
Used by volunteer to lof only their hours
"""
- allWlts
"""
Controller for all WLTs views
"""
- deleteWlt
"""
Delete's a WLT with a given primary key
"""
- mySats
"""
Used by volunteers to see SATs which have been assigned to them
"""
- reportHoursByOrg
"""
Reports total number of hours worked by all volunteers
grouped by organization
Gives Graphical as well as textual content
"""
- reportVolunteersByOrg
"""
Reports total nu,ber of volunteers grouped by organization
"""
- reportHoursByEvent
"""
Total numer of hours contributed by each organization during the
given event.
"""
- reportHoursByTime
"""
Reports total numer of hours contributed by employees across
all events occured during the given dates, Grouped by Organizations
"""
- reportHoursByTimeAndOrg
"""
Total number of hours contributed by each employee of
given organization across all events occured during
the given timestamps
"""