Skip to content

A way to use a field as basetext on a LinkColumn.#23

Open
mpena2099 wants to merge 2 commits intoshymonk:masterfrom
mpena2099:master
Open

A way to use a field as basetext on a LinkColumn.#23
mpena2099 wants to merge 2 commits intoshymonk:masterfrom
mpena2099:master

Conversation

@mpena2099
Copy link

I'm not sure if it is really necessary but...

@shymonk
Copy link
Owner

shymonk commented Oct 25, 2015

What's the purpose of your modification?

@mpena2099
Copy link
Author

Do something like that:

class CostumerTable(Table):
    id = Column(field='id', header='Costumer ID')
    name = LinkColumn(field='name', 
                                        header='Name',
                                        links=[
                                                        Link(viewname='partners_backend:change_costumer', args=[A('id')])
                                                    ]
                                        )   
    email = Column(field='username', header='E-mail')
    date_of_birth = Column(field='date_of_birth', header='Date of birth')
    phone = Column(field='phone', header='Phone')

    class Meta:
        model = CostumerProfile
        ajax = True     

Without it "None" is displayed in place of field's value...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants