Discussion:
Setting Up Django on Vista and Creating a Database
John Antony
2008-11-11 06:40:18 UTC
Permalink
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded from www.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
on typing the following command in command prompt I get this error:

D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.

If I use the Python (command line) found in Start>All Programs>Python
2.6
D:\Python26\Django-1.0\Django-1.0>python setup.py install
File "<stdin>", line 1

How do i install Django on my system..??

Also post intallation I wish to create a Database with username and
password all with the same name ie "myforum"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Marcelo Barbero
2008-11-11 12:55:56 UTC
Permalink
Have you tried to install into c:\python26 instead of d:\python26 ?
Post by John Antony
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded from www.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.
If I use the Python (command line) found in Start>All Programs>Python
2.6
Post by John Antony
D:\Python26\Django-1.0\Django-1.0>python setup.py install
File "<stdin>", line 1
How do i install Django on my system..??
Also post intallation I wish to create a Database with username and
password all with the same name ie "myforum"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Steve Holden
2008-11-11 13:01:28 UTC
Permalink
Post by John Antony
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded from www.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.
If I use the Python (command line) found in Start>All Programs>Python
2.6
Post by John Antony
D:\Python26\Django-1.0\Django-1.0>python setup.py install
File "<stdin>", line 1
How do i install Django on my system..??
It seems you are suffering from a little confusion about the command in
the installation instructions.

When you see

D:\Python26\Django-1.0\Django-1.0>python setup.py install

in the instructions, the

D:\Python26\Django-1.0\Django-1.0>

part is intended to indicate that you are running a Windows command
shell for which the default drive/directory combination is currently as
given (and the assumption is that you have unpacked the Django
distribution into that directory). It's the standard prompt for a
windows command shell window. The command you enter is

python setup.py install

Since you obviously have Python installed already, you may benefit from
reading

http://www.python.org/doc/faq/windows/

but bear in mind that Start>All Programs>Python 2.6

brings up a Python interpreter inside a Windows command shell, not a
bare Windows command shell (which is what you need).
Post by John Antony
Also post intallation I wish to create a Database with username and
password all with the same name ie "myforum"
This is really dependent on the database platform you are planning to
use, and not specifically a Django-related question anyway, though it's
related enough that I am sure that others on this list will be happy to
give you advice once you enlighten us about your choice of database.

Good luck with Django!

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Steve Holden
2008-11-11 13:07:35 UTC
Permalink
Post by John Antony
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded from www.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.
Sorry, I read the first half of your answer a little too quickly. Try

D:\Python26\python setup.py install

or just make sure that D:\Python26\ is added to your path (assuming
that's where you installed Python).

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Karen Tracey
2008-11-11 13:19:26 UTC
Permalink
Post by John Antony
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded from www.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.
The Python installer did not put the directory containing the python.exe
executable in the Windows PATH environment variable. That is why all the
Django instructions for Windows generally drop the 'python' from such
commands, since on Windows usually all you can count on when writing
instructions is that the Python installer set up an association between
'.py' files and the python executable. So, if you drop the python from the
front of the command, that should work.

However, I have heard reports that the association created by the Python 2.6
installer on Vista is broken, see here:

http://groups.google.com/group/django-users/msg/1d00809e826fa8c3

So, you may need to fix that as described in that message.

You can also put the path to python.exe in your Windows system path, so that
you can use the 'python whatever' form of commands. In older versions of
Windows you would do that by going to Start->Settings->Control Panel,
choosing "System", selecting the "Advanced" tab, clicking on "Environment
Variables", and finding/editing the one for PATH. I do not know if that has
changed in Vista.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
John Antony
2008-11-13 03:40:27 UTC
Permalink
I have now used all your suggestions..
1) Installed in C:\Python25\ (Marcelo Barbero)
2)Installed Python 2.5 instead of Python 2.6 (Karen Tracey)
and finally
3)Added the environment variables in "path" (not PATH, should i create
a new one named PATH????) for both django and python.

I installed django and postgreSQL following it stepwise from

http://thinkhole.org/wp/django-on-windows/

but however....
now when i reach the command of testing django i still am getting the
following error

