On Sep 4, 9:58 pm, Pete Hunt <floydoph...@gmail.com> wrote:
> Hi Andy -
>
> Below is a patch that will let Django use pymysql if MySQLdb is not
> available. Currently it is not in use in production anywhere but I am
> hoping to change that soon. Currently its primary use is prototyping
> applications that are being developed on Mac OSX but deployed on
> Linux. If you are interested in using it in production please let me
> know and I will be sure to prioritize any tickets related to
> production issues.
>
> Simply search-replacing MySQLdb with pymysql in django/db/backends/
> mysql/base.py and django/db/backends/mysql/introspection.py will get
> it to work. I will submit a patch soon that tries to import MySQLdb
> but falls back to pymysql if it is not available.
>
> Pete

It occurs to me that a better solution for this might be to create a
custom DB backend for Django - then you could install that in your
Pythonpath and reference it in your settings.py, without having to
patch Django. It shouldn't be too hard to create - just subclass the
MySQLdb backend but import pymsql instead. If I get some time I'll try
and work up an example.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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