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

Documentation Missing Params Example #1059

Open
obinoob opened this issue Nov 15, 2017 · 0 comments
Open

Documentation Missing Params Example #1059

obinoob opened this issue Nov 15, 2017 · 0 comments

Comments

@obinoob
Copy link

obinoob commented Nov 15, 2017

Hi,

First of thank you so much for such a great library.

I had a lot of troubles finding a solution to send a CRSF token along with data. This is my solution and I'm sure that other users would appreciate an example exposing on how to do it. Not saying that it is difficult but it is missing in documentation. Perhaps you could improve this code, hope you can include it.

Thank you again,

$('.editable-filter').editable({
    type: 'text',
    url: '/controller/action/',
    title: 'New Value: ',
    params: function (params) {
        return {
            'pk': params.pk,
            'value': params.value,
            'name': params.name,
            '_csrfToken': $.cookie('_csrfToken')
        }
    },
    ajaxOptions: {
        type: 'post',
        dataType: 'json'
    }
});
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

1 participant