diff --git a/app.py b/app.py index 0e80b5c..619dffe 100644 --- a/app.py +++ b/app.py @@ -1,7 +1,6 @@ import os -import time -from datetime import datetime, date from flask import Flask, render_template, redirect +from misc import datetime, date, time, currDay from db import (db, Period, Task, Event) from forms import (TaskForm, EventForm, PeriodForm) from create_events import createEvents @@ -15,14 +14,9 @@ app.config['SQLALCHEMY_DATABASE_URI'] =\ app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db.init_app(app) -# db = SQLAlchemy(app) - from auth import auth as auth_blueprint app.register_blueprint(auth_blueprint) -currDay = datetime.now() -currDay = currDay.strftime('%m-%d-%Y') - @app.route('/') def index(): return redirect('/events') diff --git a/misc.py b/misc.py new file mode 100644 index 0000000..9124938 --- /dev/null +++ b/misc.py @@ -0,0 +1,4 @@ +import time +from datetime import datetime, date +currDay = datetime.now() +currDay = currDay.strftime('%m-%d-%Y') \ No newline at end of file