Created
February 13, 2020 14:27
-
-
Save Porter97/53453a72eece66f8567d58590f23e526 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#... | |
class Collection(db.Model): | |
#... | |
content = db.relationship('Content', backref='collection', lazy='dynamic', cascade='all, delete-orphan') | |
def has_content(self, url): | |
return self.content.filter_by(url=url).first() is not None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment