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

Table data row onclick redirect to new page #35

Closed
liushu2000 opened this issue Jan 7, 2014 · 1 comment
Closed

Table data row onclick redirect to new page #35

liushu2000 opened this issue Jan 7, 2014 · 1 comment

Comments

@liushu2000
Copy link

Although the previous issue has been closed, but don't think it answered my question in the documentation.
I don't want the inline editing, but a click on the row, to redirect to another page or op up the new page.

Kind regards

@tiliv
Copy link
Contributor

tiliv commented Jun 14, 2014

I apologize that this went unanswered. I believe this is only a matter of returning the appropriate HTML string for the column data:

def get_column_Name_data(self, instance, *args, **kwargs):
    url = instance.get_absolute_url()
    text = unicode(instance)
    return """<a href="{href}" target="_blank">{text}</a>""".format(href=url, text=text)

@tiliv tiliv closed this as completed Jun 14, 2014
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

No branches or pull requests

2 participants