First, you should import django.db.connections - which is a dictionary-like object that allows you to retrieve a specific database connection by its alias. Then you should use its appropriate cursor. I believe there is no "using" method for the Cursor object (that is what the error message says).
So, we have:
from django.db import connections
my_db_alias = profile.dbname #in your situation
cursor = connections[my_db_alias].cursor()
# Your code goes here...
For more information: https://docs.djangoproject.com/en/dev/topics/db/sql/#executing-custom-sql-directly