Okay, this branch has become a mess. Opening a new branch with a semi-working celery setup and then will add in my routes and html pages. This branch has reached it's deadend
This commit is contained in:
@ -2,13 +2,19 @@ from flask import Flask
|
||||
from config import Config
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from .utils import make_celery
|
||||
|
||||
app = Flask(__name__)
|
||||
# app.config.from_object(Config)
|
||||
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///words_prompts.db"
|
||||
app.config["CELERY_CONFIG"] = {"broker_url": "redis://localhost"}
|
||||
db = SQLAlchemy(app)
|
||||
|
||||
celery = make_celery(app)
|
||||
celery.set_default()
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(Config)
|
||||
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///words_prompts.db"
|
||||
db = SQLAlchemy(app)
|
||||
|
||||
class AllWords(Base, db.Model):
|
||||
word = db.Column(db.String, primary_key=True)
|
||||
@ -16,6 +22,7 @@ class AllWords(Base, db.Model):
|
||||
def __init__(self, word):
|
||||
self.word = word
|
||||
|
||||
|
||||
class Themes(Base, db.Model):
|
||||
themes = db.Column(db.String, primary_key=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user