This file contains 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
from django.core.cache import caches | |
from django.core.paginator import Paginator | |
from django.db import connections | |
class LargeTablePaginator(Paginator): | |
""" | |
Overrides the count method to get an estimate instead of actual count when not filtered | |
""" | |
def _get_count(self): | |
""" |
This file contains 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
from django.contrib.admin import ModelAdmin | |
class MyTableAdmin(ModelAdmin): | |
... | |
paginator = LargeTablePaginator | |
... | |
This file contains 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
Host * | |
ControlPath ~/.ssh/control/%C | |
ControlMaster auto |