Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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