You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
408 B
Python

from flask_sqlalchemy import SQLAlchemy
import datetime
from app import app
db = SQLAlchemy(app)
class Posts(db.Model):
pid = db.Column(db.Integer, primary_key=True, autoincrement=True)
title = db.Column(db.String(100))
writingfield = db.Column(db.String(1000))
def __init__(self, title, writingfield):
self.title = title
self.writingfield = writingfield
db.create_all()