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
Information Is it possible to multi line a Basic Function Construct line statement? If so how? BrandonKastning 7 369 May-23-2024, 03:02 PM
Last Post: deanhystad
  Line graph with two superimposed lines sawtooth500 4 449 Apr-02-2024, 08:56 PM
Last Post: sawtooth500
  How to add multi-line comment section? Winfried 1 290 Mar-24-2024, 04:34 PM
Last Post: deanhystad
  break print_format lengthy line akbarza 4 481 Mar-13-2024, 08:35 AM
Last Post: akbarza
  Reading and storing a line of output from pexpect child eagerissac 1 4,424 Feb-20-2024, 05:51 AM
Last Post: ayoshittu
  coma separator is printed on a new line for some reason tester_V 4 614 Feb-02-2024, 06:06 PM
Last Post: tester_V
  problem with spliting line in print akbarza 3 494 Jan-23-2024, 04:11 PM
Last Post: deanhystad
  Unable to understand the meaning of the line of code. jahuja73 0 398 Jan-23-2024, 05:09 AM
Last Post: jahuja73
  Receive Input on Same Line? johnywhy 8 919 Jan-16-2024, 03:45 AM
Last Post: johnywhy
  model.fit and model.predict errors hatflyer 6 1,594 Nov-10-2023, 01:39 AM
Last Post: hatflyer

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020