On Fri, Nov 23, 2012 at 6:02 AM, ajendrex <hurbi...@gmail.com> wrote:

> Hello,
>
> I'm new to django and I'm going directly to use it over python 3 (I have
> been using python 3 for mor than one year). However, the MySQLdb library
> doesn't support python 3 yet. Is there a way of connecting django to mysql
> over python3? If not, any plan to get it in the near future?
>
>
I'm sorry I didn't see this when you asked (two weeks ago now).

I wholeheartedly support your move to PostgreSQL, but if anyone else on the
list is stuck in the same situation, about a year ago I adapted the Django
MySQL backend to use PyMySQL[1], which is a pure python interface to MySQL,
is essentially a drop-in replacement for MySQLdb, and *is* Python
3-compatible.

You can just easy_install (or pip install) django-mysql-pymysql, and use
'mysql_pymysql' as your database backend, and you should be set.

If it breaks, feel free to submit improvements at
https://github.com/clelland/django-mysql-pymysql :)

Alternately, you could wait a bit; Andy Dustman mentioned on his blog a
couple of months ago that a soon-upcoming version of MySQLdb could be
released with Python 3 support [2]

[1] https://github.com/petehunt/PyMySQL

[2] http://mysql-python.blogspot.ca/2012/09/a-brief-history-of-mysqldb.html

-- 
Regards,
Ian Clelland
<clell...@gmail.com>

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

Reply via email to