Flask + MongoDB Tutorial

In this tutorial, I’ll demonstrate how can you use Flask together with MongoDB.

Structure

We’ll use the following structure for our project

app/
__init__.py # Flask app
database.py # Main database class
models/
job.py # Job DB model
main/
__init__.py
routes.py # Main page routes
templates
main.html # Main page HTML template
requirements.txt # Requirements for running the application
Continue reading “Flask + MongoDB Tutorial”
Advertisements

jQuery Datatable Ajax: Change cell’s HTML after data is processed

The Problem

You generated a table using jQuery Datatable without loading the page, using Ajax. You wish to change the HTML of cells in a certain column after the data is processed. How to do it?

For the sake of this example, we’ll say we want to switch the data in the first column of the table into a hyperlink.

Continue reading “jQuery Datatable Ajax: Change cell’s HTML after data is processed”