~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to django/contrib/sites/managers.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-05-21 07:52:55 UTC
  • mfrom: (1.3.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20100521075255-ii78v1dyfmyu3uzx
Tags: upstream-1.2
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
            try:
15
15
                self.model._meta.get_field(self.__field_name)
16
16
            except FieldDoesNotExist:
17
 
                raise ValueError, "%s couldn't find a field named %s in %s." % \
18
 
                    (self.__class__.__name__, self.__field_name, self.model._meta.object_name)
 
17
                raise ValueError("%s couldn't find a field named %s in %s." % \
 
18
                    (self.__class__.__name__, self.__field_name, self.model._meta.object_name))
19
19
            self.__is_validated = True
20
20
        return super(CurrentSiteManager, self).get_query_set().filter(**{self.__field_name + '__id__exact': settings.SITE_ID})