aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-01-04Fix a typoPaul Melnikow
2014-01-04Router: Do not automatically adjust lookup_regex when trailing_slash is TruePaul Melnikow
BREAKING CHANGE When trailing_slash is set to True, the router no longer will adjust the lookup regex to allow it to include periods. To simulate the old behavior, the programmer should specify `lookup_regex = '[^/]+'` on the viewset. https://github.com/tomchristie/django-rest-framework/pull/1328#issuecomment-31517099
2014-01-04Allow viewset to specify lookup value regex for routingPaul Melnikow
This patch allows a viewset to define a pattern for its lookup field, which the router will honor. Without this patch, any characters are allowed in the lookup field, and overriding this behavior requires subclassing router and copying and pasting the implementation of get_lookup_regex. It's possible it would be better to remove this functionality from the routers and simply expose a parameter to get_lookup_regex which allows overriding the lookup_regex. That way the viewset config logic could be in the a subclass, which could invoke the super method directly. I'm using this now for PostgreSQL UUID fields using https://github.com/dcramer/django-uuidfield . Without this patch, that field passes the lookup string to the database driver, which raises a DataError to complain about the invalid UUID. It's possible the field ought to signal this error in a different way, which could obviate the need to specify a pattern.
2013-12-23Merge branch 'bennbollay-patch-1' into 2.4.0Tom Christie
Conflicts: .travis.yml docs/api-guide/routers.md rest_framework/compat.py tox.ini
2013-12-23Merge branch 'patch-1' of git://github.com/bennbollay/django-rest-framework ↵Tom Christie
into bennbollay-patch-1
2013-12-23Back out permissions example change in favor of easier to follow exampleTom Christie
2013-12-23Merge pull request #1315 from amatellanes/masterTom Christie
Simplified some examples in tutorial
2013-12-23Simplified some examples in tutorialamatellanes
2013-12-23Merge remote-tracking branch 'upstream/master'amatellanes
2013-12-23Revert "Simplified some examples in tutorial"amatellanes
This reverts commit d6806340e54408858da4b2dc991be99edd65df76.
2013-12-23Simplified some examples in tutorialamatellanes
2013-12-22Change the page title to prioritize page contentbennbollay
When many tab's are open (which is necessary for DRF's documentation), it becomes impossible to determine which tab contains which pieces of documentation. That they are all related is obvious by the use of a common icon, just not the specific page each tab is loaded to. This change inverts the order of the title to maintain as much useful context as possible on the tabbar.
2013-12-22Merge pull request #1312 from amatellanes/masterTom Christie
Simplified some functions in permissions.py
2013-12-22Simplified some functionsamatellanes
2013-12-21Merge pull request #1309 from lukaszb/errors-for-renamed-fieldsTom Christie
Should it be that way?
2013-12-21Additional test for 'source' behaviour. Refs #1302Tom Christie
2013-12-21Less brittle through relationship testing. Closes #1292.Tom Christie
2013-12-21Added example of using APIException class. Closes #1300Tom Christie
2013-12-21Docs tweaksTom Christie
2013-12-21Merge pull request #1310 from ↵Tom Christie
vbabiy/adding-djangorestframework-camel-case-to-docs djangorestframework-camel-case in docs
2013-12-21Added links to djangorestframework-camel-case in the third partyVitaly Babiy
sections of the docs for both parsers and renderers.
2013-12-20Should it be that way?Lukasz Balcerzak
2013-12-20Merge pull request #1308 from lukaszb/missing-custom-validation-method-testTom Christie
Added missing custom validation method test
2013-12-20Added missing custom validation method testLukasz Balcerzak
2013-12-20Merge pull request #1307 from lukaszb/test-class-name-duplicatedTom Christie
Updated test class name to be unique
2013-12-20Updated test class name to be uniqueLukasz Balcerzak
2013-12-17Add note on compat import in tutorialTom Christie
2013-12-17Merge pull request #1301 from linovia/bugfix/tutorial_for_python3Tom Christie
Fix tutorial's step 1 for Python 3
2013-12-17Use the BytesIO for buffering bytes and import the one from the compat module.Xavier Ordoquy
2013-12-16Merge branch 'nullbooleanfield_testcase' of ↵Tom Christie
git://github.com/dpetzel/django-rest-framework into dpetzel-nullbooleanfield_testcase Conflicts: rest_framework/tests/test_serializer.py
2013-12-16Merge pull request #1184 from dpetzel/nullbooleanfield_fixTom Christie
Fix infered field type for models.NullBooleanField
2013-12-16Merge branch 'master' of https://github.com/tomchristie/django-rest-frameworkTom Christie
2013-12-16Add CONTRIBUTING.mdTom Christie
2013-12-16TypoTom Christie
2013-12-16Merge pull request #1298 from craigds/fix-nested-serializers-with-renamed-fieldsTom Christie
Fix nested serializers with renamed fields
2013-12-16Don't import compat.py from authtoken.models. Closes #1297Tom Christie
2013-12-16Fix expansion of writable nested serializers where the inner fields have ↵Craig de Stigter
source set.
2013-12-14Update django-oauth-plus versionTom Christie
2013-12-14Add note on pagination bugfix. Closes #1293.Tom Christie
2013-12-13Added @philipforget for work on #1232. Thanks :)Tom Christie
2013-12-13Updated release notesTom Christie
2013-12-13Compat fixes for django-oauth-plus versions 2.0-2.2.1Tom Christie
2013-12-13Merge branch 'master' of git://github.com/philipforget/django-rest-framework ↵Tom Christie
into philipforget-master
2013-12-13Links to drf-nested-routersTom Christie
2013-12-13Add notes on lookup_prefix argument and why it's there even though unused by ↵Tom Christie
the default implementations.
2013-12-13Merge pull request #1281 from alanjds/router-prefix-patchTom Christie
'lookup_prefix' on SimpleRouter.get_lookup_regex, easing code de-duplication
2013-12-13Update release notesTom Christie
2013-12-13Merge pull request #1291 from kevin-brown/issue_1101Tom Christie
Fix default values always being False for browsable API
2013-12-13Fix default values always being False for browsable APIKevin Brown
This fixes a bug that was introduced in 28ff6fb [1] for the browsable API, specifically with how it handled default values for boolean fields. Previously, it had a global default for boolean fields set to `False`, which was different than the standard None that was used elsewhere. Because this only needed to be done for the browsable API, a fix was put into place that only set the default to `False` when form data was passed into the serializer. This had the unintended side effect of overriding any default set on the boolean field. This fixes #1101 [2] by only overriding the default if the default is `None`, which is the default for all fields. [1]: https://github.com/tomchristie/django-rest-framework/commit/28ff6fb1ec02b7a04c4a0db54885f3735b6dd43f [2]: https://github.com/tomchristie/django-rest-framework/issues/1101
2013-12-13Merge branch 'master' into 2.4.0Tom Christie
Conflicts: .travis.yml docs/api-guide/routers.md docs/topics/release-notes.md rest_framework/compat.py