My two models are below,
class Customer(models.Model):
name = models.CharField(maxlength=100)
service = models.CharField(max_length=20,blank=True, default=4,
choices=SERVICE_CODES)
company = models.CharField(core=True,max_length=20,blank=True,
default=4, choices=CUSTOMER_TYPES)
email = models.CharField(blank=True, maxlength=100)
phone_number = models.CharField(blank=True, maxlength=100)
phone_number2 = models.CharField(blank=True, maxlength=100)
IP_address = models.CharField(blank=True, maxlength=100)
submitted_date = models.DateField(auto_now_add=True)
modified_date = models.DateField(auto_now=True)
description = models.TextField(blank=True)
class Admin:
list_display = ('name', 'service', 'phone_number',
'IP_address', 'company', 'email', 'modified_date')
list_filter = ('service', 'company')
search_fields = ('name',
'description','email','phone_number','IP_address')
class Meta:
ordering = ('service', 'submitted_date', 'name')
def __str__(self):
return self.name
class Issue(models.Model):
issue = models.TextField(blank=True,core=True)
date = models.DateField()
customer = models.ForeignKey(Customer,
edit_inline=models.TABULAR,related_name="Customer")
def __unicode__(self):
return self.issue
class Meta:
ordering = ('issue',)
On Dec 19, 5:31 pm, mike <[EMAIL PROTECTED]> wrote:
> Hello, I have built an entry form using
> django.views.generic.list_detail much like the one shown
> here,http://blog.michaeltrier.com/2007/11/23/getting-started-with-newforms
>
> The only problem is my model has a foreign key that uses edit_inline.
> Can anyone point me in the right direction how to get this to also
> display on my form?
>
> thx in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---