Python Forum
What happens line by line after I register a model in django
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What happens line by line after I register a model in django
#1
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!
Reply
#2
following the topic.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  No new line from print in a browser Lou 13 1,112 Dec-01-2025, 06:39 PM
Last Post: noisefloor
  cannot unpack non-iterable int object in urllib3/util/wait.py", line 85, ping_chen_ibm_us 2 893 Aug-01-2025, 02:05 PM
Last Post: ping_chen_ibm_us
  [SOLVED] Why does regex fail cleaning line? Winfried 7 4,852 Jul-11-2025, 11:52 PM
Last Post: Pedroski55
  I am a newbie I like to use the command line Mikel2025 1 1,020 Jun-13-2025, 03:20 PM
Last Post: Gribouillis
  Βad Input on line 12 Azdaghost 5 2,165 Apr-19-2025, 10:22 PM
Last Post: Azdaghost
Question [SOLVED] [Beautiful Soup] Move line to top in HTML head? Winfried 0 946 Apr-13-2025, 05:50 AM
Last Post: Winfried
  Insert command line in script lif 4 2,169 Mar-24-2025, 10:30 PM
Last Post: lif
  Entry field random pull from list, each return own line Bear1981 6 1,849 Feb-25-2025, 06:09 AM
Last Post: Pedroski55
  How to revert back to a previous line from user input Sharkenn64u 2 2,997 Dec-28-2024, 08:02 AM
Last Post: Pedroski55
  How to re-register .py file extension to new moved Python dir (on Windows)? pstein 5 2,789 Nov-06-2024, 03:06 PM
Last Post: DeaD_EyE

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.