I need in the Task form a select imput with: "Client - Project" for
selection.
How do i change my Task model to show in Admin and to save the project_id?
My models.py:
class Client(models.Model):
name = models.CharField(maxlength=255)
[...]
def __str__(self):
return self.nome
class Admin:
[...]
class Project(models.Model):
client = models.ForeignKey(Cliente)
name = models.CharField(maxlength=255)
[...]
def __str__(self):
return self.nome
class Admin:
[...]
class Task(models.Model):
project = models.ForeignKey(Projecto) ??????
user = models.ForeignKey(User)
client = ??????
title = models.CharField(maxlength=200)
def __str__(self):
return self.title
class Admin:
[...]
Thanks,
Nuno
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---