split make misc for time and date stuff

This commit is contained in:
2022-11-18 01:29:34 -05:00
parent 6af3828c70
commit c66f6e7bbf
2 changed files with 5 additions and 7 deletions

8
app.py
View File

@@ -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')

4
misc.py Normal file
View File

@@ -0,0 +1,4 @@
import time
from datetime import datetime, date
currDay = datetime.now()
currDay = currDay.strftime('%m-%d-%Y')