summaryrefslogtreecommitdiff
path: root/django/db/models/loading.py
Commit message (Collapse)AuthorAgeFilesLines
* [soc2010/app-loading] use app label instead of fqnArthur Koziel2010-08-101-3/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* [soc2010/app-loading] re-adding files after failed dcommitArthur Koziel2010-08-061-224/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* [soc2010/app-loading] removed app_errors attributeArthur Koziel2010-08-061-5/+4
| | | | git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* [soc2010/app-loading] removed app_store attributeArthur Koziel2010-06-291-15/+11
| | | | git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13404 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* [soc2010/app-loading] save models in app; adjust get_model/get_modelsArthur Koziel2010-06-281-5/+31
| | | | git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* added dummy App class and track instancesArthur Koziel2010-06-221-0/+5
| | | | git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13348: Restored ability to load models from apps in eggs. Thanks ↵Karen Tracey2010-04-151-13/+17
| | | | | | Ramiro and metzen for pointers on how to find out if a module loaded from an egg has a particular submodule. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13335: Adjusted the r12950 fix to properly handle import errors ↵Karen Tracey2010-04-141-3/+10
| | | | | | resulting from nested calls to load_app. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12972 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #11696: Changed app loading code so that it does not swallow import ↵Karen Tracey2010-04-121-1/+4
| | | | | | errors that used to be (prior to r10088) raised. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed a whole bunch of places to raise exception instances instead of ↵Adrian Holovaty2010-01-101-1/+1
| | | | | | old-style raising exception classes plus a comma. Good for the future Python 3 conversion git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #11936 -- Removed deferred models from the list returned by the ↵Russell Keith-Magee2009-12-221-8/+15
| | | | | | app_cache. Thanks to ryszard for the report, and clamothe for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12389 - performance enhancement of get_models()Luke Plant2009-12-161-1/+9
| | | | | | | | | Thanks to Travis Cline for the patch, which gives about 35% speed increase for the testsuite (with SQLite in-memory DB). git-svn-id: http://code.djangoproject.com/svn/django/trunk@11883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10109 -- Removed the use of raw SQL in many-to-many fields by ↵Russell Keith-Magee2009-11-031-3/+9
| | | | | | | | introducing an autogenerated through model. This is the first part of Alex Gaynor's GSoC project to add Multi-db support to Django. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8193: all dynamic imports in Django are now done correctly. I know ↵Jacob Kaplan-Moss2009-03-181-6/+9
| | | | | | this because Brett Cannon borrowed the time machine and brought Python 2.7's '`importlib` back for inclusion in Django. Thanks for the patch-from-the-future, Brett! git-svn-id: http://code.djangoproject.com/svn/django/trunk@10088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added tests for corner case with deleting where objects are deleted in the ↵Luke Plant2008-06-211-5/+7
| | | | | | | | | wrong order. These tests currently fail, by design, fix will be committed shortly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7044 -- Corrected a minor typo in a docstring in the model loader. ↵Russell Keith-Magee2008-06-171-1/+1
| | | | | | Thanks, msaelices. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Removed code that was recasting major errors found during application ↵Russell Keith-Magee2007-09-101-5/+1
| | | | | | import. If an application can't be imported, it now throws a full stack trace with the problem, rather than reporting the problem as a one line message. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Renamed Cache to AppCache and cache_ready() to app_cache_ready() from [5919] ↵Malcolm Tredinnick2007-08-181-5/+5
| | | | | | in order to avoid any potential confusion with Django's caching middleware functionality when reading the code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Rewrote portions of the app- and model-cache initialisation to handle some ↵Malcolm Tredinnick2007-08-171-106/+181
| | | | | | | | | | | corner cases. It is now possible to use m2m relations before everything is imported and still get the right results later when importing is complete. Also, get_apps() should always return the same results, so apps won't randomly disappear in the admin interface. Also reorganised the structure of loading.py, since the number of global variables was exploding. The public API is still backwards compatible. Fixed #1796 and #2438 (he claims, optimistically). git-svn-id: http://code.djangoproject.com/svn/django/trunk@5919 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4040 -- Changed uses of has_key() to "in". Slight performanceMalcolm Tredinnick2007-04-261-1/+1
| | | | | | | | improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #2968 -- Changed arguments to __import__ to use empty dictionary ↵Adrian Holovaty2006-10-301-1/+1
| | | | | | instead of empty string, for stricter compliance with Python library reference. Thanks for the patch, Yasushi Masuda git-svn-id: http://code.djangoproject.com/svn/django/trunk@3951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Negligible style change in django.db.models.loadingAdrian Holovaty2006-08-081-2/+2
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@3539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Seed the global app cache in a call to db.models.get_model() except when we areMalcolm Tredinnick2006-07-291-2/+6
| | | | | | | constructing a model class. Refs #2348. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Negligible spacing change to django/db/models/loading.pyAdrian Holovaty2006-06-301-2/+2
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@3243 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1812 -- permit apps without models (without disguising other errors).Malcolm Tredinnick2006-06-281-3/+10
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@3221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed another path where imports were creating two instances of a model'sMalcolm Tredinnick2006-06-261-1/+0
| | | | | | | class. Refs #1796, #2232. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1796 -- implemented more robust normalisation for module filenamesMalcolm Tredinnick2006-06-261-2/+2
| | | | | | | | before comparing them. Ivan Saglaev found a case where r3202 did not work properly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1796 -- only load a single copy of each model, even when it isMalcolm Tredinnick2006-06-251-0/+12
| | | | | | | | | | referenced via different import paths. Solves a problem with many-to-many relations being set up incorrectly. Thanks to Curtis Thompson, Luke Plant and Simon Willison for some excellent debugging of the problem. Refs #2232 (may also have fixed that). git-svn-id: http://code.djangoproject.com/svn/django/trunk@3202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixes #1812 -- Added model validity checks to ensure that models.py exists, ↵Russell Keith-Magee2006-06-251-5/+13
| | | | | | and has been successfully imported for all INSTALLED_APPS. Previous behaviour was to silently ignore empty/problem models, which resulted in the display of an admin page that doesn't display a supposedly installed model. Thanks to Ian Holsman for the original report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1662 -- Added resolver for string-form model references for models ↵Russell Keith-Magee2006-06-231-13/+22
| | | | | | that have already been loaded, with tests to validate both forward and backward referenced model names. Light refactoring of model loading to make regression tests behave more like normal model loading. Also clarifies the text of some validation errors. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1732 -- AttributeErrors in models are no longer ignored by the model ↵Adrian Holovaty2006-05-261-3/+9
| | | | | | validator. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty2006-05-021-0/+71
backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37