-
Notifications
You must be signed in to change notification settings - Fork 2
User authentication GUI #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Registration, Login, transport selection page
robynfsj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fab work on creating a GUI!! I wouldn't have known where to start with this. However, I don't think we can use it just yet as we decided that we are making a minimal viable product first with everything being run in the command line. We decided that we would only be making a fancy front end as a "nice to have" feature if there was time at the end and only once the backend logic was fully functional. As the rest of the app will all be run in the command line, it's not going to work if part of the app has a GUI and part of it is in the command line.
We can definitely keep all of this and hope we can use it later, but for now we still need a backend python script that asks if the user is registered for the service and:
-
if yes, it takes an email address and password as an input, checks if these are in the DB and either (a) proceeds to a welcome message or (b) displays an email/password incorrect message and asks them to input their details again.
-
if no, takes the email address, password, first name, last name of the user as input, stores this data in the db and then runs through the previous bullet point asking the user to input their email and password to log in.
-
The welcome message that is displayed following a success log in will need to give the option for the user to display their journey stats, calculate a new journey or to register a new mode of transport. If a user selects a new mode of transport, this needs to take the transport type as an input and store that to the db user_vehicles table.
| @@ -0,0 +1,32 @@ | |||
| """Login page""" | |||
| """Importing modules""" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't matter for functionality but before we submit the project we should make sure all comments (especially single line comments) are delineated with #.
Technically, using triple quotes isn't commenting. It just creates a string that isn't assigned to anything. We can use them for multiline comments but should be super careful about where we put them incase it creates a docstring and associates the comment with a nearby function or the whole script.
For example, """Login page""" has become the official docstring of this script because it was the first text inside triple quotes in this file.
| @@ -0,0 +1,32 @@ | |||
| """Login page""" | |||
| """Importing modules""" | |||
| from tkinter import * | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not used tkinter before but I see it creates a GUI. Nice work putting something together that isn't just in the command line! However, the rest of the app is all in the command line so we might have to hold back on this for now and hope we have time at the end to add a GUI to the rest of the app.
|
|
||
| """Top Heading""" | ||
|
|
||
| label1= Label(root, text="Hi! I'm E@rth, Happy Walking ", fg='black', font="Head_font",bg="#fcf5cc").place(x=600, y=20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the lines (like this one) are a bit too long. PEP 8 recommends a line length of 79 characters. It will be better for readability if we move some of the arguments onto new lines and do the same for other long lines.
| label_image.place(x=0,y=0,relwidth=1,relheight=1) | ||
|
|
||
| """Top Heading""" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, only a small thing and nothing to do with functionality. But we should be consistent with line spacing and make sure we are adding blank lines between the different sections of code in a consistent way as it makes it more readable.
For example, here we have a blank line before and after the Top Heading comment. But later on there are no blank lines around the Second heading-login comment.
Registration, Login, transport selection page