Be notified of upcoming assignments from Schoology every morning.
Go to http://harker-schoology-notifications.herokuapp.com/ and click "login". Aprove access. That's it! Now you will recieve an email every morning. You can explore the hub too.
How to use migrations
- Install requirements with
pip3 install -r requirements.txt
. - Make change to models.py.
- Locally run
flask db migrate
. This will make a migration file with the code required to update the database. flask db upgrade
- upgrades the local dbgit commit
heroku run flask db upgrade
- upgrades heroku's database
How to use the selenium addition 1.
from selFunc import getCourses
getCourses("<username>", "<password>")
- This will return a list with the course ids
How to use the new database Comms:
'''Make a user'''
new_user = User(username=<String username>, discId=<int id>, courses="")
db.session.add(new_user) #adds the user to the session
db.session.commit() #makes changes final, can't rollback due to free db
'''Delete a user'''
del_user = User.query.get(1) #gets user with id 1
#del_user should be the user you want to delete
db.session.delete(del_user)
db.session.commit()
'''Get all users'''
User.query.all()
'''Get user by id'''
User.query.get(<int id>)
'''Get user by username'''
my_user=User.query.filter_by(username='Name').first()
'''Get user courses'''
my_user.courses
'''Update courses'''
my_user.courses='NEW COURSES'
db.session.commit()
How to send email to all users
- Go to /email_ver
- enter pw
- Email sent