Skip to main content

Tkinter Login System | Demo Project | Learn Python

Python practical

Requirement

Simple user registration and login application.

Three interfaces minimum

Sign-in: This is the main interface. Enter email and password, then log in. And the option to create accounts for new users.
Sign-up: This interface is used to register new users. All user details are saved in a text file. You can build your own structure to save data.
Dashboard: This interface will pop up when the user sign-in is successful. This interface has a menu bar with submenu items and a simple text file. You can customize this as your own.
All registered users are saved in a text file called “users”.
Read the text file when the user is sign-in and write when the new user sign-up.

Interfaces


This is the main interface of the program also the sign-in interface. Enter email and password and press the sign-in button. The dashboard will be pop up if login is successful else show an error message.

This is the interface when the user wants to create a new account. This interface will pop up when the user is pressed the create new account button in the main interface. Enter email and password and press the sign-up button. User details will be saved in text files and a success messages.

This interface will pop up when the user sign-in is successful. This interface has a menu bar and a text file. Design and develop your own dashboard as an improvement.

Development


This is the code of the main interface defined in a method called main_screen. Also, this is the sign-in interface. In the end, run command of the main_screen method.

This is the code of the sign-up interface defined in a method called signup_screen. This interface will pop up when click the create a new account. Check the last button code in the main_screen method, signup_screen method is calling as the command of the button.

This is the code of the sign-up button. Check the sign-up button of the sigup_screen method, signup_action method is set as the command. In this method write/ append users' text file each time when a new user is adding and giving a success message.

This is the structure of user's text file. All users are saved in a string list.
I build this structure for easy access but you can build your own too.

This is the code of the sign-in button. Check the sign-in button of the main_screen method, signin_action is set as the command. In this method, read users' text files and check given entries are correct, and respond.


This is the design of the dashboard interface. Defined in a method called dashboard_screen. This interface has a menu bar and text frame.
That’s all !!!
Make your own project and practice.
Memorize the main steps and keep thinking while developing.
Follow the demo project given.
The demo project is basic and clear. You can apply this to any of your projects.
Hope you enjoyed it, learned something new, and helped for better work.
Thank you for reading. See you with another practice.
Download demo project here

Comments

Popular

How to get a proper Affidavit in Sri Lanka?

What is an Affidavit? An affidavit is a written statement by a person under an oath or affirmation. An affidavit is administered, signed, and sealed by a registered lawyer, the high court, and the ministry. An affidavit includes a related person's personal details, family details, document details, and a comparison of each document detail.  An affidavit includes an oath or affirmative statement to each document's comparison is true and it states about the same person even if there are some differences. An affidavit includes several signs and seals at the bottom of the statement. 1. Related person's signature. 2. The lawyer's name, signature, and seal. 3. The ministry's signature, and seal. The lawyer,  1. Should be registered in the high court. 2. Should have a valid seal. 3. Should able to issue high court receipts. The lawyer should meet all the requirements above to certify a valid affidavit What is the routine of collecting a proper affidavit in Sri Lanka? First...

How to keep your smartphone under control for secure privacy?

We people care too much about how people see themselves in the digital world. Your mobile device is the closest pathway to connect our physical world to the digital world. In the modern world, we work hard to maintain our physical world alongside our digital world through our mobile devices. As we know most companies provide amazing platforms and services free to keep ourselves attached to the digital world. In return, they use our data for advertising or marketing purposes and make profits. We spend hours daily on these platforms updating, maintaining ourselves and others. Many people earn money on these platforms some maintain a balanced schedule between the digital world and the physical world. These days we hear about users' privacy leaks, unnecessary usage of users' data, Sneaking up even if we don't use some free applications, services. However, we can't put a full stop to these because these large-scale companies need profits to keep themselves alive. They are cu...