#14820: Use `TextField` instead of `PositiveIntegerField` in docs and examples 
for
generic relations.
-----------------------------------------+----------------------------------
               Reporter:  mrmachine      |         Owner:                       
                                                    
                 Status:  new            |     Milestone:  1.3                  
                                                    
              Component:  Documentation  |       Version:  SVN                  
                                                    
             Resolution:                 |      Keywords:  generic relation 
genericforeignkey object_id type textfield sprintdec2010
           Triage Stage:  Accepted       |     Has patch:  1                    
                                                    
    Needs documentation:  0              |   Needs tests:  0                    
                                                    
Patch needs improvement:  0              |  
-----------------------------------------+----------------------------------

Comment (by russellm):

 The compromise is to say, in no uncertain terms, "there's no such thing as
 a right answer here". Generic foreign keys are, by their very nature,
 hideously inefficient. It is absolutely application dependent what
 constitutes an 'appropriate' datatype, or an appropriate size if a
 CharField is warranted. I don't think we can do any better than to say
 "These examples use a PositiveIntegerField, which will be sufficient for
 storing any normal Django model with an integer primary key. However, you
 need to check your own requirements..."

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14820#comment:15>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to