Lemmah/BucketList

View on GitHub
app/user/user.py

Summary

Maintainability
A
0 mins
Test Coverage
# Modelling a user
# A user is a bucketlist controller so,
 
from app.bucketlist.bucketlist_controller import BucketListController
 
class User(BucketListController):
''' A user who is also a bucketlist controller '''
def __init__(self, email, password, name):
''' Construct an instance of a user '''
BucketListController.__init__(self, email)
self.name = name
self.email = email
self.password = password
 
def __repr__(self):
''' A representation of the user object '''
return "{}".format(self.name)