Opened 12 years ago
Last modified 12 years ago
#21386 closed Cleanup/optimization
admindocs 'views' section depends on SITE_ID setting — at Version 1
| Reported by: | Ramiro Morales | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admindocs | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Baptiste Mispelon, bouke@… | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
It seems the admindocs views try to detect if th sited contrib app is installed and avoid to use its features if it's not.
But in a couple of places it uses settings.SITE_ID and the new 1.6 default project template settings.py doesn't include it because the sites framework isn't installed.
Perhaps it could be replaced by 'django.contrib.sites.models.get_current_site(request)` as suggested by https://docs.djangoproject.com/en/1.6/ref/contrib/sites/#hooking-into-the-current-site-from-views?
Change History (1)
comment:1 by , 12 years ago
| Cc: | added |
|---|---|
| Description: | modified (diff) |
| Triage Stage: | Unreviewed → Accepted |
Yes.
This would also allow us to get rid of
admindocs.views.GenericSite(it seems it was used becausesites.models.RequestSitehadn't been implemented yet).