Skip to content

Functional Document

Jayesh Lahori edited this page Aug 13, 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.

Views

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
    """
  • 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
    """
Clone this wiki locally