-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from un1t/feature/7.0
Feature/7.0
- Loading branch information
Showing
27 changed files
with
348 additions
and
124 deletions.
There are no files selected for viewing
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
[pytest] | ||
DJANGO_SETTINGS_MODULE=django_cleanup.testapp.settings | ||
python_paths=. | ||
addopts = -n auto -v --cov-report=term-missing --cov=django_cleanup django_cleanup | ||
DJANGO_SETTINGS_MODULE = test.settings | ||
pythonpath = . src | ||
addopts = -n auto -v --cov-report=term-missing --cov=django_cleanup --forked | ||
markers = | ||
CleanupSelectedConfig: marks test as using the CleanupSelectedConfig app config |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'''Public utilities''' | ||
from .cache import ( | ||
get_mangled_ignore as _get_mangled_ignore, get_mangled_select as _get_mangled_select, | ||
make_cleanup_cache as _make_cleanup_cache) | ||
|
||
|
||
__all__ = ['refresh', 'cleanup_ignore', 'cleanup_select'] | ||
|
||
|
||
def refresh(instance): | ||
'''Refresh the cache for an instance''' | ||
return _make_cleanup_cache(instance) | ||
|
||
|
||
def ignore(cls): | ||
'''Mark a model to ignore for cleanup''' | ||
setattr(cls, _get_mangled_ignore(cls), None) | ||
return cls | ||
cleanup_ignore = ignore | ||
|
||
|
||
def select(cls): | ||
'''Mark a model to select for cleanup''' | ||
setattr(cls, _get_mangled_select(cls), None) | ||
return cls | ||
cleanup_select = select |
Oops, something went wrong.