Django

Code

Show
Ignore:
Timestamp:
04/18/08 18:53:24 (9 months ago)
Author:
jkocherhans
Message:

newforms-admin: Merged from trunk up to [7435].

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/newforms-admin

    • Property svnmerge-integrated changed from /django/trunk:1-4345,4350-4357,4359-4365,4371-4372,4374-4377,4380-4386,4388,4390-4391,4400-4402,4404-4408,4410,4412-4419,4426-4427,4430-4432,4434,4441,4443-4444,4446-4447,4450,4452-4453,4455-4458,4476,4503,4546,4564-4569,4580-4586,4617,4630,4641-6390,6392-7377 to /django/trunk:1-4345,4350-4357,4359-4365,4371-4372,4374-4377,4380-4386,4388,4390-4391,4400-4402,4404-4408,4410,4412-4419,4426-4427,4430-4432,4434,4441,4443-4444,4446-4447,4450,4452-4453,4455-4458,4476,4503,4546,4564-4569,4580-4586,4617,4630,4641-6390,6392-7435
  • django/branches/newforms-admin/django/contrib/contenttypes/generic.py

    r7233 r7436  
    3636 
    3737    def instance_pre_init(self, signal, sender, args, kwargs): 
    38         # Handle initalizing an object with the generic FK instaed of 
    39         # content-type/object-id fields. 
     38        """ 
     39        Handles initializing an object with the generic FK instaed of 
     40        content-type/object-id fields. 
     41        """ 
    4042        if self.name in kwargs: 
    4143            value = kwargs.pop(self.name) 
     
    4446 
    4547    def get_content_type(self, obj=None, id=None): 
    46         # Convenience function using get_model avoids a circular import when using this model 
     48        # Convenience function using get_model avoids a circular import when 
     49        # using this model 
    4750        ContentType = get_model("contenttypes", "contenttype") 
    4851        if obj: 
     
    6265        except AttributeError: 
    6366            rel_obj = None 
    64              
     67 
    6568            # Make sure to use ContentType.objects.get_for_id() to ensure that 
    6669            # lookups are cached (see ticket #5570). This takes more code than 
    67             # the naive ``getattr(instance, self.ct_field)``, but has better  
     70            # the naive ``getattr(instance, self.ct_field)``, but has better 
    6871            # performance when dealing with GFKs in loops and such. 
    6972            f = self.model._meta.get_field(self.ct_field)