Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: django/django
head fork: ptone/django
Checking mergeability… Don’t worry, you can still create the pull request.
Commits on Aug 28, 2012
@ptone ptone merge app-loading branch into new history
the app-loading branch had many commits and merges
with the old git history - the simplest way to
move it forward was to do it as a single merge
@ptone ptone restore missing eggs due to .gitignore setting
my global gitignore was ignoring egg related files and so these were stripped
from my updated branch
@ptone ptone add a couple missing tests 8f4fa2e
@ptone ptone add handling for an edge case
I couldn't actually come up with a way to trigger this statement
@ptone ptone fix i18n tests fc7cf9d
@ptone ptone removed references to app_store feature AppCache
The feature is not supported in current implementation - potential note of
backward incompatability.
@ptone ptone fix auto-completion in management commands a280c7c
@ptone ptone fix empty model tests 49fffff
@ptone ptone more empty model test fixes e7aa449
@ptone ptone fix invalid_models test da45ad4
@ptone ptone ensure that management commands are found
if the cache is not populated, management command discovery doesn't happen
@ptone ptone properly reset shared state in AppCache when _reset 52bd0ce
@ptone ptone more test cleanup
gonna squash anyway, this is a messy one - trying to isolate
some other issues
@ptone ptone attempt to improve tablespaces tests
not yet working
@ptone ptone apps with no models should not trigger duplicate model installation
The issue here was that if an app has no models, its
model_module is None, which when passed to get_models
would return ALL models, duplicating what models get installed
in the DB
@ptone ptone remove tests for deleted feature 541d58c
@ptone ptone actually reset the __dict__ on self 67c0d46
@ptone ptone fixing up tests using installed_apps override e5a5112
@ptone ptone These were moved to the appcachetests
these had been moved in the original branch, but did not get moved in the merge - so removing
@ptone ptone fix app label clash for invalid models test b126b52
@ptone ptone move parent model traversal into App class 2bfdc34
@ptone ptone start of an unload_app method - incomplete 49eecdd
@ptone ptone make sure errors match new app label for invalid model tests fd7429a
@ptone ptone attempt new unload app call
also comment out the signal silencing
@ptone ptone use load_app instead of cache._reload
cache._reload destroys too much app cache info
that is loaded from
@ptone ptone conditionally remove a temp file a47952e
@ptone ptone improvements to unload_app and usage 3395a07
@ptone ptone remove signal silencing hack 7e469df
@ptone ptone making unload_app a bit more robust 0387a32
@ptone ptone properly unload apps in views.i18n tests f647123
@ptone ptone notes on incomplete test implementation d8248c7
@ptone ptone integrate appcachetests into testsuite
These are nested into their own test dir, in part
to keep the appcache tests last, as calling reload
from other tests, or having it called before other
tests causes a corrupted test appcache due to apps
that are loaded directly by runtests
@ptone ptone use cache instance instead of deprecated 41c52e5
@ptone ptone preserve proper installed flag during load_app
load_app can be used from _populate which is based on installed_apps
or independently in the case of tests, or when models imported outside
of installed apps
@ptone ptone unload_app improvements 9c57a36
@ptone ptone remove some debug code 26881c2
@ptone ptone move to context manager for _populate thread lock 9423b29
@ptone ptone locate module level representation only to 6fb1d0a
@ptone ptone rename app_cache_ready to ready bdc5742
@ptone ptone get_app -> get_models_module 2304034
@ptone ptone get_apps -> get_models_modules d46fdab
@ptone ptone find_app -> get_app_instance b325db2
@ptone ptone plurality typos d259b05
@ptone ptone fixup some module level use of get_models 8b69198
@ptone ptone resolve name collision for 'cache' a23beea
@ptone ptone typo fix in method call 8dc969f
@ptone ptone restore model registration with instance
this was causing test failures with contrib.sites settings .installed
to false on a model, causing later failures

feel this will be properly addressed later hopefully in some register_models refactor
@ptone ptone rename global AppCache instance from cache to app_cache 6295185
@ptone ptone fix missed rename for get_apps e385cd4
@ptone ptone represent appcache methods at django.models without deprecation 632659d
@ptone ptone port of fix for #18251 from master 4e30fe2
@ptone ptone define model module cache related names early in import cf77ba9
@ptone ptone refactor model registration
use apps in app_cache exclusively
proxy certain attributes of models back to apps
@ptone ptone preserve backwards compatible instance of app_cache 2eec1f2
@ptone ptone trigger app loading early on in Django's startup 74fcb64
@ptone ptone support models packages without explicit app_label e210413
@ptone ptone raise error in load_app on duplicate label
make sure that a second app with the same label can't get loaded

cleanup errant line
@ptone ptone rename test modules with labels that conflict with other apps 446aa8d
@ptone ptone remove need for 'naive' attribute 3aa567f
@ptone ptone update renamed test 5e5926c
@ptone ptone only syncdb installed apps 91687d8
@ptone ptone Revert "only syncdb installed apps"
This reverts commit 7c77ffa.
@ptone ptone better deal with modeless apps dd6e1c1
@ptone ptone Repair and integrate the appcache tests
This is a combination of 13 commits.
proper integration setup

remove order dependence

reload at start

a better _unload_app

sys path hack for now

reloads and resets

todo - postpone

change to app that has models

earlier versions allowed db_prefix conflict for apps with no models

reloading does it?