C:\Python25\Lib\site-packages\django>django-admin.py startproject
testproject
'django-admin.py' is not recognized as an internal or external

command,
operable program or batch file.


what sholud i do now....????
Post by Karen Tracey
Post by John Antony
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded fromwww.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.
The Python installer did not put the directory containing the python.exe
executable in the Windows PATH environment variable.  That is why all the
Django instructions for Windows generally drop the 'python' from such
commands, since on Windows usually all you can count on when writing
instructions is that the Python installer set up an association between
'.py' files and the python executable.  So, if you drop the python from the
front of the command, that should work.
However, I have heard reports that the association created by the Python 2.6
http://groups.google.com/group/django-users/msg/1d00809e826fa8c3
So, you may need to fix that as described in that message.
You can also put the path to python.exe in your Windows system path, so that
you can use the 'python whatever' form of commands.  In older versions of
Windows you would do that by going to Start->Settings->Control Panel,
choosing "System", selecting the "Advanced" tab, clicking on "Environment
Variables", and finding/editing the one for PATH.  I do not know if that has
changed in Vista.
Karen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Marcelo Barbero
2008-11-13 12:30:04 UTC
Permalink
You should search where your django-admin.py file is and include that
folder to your path environment variable.

But if you installed Django using the "python setup.py install"
command, the file must be in your Scripts directory under the Python
directory. Have you installed Django with "python setup.py install"?

Marcelo
Post by John Antony
I have now used all your suggestions..
1) Installed in C:\Python25\ (Marcelo Barbero)
2)Installed Python 2.5 instead of Python 2.6 (Karen Tracey)
and finally
3)Added the environment variables in "path" (not PATH, should i create
a new one named PATH????) for both django and python.
I installed django and postgreSQL following it stepwise from
http://thinkhole.org/wp/django-on-windows/
but however....
now when i reach the command of testing django i still am getting the
following error
C:\Python25\Lib\site-packages\django>django-admin.py startproject
testproject
'django-admin.py' is not recognized as an internal or external
command,
operable program or batch file.
what sholud i do now....????
Post by Karen Tracey
Post by John Antony
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded fromwww.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.
The Python installer did not put the directory containing the python.exe
executable in the Windows PATH environment variable. That is why all the
Django instructions for Windows generally drop the 'python' from such
commands, since on Windows usually all you can count on when writing
instructions is that the Python installer set up an association between
'.py' files and the python executable. So, if you drop the python from the
front of the command, that should work.
However, I have heard reports that the association created by the Python 2.6
http://groups.google.com/group/django-users/msg/1d00809e826fa8c3
So, you may need to fix that as described in that message.
You can also put the path to python.exe in your Windows system path, so that
you can use the 'python whatever' form of commands. In older versions of
Windows you would do that by going to Start->Settings->Control Panel,
choosing "System", selecting the "Advanced" tab, clicking on "Environment
Variables", and finding/editing the one for PATH. I do not know if that has
changed in Vista.
Karen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Danny R
2008-11-13 16:59:15 UTC
Permalink
John,

Setting the paths in Vista is quirky. I also cannot make it work.

As a workaround whenever I open a new command prompt, i do the
following command:

set path=C:\Python25\Lib\site-packages\django\bin\;C:
\Python25\

then, when i create an app or a project, i do this instead:

python C:\Python25\Lib\site-packages\django\bin\django-
admin.py startproject djangoapps
Post by John Antony
I have now used all your suggestions..
1) Installed in C:\Python25\ (Marcelo Barbero)
2)Installed Python 2.5 instead of Python 2.6 (Karen Tracey)
and finally
3)Added the environment variables in "path" (not PATH, should i create
a new one named PATH????) for both django and python.
I installed django and postgreSQL following it stepwise from
http://thinkhole.org/wp/django-on-windows/
but however....
now when i reach the command of testing django i still am getting the
following error
C:\Python25\Lib\site-packages\django>django-admin.py startproject
testproject
'django-admin.py' is not recognized as an internal or external
command,
operable program or batch file.
what sholud i do now....????
Post by Karen Tracey
Post by John Antony
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded fromwww.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.
The Python installer did not put the directory containing the python.exe
executable in the Windows PATH environment variable.  That is why all the
Django instructions for Windows generally drop the 'python' from such
commands, since on Windows usually all you can count on when writing
instructions is that the Python installer set up an association between
'.py' files and the python executable.  So, if you drop the python from the
front of the command, that should work.
However, I have heard reports that the association created by the Python 2.6
http://groups.google.com/group/django-users/msg/1d00809e826fa8c3
So, you may need to fix that as described in that message.
You can also put the path to python.exe in your Windows system path, so that
you can use the 'python whatever' form of commands.  In older versions of
Windows you would do that by going to Start->Settings->Control Panel,
choosing "System", selecting the "Advanced" tab, clicking on "Environment
Variables", and finding/editing the one for PATH.  I do not know if that has
changed in Vista.
Karen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
John Antony
2008-11-14 04:17:45 UTC
Permalink
Thank you Karen and Marcelo, I had actually not set the path for
"django-admin.py".
To set the Windows PATH in Vista click the following:
Start>Control Panel>System>Advanced System
Settings>Advanced>Environment Variable
Post by Danny R
John,
Setting the paths in Vista is quirky. I also cannot make it work.
As a workaround whenever I open a new command prompt, i do the
\Python25\
           python C:\Python25\Lib\site-packages\django\bin\django-
admin.py startproject djangoapps
Post by John Antony
I have now used all your suggestions..
1) Installed in C:\Python25\ (Marcelo Barbero)
2)Installed Python 2.5 instead of Python 2.6 (Karen Tracey)
and finally
3)Added the environment variables in "path" (not PATH, should i create
a new one named PATH????) for both django and python.
I installed django and postgreSQL following it stepwise from
http://thinkhole.org/wp/django-on-windows/
but however....
now when i reach the command of testing django i still am getting the
following error
C:\Python25\Lib\site-packages\django>django-admin.py startproject
testproject
'django-admin.py' is not recognized as an internal or external
command,
operable program or batch file.
what sholud i do now....????
Post by Karen Tracey
Post by John Antony
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded fromwww.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.
The Python installer did not put the directory containing the python.exe
executable in the Windows PATH environment variable.  That is why all the
Django instructions for Windows generally drop the 'python' from such
commands, since on Windows usually all you can count on when writing
instructions is that the Python installer set up an association between
'.py' files and the python executable.  So, if you drop the python from the
front of the command, that should work.
However, I have heard reports that the association created by the Python 2.6
http://groups.google.com/group/django-users/msg/1d00809e826fa8c3
So, you may need to fix that as described in that message.
You can also put the path to python.exe in your Windows system path, so that
you can use the 'python whatever' form of commands.  In older versions of
Windows you would do that by going to Start->Settings->Control Panel,
choosing "System", selecting the "Advanced" tab, clicking on "Environment
Variables", and finding/editing the one for PATH.  I do not know if that has
changed in Vista.
Karen- Hide quoted text -
- Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
John Antony
2008-11-17 08:13:36 UTC
Permalink
I have currently created a database with the following details:
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'myforum'
DATABASE_USER = 'root'
DATABASE_PASSWORD = 'myforum'
DATABASE_HOST = 'localhost'
DATABASE_PORT = ''

I used phpMyadmin to create the database

I have updated C:\projects\myforum\settings.py in the similar
fashion....

However when i run the the following command i get:

C:\projects\myforum>python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at
0x027CC670>
Traceback (most recent call last):
File "C:\Python26\Lib\site-packages\django\core\management\commands
\runserver.
py", line 48, in inner_run
self.validate(display_num_errors=True)
File "C:\Python26\Lib\site-packages\django\core\management\base.py",
line 122,
in validate
num_errors = get_validation_errors(s, app)
File "C:\Python26\Lib\site-packages\django\core\management
\validation.py", lin
e 22, in get_validation_errors
from django.db import models, connection
File "C:\Python26\Lib\site-packages\django\db\__init__.py", line 34,
in <modul
e>
(settings.DATABASE_ENGINE, ", ".join(map(repr,
available_backends)), e_user)

