class Customer(meta.Model):
name = meta.CharField(maxlength=50)
class META:
admin = meta.Admin()
When I fire up the admin interface, everything looks good, I can get an
"add customer" form, but when I save a customer, the message is "The
customer "" was added successfully. You may add another customer
below."
When I go to the customer list, all the customer names are blank.
Looking at the source, it looks like:
<table cellspacing="0">
<thead>
<tr>
<th>Customer</th></tr>
</thead>
<tr class="row1">
<th><a href="2/"> </a></th></tr>
<tr class="row2">
<th><a href="1/"> </a></th></tr>
</table>
The customers have been added to the database, but the names aren't
showing up.
(One more thing -- the project was created with an svn checkout from
before the Admin change, which had then been "svn update"-ed to rev
1208. I had to go in and delete the .pyc files from templatetags to
get the admin interface to work at all. I have since trashed my
working copy and just grabbed a fresh checkout.)
Turns out that the __repr__ thing was the fix. I hadn't realized from
the tutorial that you needed __repr__ to make the admin interface work.
Thanks for the quick response! This is fun to work with!