From c66f6e7bbf1f5fa4b8780136e812bd6e786fd9a1 Mon Sep 17 00:00:00 2001 From: William Peebles Date: Fri, 18 Nov 2022 01:29:34 -0500 Subject: [PATCH] split make misc for time and date stuff --- app.py | 8 +------- misc.py | 4 ++++ 2 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 misc.py 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