django.core.exceptions.ImproperlyConfigured: 'MySQL' isn't an
available database
backend. Available options are: 'dummy', 'mysql', 'oracle',
'postgresql', 'post
gresql_psycopg2', 'sqlite3'
Error was: No module named MySQL.base

Was my update in "settings.py" right....????
what do i do...??
Post by John Antony
Thank you Karen and Marcelo, I had actually not set the path for
"django-admin.py".
Start>Control Panel>System>Advanced System
Settings>Advanced>Environment Variable
Post by Danny R
John,
Setting the paths in Vista is quirky. I also cannot make it work.
As a workaround whenever I open a new command prompt, i do the
\Python25\
           python C:\Python25\Lib\site-packages\django\bin\django-
admin.py startproject djangoapps
Post by John Antony
I have now used all your suggestions..
1) Installed in C:\Python25\ (Marcelo Barbero)
2)Installed Python 2.5 instead of Python 2.6 (Karen Tracey)
and finally
3)Added the environment variables in "path" (not PATH, should i create
a new one named PATH????) for both django and python.
I installed django and postgreSQL following it stepwise from
http://thinkhole.org/wp/django-on-windows/
but however....
now when i reach the command of testing django i still am getting the
following error
C:\Python25\Lib\site-packages\django>django-admin.py startproject
testproject
'django-admin.py' is not recognized as an internal or external
command,
operable program or batch file.
what sholud i do now....????
Post by Karen Tracey
Post by John Antony
I am currently using Vista OS
I have installed Python in the path
D:\Python26\
and extracted the tarred file downloaded fromwww.djangoprojects.com
ie "Django-1.0.tar.gz" in the path
D:\Python26\Django-1.0\Django-1.0
I am however unable to intall Django
D:\Python26\Django-1.0\Django-1.0>python setup.py install
'python' is not recognized as an internal or external command,
operable program or batch file.
The Python installer did not put the directory containing the python.exe
executable in the Windows PATH environment variable.  That is why all the
Django instructions for Windows generally drop the 'python' from such
commands, since on Windows usually all you can count on when writing
instructions is that the Python installer set up an association between
'.py' files and the python executable.  So, if you drop the python from the
front of the command, that should work.
However, I have heard reports that the association created by the Python 2.6
http://groups.google.com/group/django-users/msg/1d00809e826fa8c3
So, you may need to fix that as described in that message.
You can also put the path to python.exe in your Windows system path, so that
you can use the 'python whatever' form of commands.  In older versions of
Windows you would do that by going to Start->Settings->Control Panel,
choosing "System", selecting the "Advanced" tab, clicking on "Environment
Variables", and finding/editing the one for PATH.  I do not know if that has
changed in Vista.
Karen- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Karen Tracey
2008-11-17 11:41:36 UTC
Permalink
Post by John Antony
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'myforum'
DATABASE_USER = 'root'
DATABASE_PASSWORD = 'myforum'
DATABASE_HOST = 'localhost'
DATABASE_PORT = ''
Is this a cut and paste from your actual setting files? Because that
setting for DATABASE_ENGINE -- all lowercase mysql -- is correct.
Post by John Antony
I used phpMyadmin to create the database
I have updated C:\projects\myforum\settings.py in the similar
fashion....
C:\projects\myforum>python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at
0x027CC670>
File "C:\Python26\Lib\site-packages\django\core\management\commands
\runserver.
py", line 48, in inner_run
self.validate(display_num_errors=True)
File "C:\Python26\Lib\site-packages\django\core\management\base.py",
line 122,
in validate
num_errors = get_validation_errors(s, app)
File "C:\Python26\Lib\site-packages\django\core\management
\validation.py", lin
e 22, in get_validation_errors
from django.db import models, connection
File "C:\Python26\Lib\site-packages\django\db\__init__.py", line 34,
in <modul
e>
(settings.DATABASE_ENGINE, ", ".join(map(repr,
available_backends)), e_user)
django.core.exceptions.ImproperlyConfigured: 'MySQL' isn't an
available database
backend. Available options are: 'dummy', 'mysql', 'oracle',
'postgresql', 'post
gresql_psycopg2', 'sqlite3'
Error was: No module named MySQL.base
Whereas what this is saying is that you have 'MySQL' set as your
DATABASE_ENGINE, and that is not correct. Case matters. What you have in
your settings file needs to be all lower case for the DATABASE_ENGINE
setting.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Peter Herndon
2008-11-17 19:11:48 UTC
Permalink
The other thing that comes to mind is, have you installed the MySQLdb
python library? If you want to connect to a database from a Python
app, you must also install a library that bridges Python and the
database.

