Try models.STACKED then.
I'm guesing the task doesn't need to change the client, just show it?
If so, you could make a method that gets the client (return
self.project.client.name) and add that to the fields to list in admin
view.
Read up on
It doesn't solve.
The Task model have a lots of fields, can't go into models.TABULAR. Also
I want to list in Task Admin the fields: ('name', 'client', 'project',
'user')
I also have to list the open tasks associated to the logged user in the
home link.
Thanks,
Nuno
SmileyChris wrote:
>
Something like this:
- Task will show up under Project (I removed class Admin, added
edit_inline)
- Tasks don't need a client link probably, since they are linked to a
project already
class Client(models.Model):
name = models.CharField(maxlength=255)
[...]
def __str__(self):
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
4 matches
Mail list logo