0

i'm using django in all my projects and in my first project i changed the database from sql lite normally i created a server group then the server and the DB etc.. and changed the settings.py file of the project with the according configuration

DATABASES = {
    'default': {
      'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'myDatabaseName',
        'USER': 'postgres',
        'PASSWORD': 'MyPassword',
        'HOST': 'localhost', 
        'PORT': '5432',
    }

and after about a month i started another project with django and ofc i needed a database and whenever i create another database it automatically associates it with the earlier one and it automatically have the same tables with earlier one so i need the steps to create another database with diffrent models and tables , thank you

1 Answer 1

2

try creating new database along with new user and new password, and copy paste those value in settings, and make sure you don't have any other settings overriding your base settings (if using multiple settings), also i would suggest you to create username, password, and database name with same name

Thanks

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.