<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 09/19/2013 11:15 AM, John Gordon
      wrote:<br>
    </div>
    <blockquote cite="mid:l1fev6$k1v$1@reader1.panix.com" type="cite">
      <pre wrap="">In <a class="moz-txt-link-rfc2396E" href="mailto:mailman.154.1379606716.18130.python-list@python.org"><mailman.154.1379606716.18130.python-list@python.org></a> Gary Roach <a class="moz-txt-link-rfc2396E" href="mailto:gary719_list1@verizon.net"><gary719_list1@verizon.net></a> writes:

</pre>
      <blockquote type="cite">
        <pre wrap="">Installation of the django admin.py package worked fine. But. when I 
tried to add my database to the admin page I get the following error:
</pre>
      </blockquote>
      <pre wrap=""><small><small><small><small><small>    </small></small></small></small></small>ImportError at /admin/</pre>
    </blockquote>
      <br>
    <blockquote cite="mid:l1fev6$k1v$1@reader1.panix.com" type="cite">
      <pre wrap="">
Does /home/gary/ProgramFiles/mysite/mysite/models.py define an object
named 'membership'?

</pre>
    </blockquote>
    <small><small>Yes. The following is the top part of the models.py
        file: q<br>
        <br>
      </small></small>
    <blockquote><small><small>from __future__ import unicode_literals</small></small><br>
      <br>
      <small><small>from django.db import models</small></small><br>
      <br>
      <small>class Membership(models.Model):</small><br>
      <small>    id_membership = models.IntegerField(unique=True,
        primary_key=True)</small><br>
      <small>    first_name = models.CharField(max_length=20L,
        blank=True)</small><br>
      <small>    middle_name = models.CharField(max_length=20L,
        blank=True)</small><br>
      <small>    last_name = models.CharField(max_length=20L,
        blank=True)</small><br>
      <small>    born = models.DateField(null=True, blank=True)</small><br>
      <small>    born_date_accuracy = models.CharField(max_length=8L,
        blank=True)</small><br>
      <small>    died = models.DateField(null=True, blank=True)</small><br>
      <small>    died_date_accuracy = models.CharField(max_length=8L,
        blank=True)</small><br>
      <small>    photo_url = models.CharField(max_length=200L,
        db_column='photo_URL', blank=True) # Field name made lowercase.</small><br>
      <small>    class Meta:</small><br>
      <small>        db_table = 'membership'</small><br>
      <br>
      <small>class Address(models.Model):<br>
            id_address = models.IntegerField(unique=True,
        primary_key=True)<br>
            street = models.CharField(max_length=45L, blank=True)<br>
            city = models.CharField(max_length=45L, blank=True)<br>
            state = models.CharField(max_length=45L, blank=True)<br>
            class Meta:<br>
                db_table = 'address'<br>
        <br>
        class AddressHasMembership(models.Model):<br>
            address_id_address = models.ForeignKey(Address,
        db_column='address_id_address')<br>
            membership_id_membership = models.ForeignKey('Membership',
        db_column='membership_id_member<br>
        ship')<br>
            class Meta:<br>
                db_table = 'address_has_membership'<br>
      </small><br>
    </blockquote>
    <small>I hope this helps. Thanks for the reply<br>
      <br>
      Gary R</small><br>
    <blockquote><br>
    </blockquote>
    <br>
    <blockquote><br>
    </blockquote>
    <br>
    <br>
    <br>
  </body>
</html>