Install mysql-python (Windows)

You’re going to want to add Python to your Path Environment Variable in this way. Go to: My Computer System Properties Advance System Settings Under the “Advanced” tab click the button that says “Environment Variables” Then under System Variables you are going to want to add / change the following variables: PYTHONPATH and Path. Here is a paste … Read more

is not JSON serializable

It’s worth noting that the QuerySet.values_list() method doesn’t actually return a list, but an object of type django.db.models.query.ValuesListQuerySet, in order to maintain Django’s goal of lazy evaluation, i.e. the DB query required to generate the ‘list’ isn’t actually performed until the object is evaluated. Somewhat irritatingly, though, this object has a custom __repr__ method which makes it look like a … Read more

How to check Django version

Django 1.5 supports Python 2.6.5 and later. If you’re under Linux and want to check the Python version you’re using, run python -V from the command line. If you want to check the Django version, open a Python console and type

No module named MySQLdb

You need to use one of the following commands. Which one depends on what OS and software you have and use. easy_install mysql-python (mix os) pip install mysql-python (mix os/ python 2) pip install mysqlclient (mix os/ python 3) apt-get install python-mysqldb (Linux Ubuntu, …) cd /usr/ports/databases/py-MySQLdb && make install clean (FreeBSD) yum install MySQL-python (Linux Fedora, CentOS …) For Windows, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)