1
0
mirror of https://github.com/django/django.git synced 2025-10-12 08:19:10 +00:00

1442 Commits

Author SHA1 Message Date
Malcolm Tredinnick
0c20e88e65 queryset-refactor: Fixed up and documented Meta-class inheritance.
Should be mostly logical (for versions of "logical" that may require you to be
a Vulcan, admittedly, but that's not entirely my fault).


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7141 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-22 01:05:05 +00:00
Malcolm Tredinnick
3dd28bd566 queryset-refactor: Merged from turnk up to [7135] because I need some stuff.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-20 01:59:59 +00:00
Malcolm Tredinnick
da6570bf08 queryset-refactor: Model inheritance support.
This adds both types of model inheritance: abstract base classes (ABCs) and
multi-table inheritance. See the documentation and tests / examples for details.

Still a few known bugs here, so don't file tickets (I know about them). Not
quite ready for prime-time usage, but it mostly works as expected.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7126 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-17 18:47:57 +00:00
Malcolm Tredinnick
2d0588548e queryset-refactor: Merged from trunk up to [7122].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-16 06:57:52 +00:00
Malcolm Tredinnick
accc20d799 queryset-refactor: Fixed up OneToOneFields (mostly).
They now share as much code as possible with ForeignKeys, but behave more or
less as they did before (the backwards incompatible change is that they are no
longer automatically primary keys -- so more than one per model is permitted).

The documentation still uses an example that is better suited to model
inheritance, but that will change in due course. Also, the admin interface
still shows them as read-only fields, which is probably wrong now, but that can
change on newforms-admin after this branch is merged into trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-08 09:49:17 +00:00
Malcolm Tredinnick
0a9b751958 queryset-refactor: Merged changes from trunk up to [7085].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-04 05:45:17 +00:00
Malcolm Tredinnick
de94d0cb93 queryset-refactor: Added an update method to QuerySets, since it's needed for
moving SQL out of the core code. Only direct fields and foreign keys can be
updated in this fashion, since multi-table updates are very non-portable.

This also cleans up the API for the UpdateQuery class a bit. Still need to
change DeleteQuery to work similarly, I suspect.

Refs #4260.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7043 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-28 14:27:53 +00:00
Malcolm Tredinnick
911e65ada7 queryset-refactor: Added a way to clear all default ordering from a queryset,
by calling order_by() with no parameters.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-28 14:27:16 +00:00
Malcolm Tredinnick
98abf27535 queryset-refactor: Merged from trunk up to [7025].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-26 13:23:25 +00:00
Malcolm Tredinnick
83cb2218bc queryset-refactor: Merged from trunk up to [7002].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-09 06:08:40 +00:00
Malcolm Tredinnick
97091940b1 queryset-refactor: Merged from trunk up to [6953].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6954 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-19 05:08:37 +00:00
Malcolm Tredinnick
3064a211bf queryset-refactor: Allow specifying of specific relations to follow in
select_related(). Refs #5020.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-09 06:24:17 +00:00
Malcolm Tredinnick
07ddd56872 queryset-refactor: Merged from trunk up to [6856].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-03 02:59:56 +00:00
Malcolm Tredinnick
a2418176fd queryset-refactor: Interpret qs.filter(foo=None) to be the same as qs.filter(foo__isnull=True). Refs #2737.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-30 02:29:25 +00:00
Malcolm Tredinnick
dfe05d94b8 queryset-refactor: Merged from trunk up to [6752].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 20:38:41 +00:00
Malcolm Tredinnick
a97abcffc2 queryset-refactor: Merged from trunk up to [6724].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-28 21:51:17 +00:00
Malcolm Tredinnick
5d85a5147b queryset-refactor: Fixed up a few problems from the previous merge from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-18 12:07:25 +00:00
Malcolm Tredinnick
3d07f94d68 queryset-refactor: Merged from trunk up to [6689].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-18 05:48:24 +00:00
Malcolm Tredinnick
44df4e390f queryset-refactor: Merged from trunk up to [6635].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6638 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-03 02:16:27 +00:00
Malcolm Tredinnick
f189280eb3 queryset-refactor: Merged from trunk up to [6623].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-03 02:15:27 +00:00
Malcolm Tredinnick
f951d97d99 queryset-refactor: Added the ability to apply parameters to the select
fragments in QuerySet.extra(). Refs #2902


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-24 04:22:23 +00:00
Malcolm Tredinnick
abcb70e524 queryset-refactor: Added a convenience all() method to Querysets. Refs #3739
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23 13:49:07 +00:00
Malcolm Tredinnick
5e1a54a3a8 queryset-refactor: Merged from trunk up to [6595].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23 12:51:22 +00:00
Malcolm Tredinnick
3429fc0ff2 queryset-refactor: Added a bunch of "new in development version" markers for
recent additions.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15 03:58:20 +00:00
Malcolm Tredinnick
a3b22d9db0 queryset-refactor: Added ~ support to Q-objects. Based heavily on a patch from
Collin Grady. Refs #4858.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15 03:32:11 +00:00
Malcolm Tredinnick
70d5e32e13 queryset-refactor: Made the use of values() for ForeignKey fields consistent
and documented this feature. Refs #4358.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15 02:54:30 +00:00
Malcolm Tredinnick
e4d1a9aabb queryset-refactor: Updated documentation to describe the new order_by() and
extra(order_by=...) behaviour.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15 00:30:05 +00:00
Malcolm Tredinnick
e9f1f50461 queryset-refactor: Re-added a docs change that was accidentally lost in the merge in [6466].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14 02:13:13 +00:00
Malcolm Tredinnick
7ebf3068c1 queryset-refactor: Merged changed from trunk up to [6463].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-08 16:10:39 +00:00
Adrian Holovaty
94c320d8a9 queryset-refactor: Merged to [6381]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-20 01:55:53 +00:00
Adrian Holovaty
28a4aa6f49 queryset-refactor: Merged to [6340]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 22:00:35 +00:00
Adrian Holovaty
ca33d307de queryset-refactor: Merged to [6300]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 21:57:25 +00:00
Adrian Holovaty
7325fbf4ff queryset-refactor: Merged to [6250]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6339 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 21:46:18 +00:00
Adrian Holovaty
5ce2e6c2c8 queryset-refactor: Merged to [6220]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6337 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 21:42:51 +00:00
Adrian Holovaty
d29c457ad1 queryset-refactor: Merged to [6197]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 21:35:33 +00:00
Adrian Holovaty
bf6a46d8ad queryset-refactor: Merged to [6190]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 21:34:09 +00:00
Adrian Holovaty
fb6a0c8ffa queryset-refactor: Merged to [6155]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6332 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 21:21:37 +00:00
Adrian Holovaty
a882e6076b queryset-refactor: Merged to [6130]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6330 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 21:15:56 +00:00
Malcolm Tredinnick
4751fd9ba7 Added a note about not using 'pk' as a field name for a non-primary-key field.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13 02:48:06 +00:00
Adrian Holovaty
ced74d582a Added 'Claiming tickets' section to docs/contributing.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6110 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-12 14:38:47 +00:00
Adrian Holovaty
db6093641c Fixed #5406 -- Fixed spelling error in docs/model-api.txt. Thanks, Andrew Shearer
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6109 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-12 13:11:51 +00:00
Adrian Holovaty
4453f65c78 Combined two paragraphs in docs/contributing.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6085 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-10 03:46:43 +00:00
Adrian Holovaty
49e4e4f9ce Attempted to bold part of docs/contributing.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-10 03:46:06 +00:00
Adrian Holovaty
b82a44d270 Added 'How to document new features' to docs/contributing.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6083 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-10 03:42:33 +00:00
Adrian Holovaty
3a3669e010 Fixed #5336 -- Altered an example in docs/fastcgi.txt. Thanks, Thomas Guttler
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6079 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-09 22:48:25 +00:00
Adrian Holovaty
5e19019bca Added bullet to docs/contributing.txt about creating diffs from the top-level trunk directory
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6078 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-09 22:10:47 +00:00
Adrian Holovaty
84f6182494 Fixed broken link in docs/django-admin.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-09 22:01:33 +00:00
Adrian Holovaty
c853973110 Improved 'Examples of using different ports and addresses' section in docs/django-admin.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-09 22:00:30 +00:00
Adrian Holovaty
71504127fd Fixed #5369 -- Refactored the django-admin.py help system, allowing each subcommand to register its own options. Thanks for the patch, Todd O'Bryan
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-09 21:57:59 +00:00
Adrian Holovaty
6f0bc3d02b Fixed #5280 -- Fixed typo in docs/modpython.txt. Thanks, nsteinmetz@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6071 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-09 17:21:36 +00:00