user1592380
user1592380

Reputation: 36237

how do I confirm django is working with xampp's mysql

I am starting to learn django , and I'm trying to set up a development environment as in http://www.venkysblog.com/setup-django-on-windows-with-apache-and-mysql. I'm having trouble getting it working and so I'm working backwards to make sure I have it all correct.

I'm ok up to step 4. I have confirmed python , xampp and django working . I have created a DB called django using phpmyadmin

I have a project called testproject, with the settings.py file including:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'post
        'NAME': 'django',                      # Or path to database file if usi
        'USER': 'root',                      # Not used with sqlite3.
        'PASSWORD': '',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. No
        'PORT': '',                      # Set to empty string for default. Not
    }
}

when I run $ python manage.py runserver I get:

Validating models...

0 errors found Django version 1.4.3, using settings 'testproject.settings' Development server is running at htp://127.0.0.1:8000/ Quit the server with CTRL-BREAK.

Is there an explicit way to test the connection to 'django' db at this point?

Thanks in advance,

Bill

Upvotes: 1

Views: 786

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599580

If you do manage.py syncdb it'll try to create your tables, and you'll know if it succeeded or failed.

Upvotes: 4

Related Questions