forked from SavvySupport/wolves
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NotesOnProject
39 lines (31 loc) · 2.14 KB
/
NotesOnProject
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
Questions:
1) How does rego.py work:
- savvy_collections.findone? does that search in database for username?
- does this step submit details to database?
- Where do the errors come from?
2) How to get multiple select fields to work?
3) Whats the best way to get dates to display.
Note:
- test if with 1 rego.py, can hadle 2 types of rego from registerEmployer and employee, using diff data struct.
- Doesnt matter, database will still save those keys but with empty values.
- is there a better way to approach this?
- To query into database #to querry into database, access user data by user['data']
user = savvy_collection.find_one("$and" : [{ "username": self.username.data.rstrip(), "status": "confirm"}])
- After registering, user is automatically logged in, despite not verifying yet. could this be due to the log in method in rego.py line 91,92
streetAddress = TextField('streetAddress')
website = TextField('website')
contactName = TextField('contactName',)
phoneNumber = TextField('phoneNumber')
#for employee registration
firstName = TextField('firstName', [validators.required()])
lastName = TextField('lastName', [validators.required()])
birthday = DateTimeField('birthday', format='%d/%m/%y')
gender = RadioField('gender', choices=[(0,'Male'), (1,'Female')])
residency = RadioField('residency', [validators.Optional()], choices=[(0,'Citizen'),(1,'Permanent Resident'),(2,'Temporary Resident Visa'),(3,'Student Visa'),(4,'Other')])
introduction = TextField('introduction')
education = RadioField('education',choices=[(0,'Finishing High School'),(1,'Completed High School'),(2,'Finishing Tafe/Apprenticeship'),(3,'Completed Tafe/Apprenticeship'),(4,'Finishing University'),(5,'Completed University')])
availability = RadioField('availability', choices=[('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')])
<!-- Profile picture -->
<!-- <div class="ui medium circular image dp">
<img id="upload" src= {{ url_for('static', filename="images/user.png") }} />
</div> -->