Tagged Questions
0
votes
2answers
19 views
Connector/python executemany NoneType
I have a little problem with Connector/python executing insert query.
I have function to insert data into database. Argument data is list of tuples:
[(2652884, 'http://www.example.com/', ...
1
vote
2answers
49 views
MySQL password in Django
I just started on a Django project and in the settings.py file of the project, the daabase section looks like this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add ...
0
votes
0answers
21 views
python login with mysql error
I would like to develop a login system using python and mysql.
I wonder how to implement where my login credential will match the username and password that store in the mysql database.
Once match , ...
0
votes
1answer
20 views
Do I need MySQL installed on my local PC to use MySQLdb for Python to connect MySQL server remotely?
I'm trying to use python for manipulating some data in MySQL DB.
DB is on a remote PC. And I will use another PC with Python to connect to the DB.
When I searched how to install MySQLdb module to ...
-1
votes
1answer
31 views
Connector/python select after insert
I have a database table with UNIQUE key. If I want to insert some record there are two possible ways. First, the unique item doesn't exist yet, that's OK, just return new id. Second, the item already ...
0
votes
1answer
17 views
Getting correct utf8 Chinese characters from messed-up iso-8859-1 in Python and MySQL
I have a large MySQL table filled with Chinese characters in messed-up encoding. I believe they were supposed to be encoded in latin1 (iso-8859-1), but I just can't find a way to get the Chinese ...
0
votes
3answers
30 views
Data Calculations MySQL vs Python
I'm trying to understand which of the following is a better option:
Data calculation using Python from the output of a MySQL query.
Perform the calculations in the query itself.
For example, the ...
0
votes
1answer
34 views
Fetch data from two tables Python
Hi i need to fetch data from two tables the Id of first in the foreign key for other
this is my code
def allplayers(request):
cursor = connection.cursor()
player_list = ...
-3
votes
2answers
49 views
a web browser for testing scripts locally, not for internet access? [on hold]
Imagine being able to run a mod-wsgi script in a web browser that isn't Firefox, or Chrome, etc..
Your mind no longer feels like it is owned by Google Inc.
Which means if you are working on ...
0
votes
0answers
26 views
Exists a nice python wsgi to manage MYSQL database locally ? or must i code one myself?
PHPmyAdmin is a script that is extremely crowded and not logical.
Webmin is controlled by google inc and thus they can virus you.
i need to manage MYSQL database in a basic way.
i am thinking a nice ...
2
votes
0answers
83 views
django bulk create ignore duplicates
I'm trying to bulk insert into a MySQL db for a very large dataset and would love to use django's bulk_create while ignoring duplicate errors.
Sample model:
class MyModel(models.Model):
...
2
votes
2answers
3k views
Install mysql-python return error in CentOs
I want to run a django project on CentOs. I tried to install mysql-python by easy_install and pip but I got error with both of them. I Googled the problem and found some suggestions, but none of them ...
2
votes
2answers
555 views
Connect to two databases
I want to connect to two databases using Python and, later on, use tables from both of the databases. How can I do this? Is the following code correct?
con = mdb.connect(host=MY_HOST, user=MY_USER, ...
4
votes
2answers
865 views
How to Pickle a python dictionary into MySQL?
I looked through several SO-Questions for how to pickle a python object and store it into a database. The information I collected is:
import pickle or import cpickle. Import the latter, if ...
101
votes
7answers
73k views
Getting “Error loading MySQLdb module: No module named MySQLdb” - have tried previously posted solutions
This is a much discussed issue for OSX 10.6 users, but I haven't been able to find a solution that works. Here's my setup:
Python 2.6.1 64bit
Django 1.2.1
MySQL 5.1.47 osx10.6 64bit
I create a ...