Hey, actually I'm fixing the ticket. :) I know about connection.vendor, actually on the solution for sqlite3 I used it.
Thank you. 2012/5/27 Russell Keith-Magee <[email protected]> > On Mon, May 28, 2012 at 5:09 AM, Vanessa Gomes <[email protected]> > wrote: > > Hello, guys. > > > > Does anyone know where I can find the name / version of the database? For > > example, if I'm using PostegreSQL, want it returned something like > "8.4.11 > > PostgreSQL, psycopg2 2.4.4." > > Hi Vanessa, > > Django doesn't currently have any API for accessing that sort of > detail. You'd have to get a handle on the native DB cursor and ask the > DB directly. However, this won't be cross-database compatible -- every > database will have a different way of retrieving the version. > > The closest Django can get you is to tell you the identifier for the > backend -- that will tell you that you're on Postgres vs MySQL, but > won't tell you versions. > > from django.db import connections > print connections['default'].vendor > > will output the database vendor string. > > You're not the first person to ask for this feature-- there was a > ticket opened just recently for this exact idea: > > https://code.djangoproject.com/ticket/18332 > > If you're enthused about the idea, this should be a fairly easy > contribution your could make. > > Yours > Russ Magee %-) > > -- > You received this message because you are subscribed to the Google Groups > "Django users" 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-users?hl=en. > > -- Vanessa Gomes de Lima Graduanda em Ciência da Computação - 2009.1 - Centro de Informática - UFPE -- You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en.

