Welcome to beelance2’s documentation!¶
-
class
views.index.Index¶ -
GET()¶ Get main page using the projects URL input variable to determine which projects to show.
- return
index page
-
-
class
views.login.Login¶ -
GET()¶ Show the login page
- return
The login page showing other users if logged in
-
POST()¶ - Log in to the web application and register the session
- return
The login page showing other users if logged in
-
-
class
views.logout.Logout¶ -
GET()¶ - Log out of the application (kill session and reset variables)
- return
Redirect to main page
-
-
class
views.new_project.New_project¶ -
GET()¶ Get the project registration form
- return
New project page
-
POST()¶ Create a new project
- return
Redirect to main page
-
compose_form(data, add)¶ Compose a new project form by adding or removing a task
- param data
The data object from web.input
- param add
True or False
- type add
boolean
- return
A complete project form object
-
get_task_count(data)¶ Determine the number of tasks created by removing the four other elements from count and divide by the number of variables in one task.
- param data
The data object from web.input
- return
The number of tasks opened by the client
-
-
class
views.open_projects.Open_projects¶ -
GET()¶ Get all open projects
- return
A page containing all open projects
-
-
class
views.register.Register¶ -
GET()¶ Get the registration form
- return
A page with the registration form
-
POST()¶ Register new user in database
- return
Main page
-
-
views.forms.get_new_project_form(elements)¶ Combine a project form element and task elements to make a complete project form
- param elemets
All the project and task form elements
- return
The ready to use project form
-
views.forms.get_project_form_elements(project_title='', project_description='', category_name='')¶ - Generate a set of project form elements
- param project_title
Project title
- param project_description
Project description
- param category_name
Name of the belonging category
- type project_title
str
- type project_description
str
- type category_name
str
- return
A set of project form elements
-
views.forms.get_task_form_elements(identifier=0, task_title='', task_description='', budget='')¶ - Generate a set of task form elements
- param identifier
The id of the task
- param task_title
Task title
- param task_description
Task description
- param budget
Task budget
- type identifier
int, str
- type task_title
str
- type task_description
str
- type budget
int, str
- return
A set of task form elements
Generates the page nav bar
- return
The navigation bar HTML markup
-
models.login.get_users()¶ - Retreive all registrered users from the database
- return
users
-
models.login.match_user(username, password)¶ Check if user credentials are correct, return if exists
- param username
The user attempting to authenticate
- param password
The corresponding password
- type username
str
- type password
str
- return
user
-
models.project.get_categories()¶ Get all categories
- return
List of categories
-
models.project.get_project_by_id(projectid)¶ - Retrieve a project by its id
- param projectid
The project id
- type projectid
str
- return
The selected project
-
models.project.get_projects_by_participant_and_status(userid, project_status)¶ Retrieve all projects where the user is a participant with specific status
- param userid
The id of the participant
- param project_status
The status to filter on
- type userid
str
- type project_status
str
- return
A list of projects
-
models.project.get_projects_by_status_and_category(categoryid, project_status)¶ Retrieve all projects from a category with a specific status
- param catergoryid
The id of the category
- param project_status
The status to filter on
- type catergoryid
str
- type project_status
str
- return
A list of projects
-
models.project.get_projects_by_status_and_owner(userid, project_status)¶ Retrieve all projects owned by a user with a specific status
- param userid
The id of the owner
- param project_status
The status to filter on
- type userid
str
- type project_status
str
- return
A list of projects
-
models.project.set_project(categoryid, userid, project_title, project_description, project_status)¶ Store a project in the database
- param categoryid
The id of the corresponding category
- param userid
The id of the project owner
- param project_title
The title of the project
- param project_description
The project description
- param project_status
The status of the project
- type categoryid
str
- type userid
str
- type project_title
str
- type project_description
str
- type project_status
str
- return
The id of the new project
-
models.project.set_task(projectid, task_title, task_description, budget)¶ Create a task
- param projectid
The corresponding project id
- param task_title
The title of the task
- param task_description
The description of the task
- param budget
The task budget
- type projectid
str
- type task_title
str
- type task_description
str
- type budget
str
-
models.register.set_user(username, password, full_name, company, phone_number, street_address, city, state, postal_code, country)¶ - Register a new user in the database
- param username
The users unique user name
- param password
The password
- param full_name
The users full name
- param company
The company the user represents
- param phone_number
The phone number of the user
- param street_address
The street address of the user
- param city
The city where the user lives
- param state
The state where the user lives
- param postal_code
The corresponding postal code
- param country
The users country
- type username
str
- type password
str
- type full_name
str
- type company
str
- type phone_number
str
- type street_address
str
- type city
str
- type state
str
- type postal_code
str
- type country
str