summaryrefslogtreecommitdiff
path: root/tests/modeltests
AgeCommit message (Collapse)Author
2008-01-13Fixed #6365 -- Added `blank=True` to parent attribute of `m2o_recursive` ↵Gary Wilson Jr
model example, thanks dgrant. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-13Changed ModelForms to allow inheritance as long as their model attributes ↵Joseph Kocherhans
are the same. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-13Fixed #6162. ModelForm's __init__ signature now matches Form's. This is a ↵Joseph Kocherhans
backwards incompatbile change. Based largely on a patch by ubernostrum. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-09Fixed #3906 -- Fixed the reverse_m2m_name for a generic relation. Refs #2749.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04Fixed #5268: the YAML serializer now uses yaml.safe_dump() instead the plain ↵Jacob Kaplan-Moss
yaml.dump(); this makes YAML dumps more portable, and also removes the crufty '!!python/unicode' business. Thanks, poelzi. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02Fixed #6042 -- ModelForms implementation from Joseph Kocherhans. Still mightMalcolm Tredinnick
need a little tweaking as people start to use it, but this is mostly complete. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02Fixed #3511 -- Changed QuerySet.get() to return a MultipleObjectsReturned ↵Malcolm Tredinnick
exception, rather than an assertion error. Thanks, Gary Wilson and cheeming. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02Fixed #3323 -- More robust error handling for related objetcs. Thanks, GregMalcolm Tredinnick
Kopka and shaleh. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01Fixed #5996 -- Add a pyscopg2 convertor for SafeUnicode -> unicode. Thanks, ↵Malcolm Tredinnick
remco@diji.biz git-svn-id: http://code.djangoproject.com/svn/django/trunk@6816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01Fixed #6068 -- Updated docstrings in model tests to make the documentationMalcolm Tredinnick
examples correct. Thanks Wang Chun. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29Fixed #5989 -- Fixed a problem with values being incorrectly reused byMalcolm Tredinnick
reference in field subclassing. Thanks, flupke. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29Fixed #4653 -- Improved the logic to decide when to include (and select asMalcolm Tredinnick
initial value) the blank choice for a model field with choices. Thanks to Ilya Semenov for persisting with this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-19Fixed #5932 -- Use `self.pages` and not `self._pages` in `_get_page_range` ↵Gary Wilson Jr
so that an exception is not raised if `self.page_range` is accessed before `self.pages`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6702 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-13Fixed #4787, #5913 -- Updating the queryset on a `ModelChoiceField` or ↵Gary Wilson Jr
`ModelMultipleChoiceField` now updates its widget's choices. The clean methods for `ModelChoiceField` and `ModelMultipleChoiceField` were changed to only allow choices in the specified queryset (instead of allowing all choices returned by the queryset model's default manager). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11When using assertRedirect(), allow the caller to specify relative URLs andMalcolm Tredinnick
automatically fill in the hostname and scheme (host can be passed in, if different from the default). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-09Corrected a couple comments in `model_forms` tests.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-07Fixed #4376 -- login_required now works with bound methods. Thanks, Steven ↵Luke Plant
Bethard. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6658 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-05Added the small changes necessary to make creating custom model fields easier.Malcolm Tredinnick
Also includes some tests for this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21Fixed #3265 -- Made it a validation error to have field names with trailingMalcolm Tredinnick
underscores. Allowing these would enable peopleto write ambiguous queryset filters (plus makes parsing filters much harder). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-04Fixed #5641 -- Handle lazy translations correctly when used as default ↵Malcolm Tredinnick
arguments. Thanks, permon. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-24Fixed #5559: instances sent via post-save signals no longer have pks of ↵Jacob Kaplan-Moss
None. Thanks, Joseph Kocherhans. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-22Fixed #5553 -- Fixed a serialization problem with datetime and time objects. ↵Russell Keith-Magee
Thanks to pigletto for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6406 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-21Fixed #5516 -- Added the ability for applications to define their own ↵Russell Keith-Magee
management commands. Pieces of this patch taken from a contribution by Todd O'Bryan. Thanks Todd. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16Fixed a typo. I think I should get full marks for getting all the letters ↵Malcolm Tredinnick
right, but some people insist they should be in the right order, too. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16Removed the test portion that relies on transactions when the backend is ↵Malcolm Tredinnick
mysql or mysql_old (it's still in place for all other backends). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16Fixed #3703 -- Added pk property to models. Thanks, Collin Grady and ↵Malcolm Tredinnick
jeromie@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6346 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Fixed #4879 -- Added 'created' arg to post_save signal. This is True is a ↵Malcolm Tredinnick
new object is created. Patch from George Vilches. Fully backwards compatible, because signal receivers do not have to be able to accept all the arguments (thankyou, robust_apply()). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Fixed #4714 -- Modified serializers to handle None primary keys correctly. ↵Russell Keith-Magee
This slightly changes the output format for primary keys on JSON and YAML serializers (PKs will be output as 1, rather than "1". However, fixtures in the old format will still load ok. Thanks for the patch, pigletto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Added explicit order_by filters to some model_forms tests that were failing ↵Ian Kelly
in Oracle due to returning results in the wrong order. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed test case that failed on Oracle because it assumed an ordering for Matt Boersma
objects.all(). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #5394 -- REDIRECT_FIELD_NAME is now configurable. Thanks, Petr ↵Adrian Holovaty
Marhoun, DavidReynolds and effbot git-svn-id: http://code.djangoproject.com/svn/django/trunk@6206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #5448: you can now use unicode characters in primary keys. Thanks, ↵Jacob Kaplan-Moss
pigletto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed a bunch of Python 2.3 issues. Two tests still fail, but this fixes the ↵Malcolm Tredinnick
bulk of things. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed tests to match new HTTP redirect behaviour. We always redirect to ↵Malcolm Tredinnick
absolute URLs now. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #987 -- Convert relative URI portions into absolute URIs in HTTP ↵Malcolm Tredinnick
Location headers. Based on a patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6164 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #1795 -- Added page_range to paginators in generic list views. Thanks ↵Russell Keith-Magee
to polarcowz@gmail.com and Marc Fargas <telenieko@telenieko.com> for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6146 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-08Fixed #3557 -- Made `SlugField` inherit from `CharField` so that its ↵Gary Wilson Jr
`max_length` is properly set. Removed `get_manipulator_field_objs` method since it's already provided by `CharField`. Thanks, Russell Cloran. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-04Removed trailing whitespace.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-04Removed import that snuck into [6044].Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-04Cleaned up some imports.Gary Wilson Jr
Fixed long lines. Changed some docstrings to use "action words". git-svn-id: http://code.djangoproject.com/svn/django/trunk@6044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-03Fixed #4988 -- In the test client, Added tracking of the client and request ↵Russell Keith-Magee
that caused a response so that the assertRedirects check can use the correct client when following a redirect. Well spotted, alex@gc-web.de. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-31Fixed #4968 -- Added assertRedirects handling for paths with GET data. ↵Russell Keith-Magee
Thanks for the patch, Ivan Sagalaev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17Added docstring to logout test case.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17Fixed #5189 -- Added logout method to test Client. Thanks, Jakub Wisniowski ↵Russell Keith-Magee
<restless.being@gmail.com>. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17Minor fix to get the fixure model test to pass in the new management framework.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16Major refactoring of django.core.management -- it's now a package rather ↵Adrian Holovaty
than a 1730-line single module. All django-admin/manage.py commands are now stored in separate modules. This is backwards-incompatible for people who used django.core.management functions directly git-svn-id: http://code.djangoproject.com/svn/django/trunk@5898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-08Fixed #5115 -- Fixed `QuerySet` slices to allow longs.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05Fixed #4001 -- Added dynamic save_m2m method() to forms created with ↵Russell Keith-Magee
form_for_model and form_for_instance on save(commit=False). git-svn-id: http://code.djangoproject.com/svn/django/trunk@5804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms ↵Gary Wilson Jr
`FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-27Added unit test that confirms a bug in ValuesQuerySets that have ↵Adrian Holovaty
extra(select) specified. If the select dictionary has several fields, Django assigns the wrong values to the select-field names git-svn-id: http://code.djangoproject.com/svn/django/trunk@5767 bcc190cf-cafb-0310-a4f2-bffc1f526a37