I got it to work and the project to be created. Thanks Dennis for your
suggestion. I am getting problems trying to sync db. My settings files
are as follows:
DATABASE_ENGINE = 'postgresql' # 'postgresql_psycopg2',
'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'postgres' # Or path to database file if
using sqlite3.
DATABASE_USER = 'postgres' # Not used with sqlite3.
DATABASE_PASSWORD = 'password' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost.
Not used with sqlite3.
DATABASE_PORT = '5432' # Set to empty string for default.
Not used with sqlite3.
I can connect to the database if I can configure a Java JDBC
datasource. I can even execute queries but Python returns an error
message that "No module named psycopg". I have psycopg2 module
installed. Is there a way to change this? I am on views and UrlConfs
chapter and there has been no mention on changing the module
configuration.
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "C:\tools\Python26\lib\site-packages\django\core\management
\__init__.py",
line 362, in execute_manager
utility.execute()
File "C:\tools\Python26\lib\site-packages\django\core\management
\__init__.py",
line 303, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\tools\Python26\lib\site-packages\django\core\management
\base.py", lin
e 195, in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\tools\Python26\lib\site-packages\django\core\management
\base.py", lin
e 221, in execute
self.validate()
File "C:\tools\Python26\lib\site-packages\django\core\management
\base.py", lin
e 249, in validate
num_errors = get_validation_errors(s, app)
File "C:\tools\Python26\lib\site-packages\django\core\management
\validation.py
", line 22, in get_validation_errors
from django.db import models, connection
File "C:\tools\Python26\lib\site-packages\django\db\__init__.py",
line 41, in
<module>
backend = load_backend(settings.DATABASE_ENGINE)
File "C:\tools\Python26\lib\site-packages\django\db\__init__.py",
line 17, in
load_backend
return import_module('.base', 'django.db.backends.%s' %
backend_name)
File "C:\tools\Python26\lib\site-packages\django\utils
\importlib.py", line 35,
in import_module
__import__(name)
File "C:\tools\Python26\lib\site-packages\django\db\backends
\postgresql\base.p
y", line 20, in <module>
raise ImproperlyConfigured("Error loading psycopg module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg
module: No mo
dule named psycopg
On Apr 5, 12:54 pm, Dennis Kaarsemaker <[email protected]> wrote:
> On ma, 2010-04-05 at 12:38 -0700, Kartik wrote:
>
> > python django-admin.py startproject django-test
> > python: can't open file 'django-admin.py': [Errno 2] No such file or
> > directory
>
> python c:\where\django\lives\django-admin.py startproject myproject
>
> (Don't put dashes in your projectname. It should be a valid python
> identifier.)
>
> --
> Dennis K.
>
> They've gone to plaid!
--
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.