-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform_data.py
More file actions
56 lines (45 loc) · 1.62 KB
/
form_data.py
File metadata and controls
56 lines (45 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""
This is a Form_Data object which will mainly be used for keeping the data that the user
has entered in the form. This will help allow for fields to be set in the form if the
user has already entered the data.
@author: Felix Estrella
"""
class Form_Data(object):
# constructor to set everything to the empty string to start. Parameters can be
# set for each object too.
def __init__(self, term = '', location = '', radius = '', categories = '', price = ''):
self.term = term
self.location = location
self.radius = radius
self.categories = categories
self.price = price
# Will set the term, given the term paramter
def set_term(self, term):
self.term = term
# Will return the term
def get_term(self):
return self.term
# Will set the location, given the location paramter
def set_location(self, location):
self.location = location
# Will return the location
def get_location(self):
return self.location
# Will set the radius, given the radius paramter
def set_radius(self, radius):
self.radius = radius
# Will return the radius
def get_radius(self):
return self.radius
# Will set the categories, given the categories paramter
def set_categories(self, categories):
self.categories = categories
# Will return the categories
def get_categories(self):
return self.categories
# Will set the price, given the price paramter
def set_price(self, price):
self.price = price
# Will return the price
def get_price(self):
return self.price