What happens line by line after I register a model in django - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: What happens line by line after I register a model in django (/thread-36820.html) |
What happens line by line after I register a model in django - Novichok - Apr-03-2022 I'm new to programming and I don't really understand what's going on line by line in the code For example: to register a model in Django, we can register the class “class Genre(models.Model)” and specify only one field, for example “models.Charfield.” In turn, the parent class “Model(metaclass=ModelBase) (django.db.models.base)” contains about 50 methods. Most of them are private Questions: Were these 50 methods called when I registered the model? If “yes”, which line of code is responsible for this call? Or which principle of OOP? Could you recommend any article or book to delve into this topic? Thanks in advance! RE: What happens line by line after I register a model in django - sastonrobert - Apr-03-2022 following the topic. |