Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23324 closed Cleanup/optimization (fixed)

sites framework docs - omits the site id from the Site model

Reported by: kiddhustle Owned by: nobody
Component: Documentation Version: 1.6
Severity: Normal Keywords: documentaion
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The documentation for the sites framework omits the site id from the model.

The site id is automatically added to the model by Django (the id attribute) but no where in the documentation does it say that the user can access the current site_id via the model, only the domain and name attributes are shown.

It took me a good hour or so of searching for a way to get the current site id, before realising that like most model an 'id' attribute would be created for the Site model by Django (after browsing the Django source code).

I should have guessed this earlier but it wasn't made obvious in the documentation.

https://docs.djangoproject.com/en/1.6/ref/contrib/sites/

Attachments (1)

23324.diff (665 bytes ) - added by Tim Graham 10 years ago.

Download all attachments as: .zip

Change History (6)

by Tim Graham, 10 years ago

Attachment: 23324.diff added

comment:1 by Tim Graham, 10 years ago

Has patch: set

Does the attached patch make sense to you?

comment:2 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In a76aab3583a0bcd5bc48f3a8c9a93ab420a75eec:

Fixed #23324 -- Mentioned Site.id in contrib.sites docs.

comment:3 by Tim Graham <timograham@…>, 10 years ago

In 4684464b354951c94b81d0bb25741ceb5c3e75e1:

[1.6.x] Fixed #23324 -- Mentioned Site.id in contrib.sites docs.

Backport of a76aab3583 from master

comment:4 by Tim Graham <timograham@…>, 10 years ago

In c19c7c192c1cdbfa29cc4a33fdc6f0c0bb477e86:

[1.7.x] Fixed #23324 -- Mentioned Site.id in contrib.sites docs.

Backport of a76aab3583 from master

comment:5 by Tim Graham <timograham@…>, 10 years ago

In a76aab3583a0bcd5bc48f3a8c9a93ab420a75eec:

Fixed #23324 -- Mentioned Site.id in contrib.sites docs.

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