Skip to content

DB-Model nullable and confirmation email #4

@andrinM

Description

@andrinM

In the file website/templates/models.py:

class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True, nullable=False) password = db.Column(db.String(120)) first_name = db.Column(db.String(120)) notes = db.relationship('Note')
password and first_name should be nullable = False (like you did with the email). Otherwise it might be possible to create an account without a password (I tested it and it was not possible at your website).

Idea for improving:
It would be nice to get a confirmation email after creating an account. If you don't do this, it is possible to create accounts without vailed email addresses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions