Last active
March 18, 2020 04:13
-
-
Save ychennay/7a4eee7b1c5f93e55ba5012b520ee91b to your computer and use it in GitHub Desktop.
Student and Model class
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 Model(metaclass=ModelBase): | |
def __init__(self): | |
print(f"Inside __init__ of Model with: {self}") | |
super(Model, self).__init__() # object's __init__ | |
class Student(Model): | |
def __init__(self): | |
print(f"Inside __init__ of Student with: {self}") | |
super().__init__() # Model's __init__ | |
age = 16 # attribute ... we'll see how this gets transformed | |
class ModelField: | |
def __init__(self, value): | |
self.value = f"[{str(value)}]" | |
def compute_some_complex_relationship(self): | |
pass | |
def save_value_to_persistent_store(self): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment