Here is the basic model setup:

------------------
class Client(models.Model):
    fname    = models.CharField(maxlength=30)
    mname    = models.CharField(maxlength=30, blank=True, null=True)
    lname    = models.CharField(maxlength=30)
    [...and more details, but you get the point...]

class Address(models.Model):
    client   = models.ForeignKey(Client)
    address = models.CharField(maxlength=50)
    city     = models.CharField(maxlength=30, blank=True, null=True)
    state    = models.ForeignKey(State, blank=True, null=True)
    zip      = models.CharField(maxlength=20, blank=True, null=True)

class Phone(models.Model):
    PTYPES    = (
        ('h', 'Home',),
        ('e', 'Message',),
        ('m', 'Mobile',),
        ('o', 'Other',),
        ('w', 'Work',),
    )
    client    = models.ForeignKey(Client)
    pnumber   = models.CharField(maxlength=20)
    type      = models.CharField(maxlength=1, blank=True, null=True,
choices=PTYPES)
-------------------

Now, when I build a very simple create or update for these models
passing either the client_id or the object_id itself, the pages are
taking over a minute to load. When they finally appear, the page is
fine. What am I missing here?

This is one of the 'create' functions as an example:

-----------------
def address_add(request,client_id):
    from django.views.generic.create_update import create_object

    extra_context= {}

    return create_object (
        request,
        model=Address,
        extra_context=extra_context,
        template_name='main/client_address_ae.html',
        post_save_redirect='/client_detail/%s/' % (client_id,),
    )
-----------------


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

Reply via email to