Django has a fabulous ChangeList feature. It is used to show lists in admin. It also provides:
- Search bar
- Date Hierarchy filters
- Other filters in sidebar (including option to define custom filters)
- Handles pagination
| *.pyc | |
| *.jpe | |
| *.png |
| function block($document) { | |
| function blockLink(scope, elem, attrs) { | |
| var element = elem[0]; | |
| element.removeAttribute('block'); | |
| element.removeAttribute('target'); | |
| var targetTag = 'block-' + attrs.target; | |
| var blockElem = angular.element($document).find(targetTag)[0]; | |
| blockElem.innerHTML = ''; | |
| blockElem.appendChild(element); | |
| scope.$on('$destroy', function() { |
| default: | |
| just --list | |
| review: | |
| #!/usr/bin/env bash | |
| cd {{invocation_directory()}} | |
| source_branch_name=$(git branch --show-current) | |
| review_branch_name=review-${source_branch_name} | |
| git merge main |
| [email protected] | |
| PASSWORD=your-app-password |
| from django.contrib.admin import ModelAdmin | |
| from django.contrib.admin.sites import AdminSite | |
| class DummyChangeListAdmin: | |
| def get_queryset(self, *args, **kwargs): | |
| return self._queryset | |
| def has_change_permission(self, *args, **kwargs): | |
| return False |
| #!/bin/bash | |
| # based on https://scalastic.io/en/ufw-fail2ban-nginx/ | |
| # Replace this with your personal API key to the free service https://ipinfo.io | |
| API_KEY="" | |
| JAIL="" | |
| ip_list=$(sudo fail2ban-client status $JAIL | grep 'Banned IP list:' | sed 's/.*Banned IP list:\s*//') | |
| # Files for storing counts |