Commit Graph

1572 Commits

Author SHA1 Message Date
Adrian Holovaty ecc57b0b07 magic-removal: More various fixes
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1649 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 19:12:47 +00:00
Adrian Holovaty 47a0ec00f2 magic-removal: Converted core and contrib models to use managers, and fixed some API code in django.middleware.sessions and django.contrib.admin.views.main
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 19:07:41 +00:00
Adrian Holovaty e18d87f84e magic-removal: Implemented hook for custom managers
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 18:49:48 +00:00
Adrian Holovaty af96c19be2 magic-removal: Added custom_managers model unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1646 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 18:41:48 +00:00
Adrian Holovaty ebcc0dad23 magic-removal: Removed subclassing model unit tests for now
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1645 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 18:03:33 +00:00
Adrian Holovaty 9027ed6ea6 magic-removal: Fixed various breakage due to removal of magic modules. Several bits of calling code still use magic modules.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 07:02:42 +00:00
Adrian Holovaty a5489c964e magic-removal: Fixed syntax error in django.contrib.flatpages.models
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 06:41:10 +00:00
Adrian Holovaty 31e500d750 magic-removal: Moved django.contrib.redirects models to a models.py file rather than a models package
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 06:40:39 +00:00
Adrian Holovaty 7be28246ed magic-removal: Moved django.contrib.flatpages models to a models.py file rather than a models package
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 06:40:22 +00:00
Adrian Holovaty 9f6f675e7b magic-removal: More cleanup due to django.db move
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1638 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 06:30:14 +00:00
Adrian Holovaty aecff3e245 magic-removal: Various cleanup and moving, with respect to the recent django.core.db -> django.db move
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 06:24:32 +00:00
Adrian Holovaty 394ad9aa7f magic-removal: Moved the rest of django/core/db to django/db/backends
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 05:51:47 +00:00
Adrian Holovaty 295f00d099 magic-removal: Moved django/core/db/__init__.py to django/db/__init__.py and cleaned it up
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 05:37:28 +00:00
Adrian Holovaty e1bcf1f311 magic-removal: Removed django/db/__init__.py
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 05:33:25 +00:00
Adrian Holovaty 1036a4ae10 magic-removal: Renamed wrapper.py in each db backend to base.py
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1633 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 05:22:25 +00:00
Adrian Holovaty 6928f18493 magic-removal: Moved django.core.db.backends to django.db.backends
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1632 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 05:21:44 +00:00
Adrian Holovaty d0fabc0499 magic-removal: Moved django.core.meta to django.db.models
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 05:02:51 +00:00
Adrian Holovaty 55933c86e7 magic-removal: Removed bin/validate.py -- it wasn't being used
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1629 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 04:55:15 +00:00
Adrian Holovaty 16f354236a magic-removal: Removed unnecessary import in runtests.py
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 04:47:09 +00:00
Adrian Holovaty 0e5b7d88f2 magic-removal: Commented-out django/models/__init__.py because it's no longer used
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1627 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 04:30:33 +00:00
Adrian Holovaty 746946375b magic-removal: Changed _get_cached_row to take klass, not opts
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 04:27:52 +00:00
Adrian Holovaty 464b638d90 magic-removal: Removed module_name calls in model unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 04:25:46 +00:00
Adrian Holovaty e8db0b01d2 magic-removal: Removed has_related_links Model parameter
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1624 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 04:19:54 +00:00
Adrian Holovaty 81bd41f23e magic-removal: Changed Model metaclass to no longer create magic modules. Shed a single tear.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 04:03:39 +00:00
Adrian Holovaty 6493164e91 magic-removal: Removed _orig_init_args hack in Options class. It was necessary for model subclassing and is no longer necessary.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 03:54:11 +00:00
Adrian Holovaty 4cb3e7279c magic-removal: Added support for properties (and any other arbitrary attributes on models). This required making Model a new-style class, which required some reordering of code. Also removed replaces_module support, support for model subclassing, and default manipulators.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 03:52:29 +00:00
Adrian Holovaty 710d865b9d magic-removal: Changed runtests.py to fix import-order error in overriding settings.INSTALLED_APPS
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 03:50:46 +00:00
Adrian Holovaty 8d4f9f73c8 magic-removal: Improved 'properties' model unit tests to test for setting attribute on a property
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 03:36:20 +00:00
Adrian Holovaty bac086ba43 magic-removal: Added 'properties' model unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1618 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 03:29:58 +00:00
Adrian Holovaty d68487e8da magic-removal: Moved method_get_related and method_add_related to methods on Model, and changed Model._prepare() to add them. This doesn't currently work because _prepare() is called during the metaclass and related models don't yet exist at that point
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-14 03:25:04 +00:00
Adrian Holovaty 76852e5da1 magic-removal: Changed django.core.meta.RelatedObject to take the model class object, not an Options object
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-13 19:48:01 +00:00
Adrian Holovaty 257f7090ef magic-removal: Added Manager.__get__ method that forbids access by instances. Also added unit tests. Thanks, rjwittams
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-13 16:44:54 +00:00
Adrian Holovaty 0438b6848b magic-removal: Changed django.core.management.init to display full traceback if there's an error during database initialization
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-13 16:19:40 +00:00
Adrian Holovaty d0c3aee64c magic-removal: Small simplification of test_namespace assignment in runtests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-13 16:17:33 +00:00
Adrian Holovaty 17c2c4362a magic-removal: Moved django/contrib/admin/models/admin.py to django/contrib/admin/models.py
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 05:51:32 +00:00
Adrian Holovaty c6cdd4d7f6 magic-removal: Changed the way app_label is calculated
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 05:42:22 +00:00
Adrian Holovaty 683e075a01 magic-removal: Changed runtests.py to use new modeltests package and to import model classes directly, rather than magic modules
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 05:40:09 +00:00
Adrian Holovaty 750963bfc8 magic-removal: Added __init__.py to tests/modeltests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 04:13:59 +00:00
Adrian Holovaty 9b1dd36665 magic-removal: Moved model unit tests from 'testapp' package into 'modeltests' package, with each model test getting its own app
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1606 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 04:07:46 +00:00
Adrian Holovaty 0309650237 magic-removal: Changed Model.delete() not to use get_model_module()
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 03:56:42 +00:00
Adrian Holovaty 82920f423d magic-removal: Fixed a couple of bugs
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1604 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 03:47:34 +00:00
Adrian Holovaty 24cf934578 magic-removal: Fixed bugs in custom_methods unit test
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 03:35:17 +00:00
Adrian Holovaty 141a5382d8 magic-removal: Fixed some bugs in unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 03:01:57 +00:00
Adrian Holovaty c60ac8f480 magic-removal: Refactored method_get_many_to_many and method_set_many_to_many to be methods of Model
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 02:56:36 +00:00
Adrian Holovaty 795ac34f3b magic-removal: Changed ManyToOne, ManyToMany and OneToOne to store the model class, not the Options instance, as the 'to' attribute. Also refactored many-to-one lookup function to be a method of Model.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 02:40:29 +00:00
Adrian Holovaty 99431aae66 magic-removal: Fixed bug in [1598] -- get_image_width and get_image_height methods weren't being assigned correctly
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1599 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 01:54:02 +00:00
Adrian Holovaty 1926ff4b31 magic-removal: Added Manager class. Refactored module-level functions to be methods of Manager. Moved most model-method and module-function creation from the ModelBase metaclass to new a _prepare() method in both Model and Manager.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-12 01:32:32 +00:00
Adrian Holovaty 5f420e14a9 magic-removal: Added get_pub_date_list() unit tests to basic model unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-11 22:57:14 +00:00
Adrian Holovaty 577ac01250 magic-removal: Added 'choices' model unit test
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1596 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-11 22:22:49 +00:00
Adrian Holovaty c1be782510 magic-removal: Changed model unit tests to use new Model.objects.* syntax instead of models.*
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-11 22:10:02 +00:00