django-datatable icon indicating copy to clipboard operation
django-datatable copied to clipboard

How to include table tag in html for view inherited FeedDataView

Open kapoorabhish opened this issue 8 years ago • 5 comments

I have defined the view which inherits FeedDataView. I am unable to include it in HTML. Please explain how to use it. Even your examples miss this.

kapoorabhish avatar Feb 13 '17 13:02 kapoorabhish

I just update readme file, let me know it helps or not. https://github.com/shymonk/django-datatable/blob/master/README.rst#custom-ajax

shymonk avatar Feb 16 '17 07:02 shymonk

Hi, Thanks for updating the README. My next question is, how one can one pass variable kwargs argument to reverse_lazy function for ajax_source? e.g. ajax_source = reverse_lazy('url_name',kwargs={'pk':some_variable})

kapoorabhish avatar Feb 17 '17 05:02 kapoorabhish

Hi, You have to override the table constructor and set the ajax_source property of self.opt. This way you can pass argument to the table instanciation and thus to the reverse_lazy function.

SwanMougnoz avatar Feb 17 '17 10:02 SwanMougnoz

@SwanMougnoz , Thanks for the reply. Let me do it and reach you.

kapoorabhish avatar Feb 17 '17 11:02 kapoorabhish

i cant find FeedDataView its giving me error : ImportError: cannot import name FeedDataView please tell me how to define FeedDataView

thanks in advance.

alaminshakeel avatar Nov 02 '17 12:11 alaminshakeel