Django

Code

Show
Ignore:
Timestamp:
12/02/07 12:10:07 (9 months ago)
Author:
mtredinnick
Message:

Fixed #3323 -- More robust error handling for related objetcs. Thanks, Greg
Kopka and shaleh.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/modeltests/invalid_models/models.py

    r6590 r6835  
    108108    colour = models.CharField(max_length=5) 
    109109    model = models.ForeignKey(Model) 
     110 
     111class MissingRelations(models.Model): 
     112    rel1 = models.ForeignKey("Rel1") 
     113    rel2 = models.ManyToManyField("Rel2") 
    110114 
    111115model_errors = """invalid_models.fielderrors: "charfield": CharFields require a "max_length" attribute. 
     
    192196invalid_models.selfclashm2m: Reverse query name for m2m field 'm2m_3' clashes with field 'SelfClashM2M.selfclashm2m'. Add a related_name argument to the definition for 'm2m_3'. 
    193197invalid_models.selfclashm2m: Reverse query name for m2m field 'm2m_4' clashes with field 'SelfClashM2M.selfclashm2m'. Add a related_name argument to the definition for 'm2m_4'. 
     198invalid_models.missingrelations: 'rel2' has m2m relation with model Rel2, which has not been installed 
     199invalid_models.missingrelations: 'rel1' has relation with model Rel1, which has not been installed 
    194200"""