(I apologize in advance if you've already done so).

---Peter
Post by Karen Tracey
Post by John Antony
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'myforum'
DATABASE_USER = 'root'
DATABASE_PASSWORD = 'myforum'
DATABASE_HOST = 'localhost'
DATABASE_PORT = ''
Is this a cut and paste from your actual setting files? Because that
setting for DATABASE_ENGINE -- all lowercase mysql -- is correct.
Post by John Antony
I used phpMyadmin to create the database
I have updated C:\projects\myforum\settings.py in the similar
fashion....
C:\projects\myforum>python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at
0x027CC670>
File "C:\Python26\Lib\site-packages\django\core\management\commands
\runserver.
py", line 48, in inner_run
self.validate(display_num_errors=True)
File "C:\Python26\Lib\site-packages\django\core\management\base.py",
line 122,
in validate
num_errors = get_validation_errors(s, app)
File "C:\Python26\Lib\site-packages\django\core\management
\validation.py", lin
e 22, in get_validation_errors
from django.db import models, connection
File "C:\Python26\Lib\site-packages\django\db\__init__.py", line 34,
in <modul
e>
(settings.DATABASE_ENGINE, ", ".join(map(repr,
available_backends)), e_user)
django.core.exceptions.ImproperlyConfigured: 'MySQL' isn't an
available database
backend. Available options are: 'dummy', 'mysql', 'oracle',
'postgresql', 'post
gresql_psycopg2', 'sqlite3'
Error was: No module named MySQL.base
Whereas what this is saying is that you have 'MySQL' set as your
DATABASE_ENGINE, and that is not correct. Case matters. What you have in
your settings file needs to be all lower case for the DATABASE_ENGINE
setting.
Karen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
John Antony
2008-11-18 09:07:22 UTC
Permalink
hey thanks peter..I did not know abt MySQLdb....got it now...

John
Post by Peter Herndon
The other thing that comes to mind is, have you installed the MySQLdb
python library?  If you want to connect to a database from a Python
app, you must also install a library that bridges Python and the
database.
(I apologize in advance if you've already done so).
---Peter
Post by John Antony
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'myforum'
DATABASE_USER = 'root'
DATABASE_PASSWORD = 'myforum'
DATABASE_HOST = 'localhost'
DATABASE_PORT = ''
Is this a cut and paste from your actual setting files?  Because that
setting for DATABASE_ENGINE -- all lowercase mysql -- is correct.
Post by John Antony
I used phpMyadmin to create the database
I have updated C:\projects\myforum\settings.py in the similar
fashion....
C:\projects\myforum>python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at
0x027CC670>
 File "C:\Python26\Lib\site-packages\django\core\management\commands
\runserver.
py", line 48, in inner_run
   self.validate(display_num_errors=True)
 File "C:\Python26\Lib\site-packages\django\core\management\base.py",
line 122,
 in validate
   num_errors = get_validation_errors(s, app)
 File "C:\Python26\Lib\site-packages\django\core\management
\validation.py", lin
e 22, in get_validation_errors
   from django.db import models, connection
 File "C:\Python26\Lib\site-packages\django\db\__init__.py", line 34,
in <modul
e>
   (settings.DATABASE_ENGINE, ", ".join(map(repr,
available_backends)), e_user)
django.core.exceptions.ImproperlyConfigured: 'MySQL' isn't an
available database
 backend. Available options are: 'dummy', 'mysql', 'oracle',
'postgresql', 'post
gresql_psycopg2', 'sqlite3'
Error was: No module named MySQL.base
Whereas what this is saying is that you have 'MySQL' set as your
DATABASE_ENGINE, and that is not correct.  Case matters.  What you have in
your settings file needs to be all lower case for the DATABASE_ENGINE
setting.
Karen- Hide quoted text -
- Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Continue reading on narkive:
Loading...