show loading gif during long processing in django?

前端 未结 1 512
别那么骄傲
别那么骄傲 2021-01-28 06:06

I do my project using Django 1.8 . I want put a GIF to during call key_generate function. How can I do this using Django. I refer this question to reference Link b

相关标签:
1条回答
  • 2021-01-28 06:46

    You can use Block UI for this purpose, it's a JavaScript library.

    Replace <input type="submit" class="btn btn-default" value="Save" > with

    <button type="button" class="btn btn-default" onclick="submit_form()">Save</button>
    

    Submit your form with JavaScript and upon submitting form, show image you want to show. You can watch demos here.

    0 讨论(0)
提交回复
热议问题