Python Build a Social Network with Flask Broadcasting Lunch Order Model

Michael G
Michael G
Python Web Development Techdegree Student 6,830 Points

Why is this not passing? Bummer: LunchOrder is not defined

Create a new Model class with the name LunchOrder. Give it a TextField attribute named order.

Why is this not passing?

models.py
import datetime

from flask.ext.bcrypt import generate_password_hash
from flask.ext.login import UserMixin
from peewee import *

DATABASE = SqliteDatabase(':memory:')


class User(UserMixin, Model):
    email = CharField(unique=True)
    password = CharField(max_length=100)
    join_date = DateTimeField(default=datetime.datetime.now)
    bio = CharField(default='')

    class Meta:
        database = DATABASE

    @classmethod
    def new(cls, email, password):
        cls.create(
            email=email,
            password=generate_password_hash(password)
        )

class LunchOrder(Model):
    order = TextField()



def initialize():
    DATABASE.connect()
    DATABASE.create_tables([User], safe=True)
    DATABASE.close()