Hi,

I'm new to Django and Python but I think I've found a bug with the
testserver.

What happened is that Django wouldn't let me log in to my newly-
created superuser account and kept saying "Please enter a correct
username and password" despite the fact that I was 100% sure the
information was correct. Also, I checked the data in the database I
was using and the account was true for is_superuser, is_active and
is_staff (in MySQL).

After a lot of messing around, I realized that Django testserver
actually creates a separate "test_[databasename]" database with its
own users - but when you create a superuser in shell, it only updates
the real database (i.e. not in test_[databasename]).

Anyway - the only way I found around this was to manually copy the
auth_user table after testserver is started from the actual database
into the test_[databasename] database...

If anyone thinks I'm doing something wrong and this is not a bug,
please let me know

Here's my setup:

Python 2.7
Django 1.2.5
MySQL for Python 1.2.3
MySQL 5.1.41
Windows 7 Pro

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to