Opened 13 months ago

Closed 12 months ago

Last modified 12 months 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 timgraham 13 months ago.

Download all attachments as: .zip

Change History (6)

Changed 13 months ago by timgraham

comment:1 Changed 13 months ago by timgraham

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Does the attached patch make sense to you?

comment:2 Changed 12 months ago by Tim Graham <timograham@…>

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

In a76aab3583a0bcd5bc48f3a8c9a93ab420a75eec:

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

comment:3 Changed 12 months ago by Tim Graham <timograham@…>

In 4684464b354951c94b81d0bb25741ceb5c3e75e1:

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

Backport of a76aab3583 from master

comment:4 Changed 12 months ago by Tim Graham <timograham@…>

In c19c7c192c1cdbfa29cc4a33fdc6f0c0bb477e86:

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

Backport of a76aab3583 from master

comment:5 Changed 12 months ago by Tim Graham <timograham@…>

In a76aab3583a0bcd5bc48f3a8c9a93ab420a75eec:

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

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