Shubham
Shubham

Reputation: 57

How to Create Django Project without default Django Database table

I'm trying to make Django project but when creating that Django Project There are serval table created in Database which I dont Want. I need Django Project Without any Default Database Table

Database tables are:

auth_group
auth_group_permission
auth_user
django_migration
django_admin_log
django_content_type

I tried Disabling django.contrib.admin In Installed Apps

INSTALLED_APPS = [
    # 'django.contrib.admin',
    # 'django.contrib.auth',
    'django.contrib.contenttypes',
    # 'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'data.apps.DataConfig',
]

The Expected result should be Django shouldn't create Default table in database

Upvotes: 0

Views: 582

Answers (1)

Arjun Shahi
Arjun Shahi

Reputation: 7330

Before the first migration you have to remove these apps from you your INSTALLED_APPS in your settings.py file: django.contrib.admin, django.contrib.auth, django.contrib.contenttypes, django.contrib.sessions, but it is not recommended because you will loose many features of django

Upvotes: 1

Related Questions