Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added small bit to docs/sites.txt

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e3ac3bc074b0fe56af856adb41d8220cfe376fbb 1 parent 610cffe
Adrian Holovaty authored May 22, 2006

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  docs/sites.txt
5  docs/sites.txt
@@ -239,6 +239,11 @@ With this model, ``Photo.objects.all()`` will return all ``Photo`` objects in
239 239
 the database, but ``Photo.on_site.all()`` will return only the ``Photo``
240 240
 objects associated with the current site, according to the ``SITE_ID`` setting.
241 241
 
  242
+Put another way, these two statements are equivalent::
  243
+
  244
+    Photo.objects.filter(site=settings.SITE_ID)
  245
+    Photo.on_site.all()
  246
+
242 247
 How did ``CurrentSiteManager`` know which field of ``Photo`` was the ``Site``?
243 248
 It defaults to looking for a field called ``site``. If your model has a
244 249
 ``ForeignKey`` or ``ManyToManyField`` called something *other* than ``site``,

0 notes on commit e3ac3bc

Please sign in to comment.
Something went wrong with that request. Please try again.