problem getting the admin to work (in tutorial)

5 views
Skip to first unread message

ser...@village-buzz.com

unread,
Mar 10, 2006, 2:26:31 AM3/10/06
to Django users
i have been running through the tutorial and everything has been
running fine.. (running macosx)..

i found my first problem that i have not been able to figure out..

i am trying to create a superuser, and i am getting the following error
(any help on this is appreciated... thanks!):

Username (only letters, digits and underscores): sergio
Traceback (most recent call last):
File "manage.py", line 11, in ?
execute_manager(settings)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py",
line 1051, in execute_manager
execute_from_command_line(action_mapping)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py",
line 969, in execute_from_command_line
action_mapping[action]()
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py",
line 529, in createsuperuser
users.get_object(username__exact=username)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
return args[0](*(args[1:]+moreargs), **dict(kwargs.items() +
morekwargs.items()))
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1356, in function_get_object
obj_list = function_get_list(opts, klass, **kwargs)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1396, in function_get_list
return list(function_get_iterator(opts, klass, **kwargs))
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1379, in function_get_iterator
cursor.execute("SELECT " + (kwargs.get('distinct') and "DISTINCT "
or "") + ",".join(select) + sql, params)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/db/base.py",
line 10, in execute
result = self.cursor.execute(sql, params)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/db/backends/mysql.py",
line 32, in execute
return self.cursor.execute(sql, params)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/MySQLdb/cursors.py",
line 137, in execute
self.errorhandler(self, exc, value)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/MySQLdb/connections.py",
line 33, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1267, "Illegal mix of collations
(latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for
operation '='")

patrick k

unread,
Mar 10, 2006, 2:52:35 AM3/10/06
to django...@googlegroups.com
try to set the collations of your database manually (e.g. using cocoamysql
on osx), using "utf 8".

hope that helps,
patrick

ser...@village-buzz.com

unread,
Mar 10, 2006, 8:54:39 AM3/10/06
to Django users
thanks, patrick.. i forgot to mention..

i am using mysql on linux on a remote machine for this...

can i do it from the command line on the linux machine?

thanks!

va:patrick.kranzlmueller

unread,
Mar 10, 2006, 9:02:24 AM3/10/06
to django...@googlegroups.com
see
http://dev.mysql.com/doc/refman/4.1/en/charset-database.html
http://dev.mysql.com/doc/refman/4.1/en/charset-table.html

e.g.
CREATE DATABASE db_name CHARACTER SET latin1 COLLATE latin1_swedish_ci;

regards,
patrick

ser...@village-buzz.com

unread,
Mar 10, 2006, 11:13:48 AM3/10/06
to Django users
okay.. for whatever reason, i cannot get this to work..

i used the above, and rebuilt all the databases, but i cannot get it to
go..

is there a character set and collation i should be using in the very
beginning?

i dropped the database, and ran init, and built the poll databases
again.. but i am having no luck..

thanks!

Reply all
Reply to author
Forward
0 new messages