-
Notifications
You must be signed in to change notification settings - Fork 0
A task management system - Tick it off for a hit of dopamine! The goal here was to learn how to create a fully functioning Flask application with user login management capability, hosted on AWS using Elastic Beanstalk. We also took the opportunity to learn how to split the application into smaller packages
csidon/dopeticks
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
>> cd /dopeticks >> venv\Scripts\activate # Install the requirements pip install -r requirements.txt >> cd /app # One time setup to allow for easy running of Flask app >> set FLASK_APP=dopeticks.py # Test to see if it works >> flask run # To run app, in (venv) python dopeticks.py flask shell from dopeticks import app # FOR EB DEPLOYMENTS Make sure that the following are NOT in the requirements.txt file!! pypiwin32==223 pywin32==305 Make sure that main application is renamed to application.py and the flask app is also application and not another name. Refactor using Pycharm!! Make sure that .idea and __pycache__ files are deleted before upload #################################### # Tips & Tricks #---------------------------------- # To get out of venv >> venv\Scripts\deactivate ## To add a user, after <<flask shell>> and <<create_all()>>, create a user using e.g. user_1 = User(userEmail='new@test.com', userPassword="password!") db.session.add(user_1) db.session.commit() ## commits it to the DB ## Query users using: User.query.all() user = User.query.filter_by(userEmail="new@test.com".first() user.id ## Adding a task (tied to user defined above) task_1 = Task(taskTitle="Connect to DB", taskDescription="help!!!", userID=user.id, taskDue="02/03/23") db.session.add(task_1) db.session.commit() ## To clear db of all entries, use db.drop_all()
About
A task management system - Tick it off for a hit of dopamine! The goal here was to learn how to create a fully functioning Flask application with user login management capability, hosted on AWS using Elastic Beanstalk. We also took the opportunity to learn how to split the application into smaller packages
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published