Opened 18 years ago

Closed 17 years ago

#1791 closed enhancement (fixed)

Application dependencies should be documented

Reported by: anonymous Owned by: Adrian Holovaty
Component: Documentation Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

svn At revision 2864.

MIDDLEWARE_CLASSES = (

"django.middleware.common.CommonMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.middleware.doc.XViewMiddleware",
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',

)

INSTALLED_APPS = (

'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',

# 'django.contrib.sites',

'django.contrib.admin',
'django.contrib.flatpages',
'mydjangoproject.customers',

)

error:
~/mydjangoproject$ python manage.py syncdb
Error: None couldn't be installed, because there were errors in your model:
flatpages.flatpage: 'sites' has m2m relation with uninstalled model Site

if I uncomment django.contrib.sites everything works

Change History (4)

comment:1 by Esaj, 18 years ago

Resolution: invalid
Status: newclosed

That's because flatpages depends on sites.

comment:2 by eugene@…, 18 years ago

Component: Core frameworkDocumentation
Resolution: invalid
Status: closedreopened
Summary: django.contrib.flatpages does not install if django.contrib.sites is not installedApplication dependencies should be documented
Type: defectenhancement

Application dependencies should be documented.

One more frequently occured dependency chain: django.contrib.admin depends on django.contrib.auth, and django.contrib.contenttypes. Attempts to run an app without them brings following errors (?):

Validating models...
admin.logentry: 'user' has relation with uninstalled model User
admin.logentry: 'content_type' has relation with uninstalled model ContentType
2 errors found.

I don't think this is an error per se, but it should be documented to reduce a confusion. For starters these error messages don't say anything about what additional applications are required.

comment:3 by Michael Radziej <mir@…>, 17 years ago

Triage Stage: UnreviewedAccepted

comment:4 by Jacob, 17 years ago

Resolution: fixed
Status: reopenedclosed

(In [5432]) Fixed #1791 - documented dependancies of contrib packages.

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