Changes between Version 4 and Version 5 of NewbieMistakes


Ignore:
Timestamp:
Aug 17, 2005, 9:22:19 AM (19 years ago)
Author:
rmunn@…
Comment:

Added hint about always adding repr() to models

Legend:

Unmodified
Added
Removed
Modified
  • NewbieMistakes

    v4 v5  
    1616
    1717Remove the include(). Just give the module and function name (e.g., {{{'myproject.apps.polls.views.polls.index'}}}) as a string, with no include() around it.
     18
     19
     20== Blank object names ==
     21
     22==== Symptom ====
     23
     24The automatic admin interface is showing nothing (or a single {{{ }}}) in the "Select [object_type] to change" view.
     25
     26==== Probable cause ====
     27
     28You may have forgotten to create a {{{__repr__()}}} function for your model. Django calls {{{__repr__()}}} to find out how to display objects in the admin interface.
     29
     30==== Solution ====
     31
     32Add a {{{__repr__()}}} function to all your models. Make it a habit so it becomes automatic.
Back to Top