0

I would appreciate it if you read my poor English

I use :

windows

Jython 2.7rc2

jdk-8u45

django 1.8

django-jython 1.7.0b2

I try jython startproject mysite, and succeed

then I try jython manage.py runserver 8080 and fail

Detail:

In settings.py :

     in DATABASES :
                     'ENGINE': 'doj.db.backends.sqlite3'
     in INSTALLED_APPS:
                      I add  'doj',

The same with https://pythonhosted.org/django-jython/index.html

The results:

raise ImproperlyConfigured(error_msg)django.core.exceptions.ImproperlyConfigured:'doj.db.backends.sqlite' isn't an a vailable database backend. Try using 'django.db.backends.XXX', where XXX is one of: u'base', u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3' Error was: cannot import name BaseDatabaseWrapper

so I try django.db.backends.sqlite instead of doj.db.backends.sqlite in settings.py at DATABASES

and unluckily:

raise ImproperlyConfigured("Error loading either pysqlite2
or sqlite3 modules (tried in that order): %s" % exc) django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named sqlite3

and I also try "doj.db.backends.postgresql_psycopg2" and failed ,too Error was: cannot import name BaseDatabaseWrapper

I have searched and try all day already but still can not solve.

thanks for your help!!!

fruit
  • 21
  • 4

1 Answers1

0

Jpython has same problems about sqlite3 here is similar question and answer.

sqlite3 module for Jython

Community
  • 1
  • 1
tanaydin
  • 4,692
  • 23
  • 42
  • and I also try "doj.db.backends.postgresql_psycopg2" and failed ,too Error was: cannot import name BaseDatabaseWrapper – fruit Apr 22 '15 at 15:12