Opened 7 years ago

Closed 7 years ago

#6676 closed (worksforme)

Docs for what goes in DATABASE_ENGINE is wrong

Reported by: HM Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: settings, database
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

According to settings.txt,

In the Django development version, you can use a database backend that doesn’t 
ship with Django by setting DATABASE_ENGINE to a fully-qualified path (i.e. 
mypackage.backends.whatever). Writing a whole new database backend from
scratch is left as an exercise to the reader; see the other backends for examples.

However, attempting to do this leads to:

  ..
  File "/usr/lib/python2.5/site-packages/django/db/__init__.py", line 32, in <module>
    (settings.DATABASE_ENGINE, ", ".join(map(repr, available_backends)))
django.core.exceptions.ImproperlyConfigured: 'extra.backends.psycopg2_sequencesafe' isn't 
an available database backend. Available options are: 'ado_mssql', 'dummy', 'mysql', 
'mysql_old', 'oracle', 'postgresql', 'postgresql_psycopg2', 'sqlite3'

as of trunk version 7167. See also ticket #1946

Change History (1)

comment:1 Changed 7 years ago by ramiro

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed

Just tried with a bogus custom backend and I'm not getting this error (I'm getting another one but that's because it is composed of 0 byte-sized .py files, but it has alerady passed the backend importability validation point). Are you sure you are correctly adding your new backend's module path to the Python path? Are you creating the base module beneath it?.

As the docs say, see the other backend for examples, and may I add: "Use the source Luke": http://code.djangoproject.com/browser/django/trunk/django/db/__init__.py#L23

Note: See TracTickets for help on using tickets.
Back to Top