Hi there!
I searched over the internet, but can find a solution for what i need.
When i insert an inline model into another model on the django admin, it
does a pretty good job, showing all the foreign objects on the parent model,
with editable form for each object.
But that's way too much from what I want. I just want a simple list of the
object, linking to the objects change page.
In my dreams, django could have something like:
class AlunoInline(admin.TabularInlineOnlyLinks):
i tryed:
--------------- models.py
class Aluno(models.Model):
...
def AlunoAdminEdit(self):
return '<a href="/admin/app/model/object/%d/edit">edit this
object</a>' % (self.id)
--------------- admin.py
class AlunoInline(admin.TabularInline):
model = Aluno
fields = 'nome', 'comissao', 'AlunoAdminEdit'
extra = 1
But it didn't work...
I now, I am a newbie trying to do not so common stuff, but this is something
i would like to do, and also a test on django to see if I can customize the
admin the way i want it.
Can any good soul have a tip for me? If you are in Brazil, I even may pay
you a beer :)
Thank you!
Duda Nogueira
Consultor em TI
www.dudanogueira.com.br
Celular: +55 31 9985-1271
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---