This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DatabaseQueryAlertingMiddleware: | |
""" | |
Middleware that alerts when a threshold for maximum number of database queries or total query time | |
is exceeded when loading views in development mode. | |
""" | |
max_queries_threshold = 30 | |
max_time_threshold = 5 # seconds | |
def __init__(self, get_response): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Color; | |
import java.awt.Component; | |
import java.awt.Font; | |
import java.io.File; | |
import javax.swing.DefaultCellEditor; | |
import javax.swing.JButton; | |
import javax.swing.JFileChooser; | |
import javax.swing.JTable; | |
import javax.swing.JTextField; | |
import javax.swing.SwingUtilities; |