-
Notifications
You must be signed in to change notification settings - Fork 10
We can (now?) use value_to_string and avoid problems with custom fields. #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lamby
wants to merge
82
commits into
playfire:master
Choose a base branch
from
lamby:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
71ddde7
We can (now?) use value_to_string and avoid problems with custom fields.
lamby 9f505d9
Merge pull request #1 from lamby/master
danpalmer 7ef7d95
Support Django >= 1.6
danpalmer c09df44
This wasn't supposed to be added
danpalmer ee530e2
parent_model was a private API and removed in Django 1.8
danpalmer 3eae424
Lookup the right model
danpalmer 578b2b3
Special case some field types.
danpalmer b4508fa
This is now model_name
lamby b691fe7
This link is no longer live
prophile daf8d55
Correct these
prophile 5338dc3
Add `install_requires`
prophile 413eba1
Exclude the "tests" directory
prophile 66eda84
Trailing comma
prophile ce4353e
Delete this documentation
prophile 0c3fd78
Add a first test
prophile 508e071
Add a simple (currently failing)_cached relation test
prophile 76fdfd8
Mark as skipped
prophile 09f410c
Add cache invalidation tests
prophile 870b6c0
Fix this test
prophile 1f6491b
Add a version number on the cache keys
prophile fd22a23
Run all encoding through Pickle
prophile cc43ac6
Merge pull request #2 from thread/improvements
prophile a601b2e
Fix the authentication middleware
prophile 737fea0
Don't assume a numeric primary key
prophile 51d0f20
Reflow
0e5c7d0
Specify using for relations
e56f107
Releasing version 0.1.1
lamby 5b0afd8
Merge https://github.com/thread/django-cache-toolbox
lamby 4a95ad6
Releasing version 0.2.0
lamby 056b318
Drop support for 1.6
lamby a56f5c4
Releasing version 0.2.1
lamby 582bf12
This is now on related_model, not model!
lamby 54d6bd7
Releasing version 0.2.2
lamby 4b36e4b
Add missing trailing comma
lamby bc6309a
Drop broken creation non-UPSET functionality
lamby 6cfae0d
Fork
lamby 0b65e49
Drop unused import
lamby 8c5d5a1
Releasing version 0.2.3
lamby 4ae4f8b
Move away from deprecated django.template.resolve_variable.
lamby 63caa7c
Releasing version 0.2.4
lamby 43a6c33
Ignore eggs (#1)
PeterJCLaw 3864f5d
Django 1.x (#2)
PeterJCLaw 62fd94f
Switch to the test running mechanism from django-enumfield
PeterJCLaw 5961c37
Support `hasattr`
PeterJCLaw 497094e
Ensure `hasattr` is consistent
PeterJCLaw a576370
Releasing version 0.3.0
lamby 2a615c4
Avoid race condition between transaction commit and cache clear
PeterJCLaw 8b80fcd
Releasing version 0.3.1
lamby c924be8
Support older setuptools
PeterJCLaw 8b4eb37
Upgrade for Django 2.0 compatibility
mthpower 8edbc05
Update setup.py since the tests don’t pass under Django 1.8
mthpower f0f0d9e
Releasing version 0.3.2
lamby e701e42
Releasing version 1.0.0
lamby ca7f6cf
Bump allowed Django version to <2.2
danpalmer 80ba9a6
Releasing version 1.1.0
lamby 1c49314
Add a README with basic usage information
PeterJCLaw 95f5609
Actually demonstrate using a _cached_ relation
PeterJCLaw 25617b8
Also support Django 2.2.
lamby 8908bcf
Releasing version 1.1.1
lamby 59cfc2e
Include the README as the package long description
PeterJCLaw 4033135
Cache negative relation lookups locally
PeterJCLaw 2855f64
Make setup.py executable.
lamby 823cb31
Releasing version 1.2.0
lamby ab50996
Fix a secondary error from cache exceptions
PeterJCLaw b5e5bdf
Releasing version 1.2.1
lamby d4baa75
Explicitly require cached relations are primary keys
PeterJCLaw 9cd9ea9
Move to Python 3.x.
lamby e4f9dab
Releasing version 1.3.0
lamby 1168533
Make the README example more correct
PeterJCLaw 3380c26
Allow use of extended User model
matt-dalton af04924
Releasing version 1.4.0
lamby 4ff61ed
Extract de/serialisation helpers
PeterJCLaw 303ce9d
Extract a couple of utils
PeterJCLaw a913b62
Support always fetching some relations when loading a model
PeterJCLaw 3dfbf07
Apply 'black'.
lamby c6f69c4
Releasing version 1.5.0
lamby f404b12
Avoid unrelated select-relateds
PeterJCLaw 97c9296
Wrap these collections in tuples for compatibility
PeterJCLaw 9a55e12
Cope with only some of the related models actually being loaded
PeterJCLaw 544966d
Releasing version 1.6.0
lamby 303b38f
Configure setup.cfg to generate a wheel during the release process.
lamby cdca670
Releasing version 1.6.1
lamby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
*.pyc | ||
docs/_build | ||
/.eggs | ||
/*.egg-info |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Copyright © 2016 Chris Lamb <[email protected]> | ||
Copyright © 2010, 2011 UUMC Ltd. <[email protected]> | ||
All rights reserved. | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# django-cache-toolbox | ||
|
||
_Non-magical object caching for Django._ | ||
|
||
Another caching framework for Django that does not do any magic behind your | ||
back, saving brain cycles when debugging as well as sticking to Django | ||
principles. | ||
|
||
## Installation | ||
|
||
From [PyPI](https://pypi.org/project/django-cache-toolbox/): | ||
``` | ||
pip install django-cache-toolbox | ||
``` | ||
|
||
## Basic Usage | ||
|
||
``` python | ||
from cache_toolbox import cache_model, cache_relation | ||
from django.db import models | ||
|
||
class Foo(models.Model): | ||
... | ||
|
||
class Bazz(models.Model): | ||
foo = models.OneToOneField(Foo, related_name='bazz', primary_key=True) | ||
... | ||
|
||
# Prepare caching of a model | ||
cache_model(Foo) | ||
|
||
# Prepare caching of a relation | ||
cache_relation(Foo.bazz) | ||
|
||
# Fetch the cached version of a model | ||
foo = Foo.get_cached(pk=42) | ||
|
||
# Load a cached relation | ||
print(foo.bazz_cache) | ||
``` | ||
|
||
See the module docstrings for further details. |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahahahahahahahahahahahahahahaha.