Code

Opened 8 years ago

Closed 7 years ago

#1791 closed enhancement (fixed)

Application dependencies should be documented

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

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

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by Esaj

  • Resolution set to invalid
  • Status changed from new to closed

That's because flatpages depends on sites.

comment:2 Changed 8 years ago by eugene@…

  • Component changed from Core framework to Documentation
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Summary changed from django.contrib.flatpages does not install if django.contrib.sites is not installed to Application dependencies should be documented
  • Type changed from defect to enhancement

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 Changed 7 years ago by Michael Radziej <mir@…>

  • Triage Stage changed from Unreviewed to Accepted

comment:4 Changed 7 years ago by jacob

  • Resolution set to fixed
  • Status changed from reopened to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.