Posts

Showing posts with the label web-applications

DataTable is not a function on Liferay 7

DataTable is not a function on Liferay 7 This is my current code on liferay : liferay <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.18/css/jquery.dataTables.css"> <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.18/js/jquery.dataTables.js"></script> <html> <table id="table_id" class="display"> <thead> <tr> <th>Column 1</th> <th>Column 2</th> </tr> </thead> <tbody> <tr> <td>Row 1 Data 1</td> <td>Row 1 Data 2</td> </tr> <tr> <td>Row 2 Data 1</td> <td>Row 2 Data 2</td> </tr> </tbody>...

Flask stuck loading after opening a certain route with a function

Flask stuck loading after opening a certain route with a function I'm relatively new to Python and Flask. I've been trying to create a web application that reads data readings from a .txt file and plots them onto a matplotlib plot. In this web-app, I have a front page with 3 buttons. These buttons redirect to different routes with functions that read data and plot them onto a matplotlib plot. The web-app works perfectly only for the first time I go to either of these routes. After that nothing loads anymore. I guess I have an infinite loop of some sort but I can't figure it out. Also, after the website gets stuck the Python process starts consuming more resources. The problem persists only when I open this route on the web-app: @app.route("/temperature/") This loads without problems on the web-page, but only for one time and the whole web-app gets stuck and I cannot access any of the other routes either. Thanks in advance! EDIT 1 - Whole code below cloudapp.py (P...