How does Django make tables relating to user,auth,group,session and so on with very first migration?
<p>I am little bit exciting to write my question in here. Normally I searched other questions to figure out my own problem. By the way, this time I couldn't figure out my question by searching it. That's why I am leaving question in here in person.</p>

<p>My question is :</p>

<p>How does Django framework make initial tables?
if you make Django project and then migrate. it makes tables like below. even thought you didn't make any apps in project or didn't write any code in models.py of each app.</p>

<p>auth_group<br>
auth_group_permissions
auth_permission<br>
auth_user<br>
auth_user_groups<br>
auth_user_user_permissions<br>
django_admin_log<br>
django_content_type<br>
django_migrations<br>
django_session</p>

<p>I understood what ORM, MTV, migrations are. I hope I can understand Django framework more deeply and want to figure what hidden code(or Django structure) in Django made those initial tables.</p>

<p>Addition Question :</p>

<p>I understood that I can control default permissions or custom permission in Meta class. if I don't set any, it makes three dafault permssions(add,change,delete).</p>

<p>when I migrate as I told you above, I can check those in a table named 'auth_permission'. There are records which is made initially</p>

<p>1;"Can add log entry";1;"add_logentry"
2;"Can change log entry";1;"change_logentry"
3;"Can delete log entry";1;"delete_logentry"
4;"Can add permission";2;"add_permission"
5;"Can change permission";2;"change_permission"
6;"Can delete permission";2;"delete_permission"
7;"Can add user";3;"add_user"
8;"Can change user";3;"change_user"
9;"Can delete user";3;"delete_user"
10;"Can add group";4;"add_group"
11;"Can change group";4;"change_group"
12;"Can delete group";4;"delete_group"
13;"Can add content type";5;"add_contenttype"
14;"Can change content type";5;"change_contenttype"
15;"Can delete content type";5;"delete_contenttype"
16;"Can add session";6;"add_session"
17;"Can change session";6;"change_session"
18;"Can delete session";6;"delete_session"</p>

<p>How can I manipulate those? ex)what if I want to change those code name or what if I don't want to make default permissions(add,change,delete)?</p>

<p>Thank you in advance.
if my explanation for my question was not clear, please leave me comment.
Have a nice day!</p>

<p>There are apps that are included in the project by default. You can see this is the <code>INSTALLED_APPS</code> in the <code>settings.py</code> file of your project. <code>auth_group</code> is a table from <code>django.contrib.auth</code>.</p>

python django