test fixups

test fixups

add testing hack

raise ImportError when explicitly loading an app that has no module
@ptone ptone PEP8 cleanup 790af44
@ptone ptone add get_model method to app base 2afe156
@ptone ptone special case auth, as it ships with an app class dac3ece
@ptone ptone change how post_load hook is called 69c3f6a
@ptone ptone use app name for full path - and app label for shortform 5d32d1d
@ptone ptone first draft topic docs 4281f67
@ptone ptone add a named tuple collection for less verbose access b0e3d8e
@ptone ptone docstring improvements 00ce988
@ptone ptone add a get_model test bad483c
@ptone ptone add a apps collection test 21f5059
@ptone ptone add a bad models_path test 532d619
@ptone ptone add some additional error tests 14b6e22
@ptone ptone add a post_load hook test 0ef52f1
@ptone ptone delay model registration until after apps are instantiated
factor out model relocation from model registration

the main point of this is to mitigate the fact that
importing the app's models module was hopelessly entangling
model imports with app loading

disable module import on app loading

make sure app modules are imported as part of _populate

but not at load time - resolves some circular imports

remove use of naive from load_app

fix up delayed model loading logic and associated tests

fix test for delayed model loading

bypass a couple tests for now that are based assumptions that have changed

manually register models inside test
@ptone ptone don't try to import the app module if not installed 3a4fca5
@ptone ptone use full imports on appcachetests a9779b0
@ptone ptone reset app_cache in tearDown of AppCacheTestCase 7d74773
@ptone ptone comment on approach taken in find_app_by_models_module ad9b068
@ptone ptone ensure reimported modules compare whether by py or pyc 8eb33a1
@ptone ptone special case app-loading tests to run last 69f8b18
@ptone ptone explicitly unload transient apps whose labels collide later with othe…
…r test apps
@ptone ptone some py3 prep changes 8733a8b
@ptone ptone set app reference for naive app 9355d4f
@ptone ptone test proxied install state of model to app 23cf5a9
@ptone ptone minor doc tweak 181fb8c
@ptone ptone merge fix fc71e68
@ptone ptone py3 fixes a56bab6
Commits on Sep 07, 2012
@kmtracey kmtracey Fix three TODOs in the tests. a1d7108
@ptone ptone remove the parent model injection into app models 928aae9
@ptone ptone update the apps accessor attribute e89a0eb
@ptone ptone initial removal of metaclass a2d9d00
@ptone ptone Merge remote-tracking branch 'kmtracey/app-loading' into app-loading 02d0fa3
Commits on Dec 20, 2012
@ptone ptone Big messy merge 09944b9
@ptone ptone de-meta cache file 05150f3
@ptone ptone de-meta app-cache tests 557ff61
@ptone ptone de-meta for app._meta finds 3b9d5d0
@ptone ptone add smart_str for creating app from name 61d988e
Commits on Dec 21, 2012
@ptone ptone fix from_name app_label derivation 19ce0df
@ptone ptone merge port of #19469 5321f6c
@ptone ptone merge port of d37483c 5903392
@ptone ptone merge cleanup for swapped check 36211b6
@ptone ptone merge fix for #13781 7478a6e
@ptone ptone initial removal of app back-ref bed754d
@ptone ptone more back-ref removal 6b119ec
Commits on Dec 23, 2012
@ptone ptone more meta removal 76d15a9
Commits on Dec 31, 2012
@ptone ptone Merge branch 'master' into app-loading
@ptone ptone Major fix on non-meta app objects - test-building still borked 8a31c1f
@ptone ptone tests running many now failing, but onward 3b7e641
Commits on Apr 10, 2013
@ptone ptone tests reorg
This was a big manual move and recopy of the current
tests folder from master
@ptone ptone Merge branch 'master' into app-loading
@ptone ptone remove app metaclass usage in admin options 7a34f23
Commits on Apr 11, 2013
@ptone ptone Renamed syndication tests to not conflict with contrib tests b8f9249
@ptone ptone add back module and path attr - still needs another look - leaving todo a8083f2
@ptone ptone strike removed usage of app back-link for installed state ccd19b7
@ptone ptone fix merge of d986147
@ptone ptone basic repatch of runtests a02ab8e
@ptone ptone assume model path, regardless of app-name depth 95e27d2
@ptone ptone model options fixes
fix merged import reorder
add external get_verbose_name
reinstitute old "installed" attr logic - temporary
Commits on Apr 13, 2013
@ptone ptone backref and meta removal cleanup 6595400
@ptone ptone fix staticfiles finder - all staticfiles_tests pass e0647e6
@ptone ptone more backref killing - sites tests all pass 86718d3
Commits on Apr 16, 2013
@ptone ptone syndication tests rename 8b65469
@ptone ptone fix for empty tests 2b33658
@ptone ptone skip finders for uninstalled apps daf8054
@ptone ptone kill missed meta bea6efd
@ptone ptone kill backref to app a217c5f
Commits on Apr 18, 2013
@ptone ptone fix i18n and tests 89275b2
Commits on Apr 20, 2013
@ptone ptone don't look for translations in uninstalled apps 8f17667
@ptone ptone load apps directly in view_tests 966435c
Commits on Apr 28, 2013
@ptone ptone don't look in directories of non-installed apps 5b22631
@ptone ptone always try to set module and path
really consider that these should not be stored, need to check
how often they are used and how much convenience this provides