Tom Christie
c092b4df78
Merge pull request #1641 from javins/login-title
...
Refactor login template to extend base.
2014-08-18 20:28:34 +01:00
Tom Christie
3b899c9d57
Merge pull request #1726 from ikame/master
...
Leave status responsibility to parent class
2014-08-18 19:59:23 +01:00
Tom Christie
e85ef3b479
Merge pull request #1772 from tomchristie/fix-1583
...
Copy filter_backends class attribute before returning it.
2014-08-18 16:14:45 +01:00
Tom Christie
9f3c7e8930
Copy filter_backends class attribute before returning it.
2014-08-18 15:34:23 +01:00
Tom Christie
33af92e019
Always uppercase X-Http-Method-Override methods. Closes #1718 .
2014-08-18 15:14:30 +01:00
Tom Christie
8244c7cc33
Merge pull request #1711 from kdazzle/ModelViewSet-queryset-static-property
...
Issue #1707 : Add documentation to api-docs.viewsets
2014-08-18 12:25:03 +01:00
Tom Christie
0e918055c7
Merge pull request #1739 from kevinlondon/patch-3
...
Updated documentation for urls.py
2014-08-18 12:15:32 +01:00
Aymeric Derbois
a6901ea36d
Add test for SerializerMethodField
2014-08-16 15:53:00 +02:00
John Whitlock
34c1da3515
ModelSerializer.restore_object - errors as list
...
When a ValueError is raised in ModelSerializer.restore_object, the error
is set to a one-element list, rather than a bare string.
2014-08-13 15:31:25 -05:00
Tom Christie
09c53bbac9
Refactor JSONRenderer slightly for easier overriding
2014-08-11 16:20:27 +01:00
Kevin London
aac864a55f
Updated documentation for urls.py
...
I made a small change in the order of the documentation for urls.py. I feel it helps make it clear which lines you should add to the root settings.
2014-08-07 11:02:48 -07:00
Kevin London
617745eca0
Update description of OrderingFilter
...
I added a brief description of how you could specify a different query parameter for the OrderingFilter.
2014-08-06 16:26:56 -07:00
Jason Alan Palmer
2d6469348d
Remove duplicate class attributes
...
These duplicate attributes are ignored by at least Firefox and Chrome, so this change has no effect on the style
2014-08-05 10:25:48 -04:00
Anler Hp
ebcc78d96c
Leave status responsibility to parent class
...
Django's `HttpResponse` class checks for the `status` param when it's
initialized, if it's `None` it uses the class attribute
`status_code` and thanks to that we can do things like:
```
class BadRequest(HttpResponse):
status_code = 400
```
Now, that doesn't work when inheriting from rest-framework's `Response`:
```
class BadRequest(rest_framework.response.Response):
status_code = 400 # Bad, it's always ignored
```
Because a default status of `200` is being specified in
`rest_framework.response.Response`. I think is more Django-friendly to
just leave that status default value to `None` and leave the
responsibility of choosing its value to the parent class: `HttpResponse`.
2014-08-01 10:20:10 +02:00
Xavier Ordoquy
5e02f015b8
Better fix for the Django 1.3 compat
2014-07-29 10:30:08 +02:00
Xavier Ordoquy
59d0a0387d
Fixed the Django 1.3 compat
2014-07-29 10:20:10 +02:00
Xavier Ordoquy
4210fedd21
Fixed the cache issue with Django 1.7 rc*
2014-07-29 08:35:00 +02:00
Kyle
e40ffd60d4
Issue #1707 - Add documentation about the caching of GenericAPIView.queryset
...
to the `queryset` property, `get_queryset()`, and do generic-views.md; remove
changes to the viewsets.md documentation from my last commit.
2014-07-28 10:11:40 -07:00
Xavier Ordoquy
c7a988eb38
Merge remote-tracking branch 'reference/master'
2014-07-28 07:53:04 +02:00
Xavier Ordoquy
fe048dc4fb
Fix #1712 (issue when django-guardian is installed but not configured/used)
2014-07-28 07:37:30 +02:00
Ron Cohen
e3aff6a567
Updated test docstring related to missing bearer token.
2014-07-25 13:38:42 +00:00
Ron Cohen
05882cc599
Sending "Bearer" and "Bearer " resulted in a 500.
2014-07-25 10:55:53 +00:00
Serhiy Voyt
3326ddc865
Merge branch 'master' into modelserialization-charfield-with-null
2014-06-27 18:10:50 +03:00
TankorSmash
544183f64f
typo in the docs
2014-06-16 19:13:02 -04:00
Walt Javins
b4c7717cb8
Refactor login template to extend base.
...
While experimenting with extending DRF, I found that the login page
1) had no title, and 2) duplicated <head> info from base.html.
This change adds a new {% block body %} to the base.html template
which allows override of the entire html <body>. login_base.html
has its duplicated head info stripped, and now extends base.html
to share common html <head> templating.
As part of this change, pretify.css is unnecessarily added to
login_base.html. If this is deemed a problem, it will be easy to
block that css out, and have login_base.html override the block.
Ideally, I would have liked to create a new api_base.html that extends
base.html, move the api specific logic into that template, and leave
base.html content agnostic, to truely be a unifying base for all DRF
pages. But this change would break current apps that override
api.html and expect base.html to be the immediate super template. :/
This change is benificial because it:
- removes duplication of header declarations (mostly css includes)
- adds a html title to the login page
- standardizes html header info across all DRF pages
Docs are updated to reflect the new structure.
2014-06-13 22:26:00 -07:00
Tom Christie
1386767013
Version 2.3.14
2014-06-12 11:47:26 +01:00
Xavier Ordoquy
e8ec81f5e9
Fixed #1624 (thanks @abraithwaite)
2014-06-08 09:03:21 +02:00
khamaileon
08c4594145
Replace ChoiceField type_label
2014-06-05 12:49:02 +02:00
Danilo Bargen
6cb6bfae1b
Always use specified content type in APIRequestFactory
...
If `content_type` is specified in the `APIRequestFactory`, always
include it in the request, even if data is empty.
2014-05-30 17:53:26 +02:00
khamaileon
eab5933070
Add the allow_add_remove parameter to the get_serializer method
2014-05-26 18:43:50 +02:00
Piper Merriam
807f7a6bb9
Fix _resolve_model to work with unicode strings
2014-05-22 15:18:51 -06:00
John Spray
04c820b8e5
fields: allow help_text on SerializerMethodField
...
...by passing through any extra *args and **kwargs
to the parent constructor.
Previously one couldn't assign help_text to a
SerializerMethodField during construction.
2014-05-22 15:24:35 +01:00
Tom Christie
218b94e606
Merge pull request #1536 from Ian-Foote/choicefield_blank_display_value
...
Allow customising ChoiceField blank display value
2014-05-20 16:03:51 +01:00
allenhu
a1a3ad7639
fix pep8
2014-05-19 09:53:05 +08:00
Xavier Ordoquy
5c12b07681
Added missing import.
2014-05-16 19:40:02 +02:00
Xavier Ordoquy
a704d5a206
Fixed tests for python 3.4
2014-05-16 01:20:40 +02:00
Carlton Gibson
d69d975015
Merge pull request #1564 from alumni/master
...
Fixes #1535 (HTML widget missing `id` attribute)
2014-05-09 10:36:06 +02:00
Carlton Gibson
0ff474d7c4
Updated failing test from #1575
2014-05-08 11:20:03 +02:00
Carlton Gibson
591d5240da
Merge pull request #1575 from ewdicus/iso8601
...
Add colon to time zone offset in readable_datetime_formats
2014-05-08 09:34:06 +02:00
Elliott
11115fde9c
Add colon to time zone offset in readable_datetime_formats
2014-05-07 11:37:20 -07:00
Serhiy Voyt
4e6a21344f
Fixed test.
2014-05-07 18:42:02 +03:00
Serhiy Voyt
27be31bd8a
In case of None value returns empty string instead of NoneType.
2014-05-07 18:37:08 +03:00
Serhiy Voyt
1ce1f387b0
Charfied from_native method returns default instead of None. Updated tests.
2014-05-06 21:57:25 +03:00
Serhiy Voyt
98cc821099
Extended test with case of saveing model with blank not null field.
2014-05-06 20:34:30 +03:00
Lucian Mocanu
708c7b3a81
Added test case to check if the proper attributes are set on html widgets.
2014-05-06 14:17:51 +02:00
Carlton Gibson
8e78a38de5
Merge pull request #1485 from Atrasoftware/master
...
Use help_text, verbose_name, editable attributes for related fields
2014-05-06 13:43:15 +02:00
Lucian Mocanu
4e33ff05d9
Automatically set the field name as value for the HTML id
attribute on the rendered widget.
2014-05-04 00:12:08 +02:00
Charlie Denton
ccf3c508bd
Fix missing message in ValidationError
2014-05-02 21:58:49 +01:00
Charlie Denton
c15dab903d
Mark strings in AuthTokenSerializer as translatable
2014-05-01 10:18:16 +01:00
Xavier Ordoquy
5333a93126
Merge pull request #1409 from tuky/patch-1
...
remove spaces from META['HTTP_X_FORWARDED_FOR'] as throttle key
2014-04-30 21:38:21 +02:00