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
| - csky/admin/defaultmodeladmin.py admin to pair with defaultmodel/slugmodel | |
| - csky/models.py ActiveModel,DefaultModel,UserModel,SlugModel | |
| - csky/middleware/ssl_redirects.py includes @https_required decorator redirect midddlware | |
| - csky/decorators.py @https_required | |
| - csky/forms.py |
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 MyScript(OptionParserScript): | |
| usage = "Usage: %prog <command> [arguments]" | |
| options = { | |
| ('-v','--verbose'): {'help':"Be verbose", 'action': 'store_true', 'default': False}, | |
| } | |
| def main(self, *args, **kwargs): | |
| import pprint | |
| pprint.pprint(args) | |
| pprint.pprint(kwargs) |
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
| - Cache One Object (Active Homepage Layout) | |
| by_pk or by_* (any field) | |
| lazy queryset methods (loaded and cached when first used) | |
| warm queryset methods (preloaded by warming) | |
| - Cache Entire Table (Categories) | |
| load entire table into in-memory hash, indexes on pk and slug | |
| .cached manager for loading from cached, use_for_related=True | |
| - Cache Busy Queries (Page 1 of Story List by Category) |
NewerOlder