Mitar
2f49df8242
Run JavaScript only when DOM is ready.
2016-03-12 16:52:31 -08:00
Xavier Ordoquy
4399d601c5
Translation updates.
2016-03-07 20:25:10 +01:00
Jared Lang
e34a34e90b
Fix empty pk detection in HyperlinkRelatedField.get_url
...
This implementation allows detection of empty values that are non-nullable, allowing the field to return None values for such cases
2016-03-07 19:37:48 +01:00
Xavier Ordoquy
97cc83483f
Merge remote-tracking branch 'reference/stable/3.3.x' into stable/3.3.3
2016-03-01 10:39:34 +01:00
Jared Lang
7ac8cc760c
Fix empty pk detection in HyperlinkRelatedField.get_url
...
This implementation allows detection of empty values that are non-nullable, allowing the field to return None values for such cases
2016-02-29 12:56:56 -08:00
Xavier Ordoquy
753f4dc477
Fix sorting order.
2016-02-27 01:46:59 +01:00
Xavier Ordoquy
6ea6e37ac9
Add missing migration file for #3887
2016-02-27 00:51:35 +01:00
Xavier Ordoquy
24a2ec0501
Merge remote-tracking branch 'reference/stable/3.3.x' into stable/3.3.3
2016-02-27 00:36:23 +01:00
José Padilla
69c0de4faa
Merge pull request #3953 from akarambir/remove-old-django-checks
...
Closes #3952 : Remove old django checks from tests and compat
2016-02-19 11:08:45 -04:00
Karambir Singh Nain
69f1e3a9fd
Remove old django checks from tests and compat
...
Remove skipping of tests for Django<1.8. Remove several functions from compat.py not needed for Django>=1.8
2016-02-19 01:47:45 +05:30
Xavier Ordoquy
5e08231453
Remove informations about why the pagination didn't work.
...
We remove a couple of informations to lower the exposition of our internals.
2016-02-17 18:18:19 +01:00
Erick Wilder
8109752061
Closes #3937 . Support callable as the value of initial
for any serializer.Field
2016-02-17 10:52:21 +01:00
Carlton Gibson
20d1fdba69
Fix None UUID ForeignKey serialization
2016-02-16 09:29:48 +01:00
Xavier Ordoquy
f5822e7b71
Bump version to 3.3.3
2016-02-12 13:23:08 +01:00
Xavier Ordoquy
3693e938a4
Merge pull request #3908 from kostya0shift/fix_exceptions_force_text
...
Fixed _force_text_recursive typo
2016-02-12 08:24:13 +01:00
Federico Bond
03b5438d07
Add missing space in serializer error message
2016-02-11 15:09:21 -03:00
blag
89d575a52a
Remove version string from admin template
2016-02-09 05:56:47 -07:00
blag
d2ca8872c0
Remove version string from base template
2016-02-08 22:36:39 -07:00
Mikalai Radchuk
59ab3a291c
Fixes vertical html layout for BooleanField
...
`HTMLFormRenderer` renders `BooleanField` field as not checked if vertical layout are used.
2016-02-08 17:07:16 +03:00
Kostya Esmukov
3ea1fe61a0
Fixed _force_text_recursive typo
2016-02-07 18:58:19 +03:00
Simon Charette
1a052d6ee3
Silenced deprecation warnings on Django 1.8.
2016-02-04 13:49:55 -05:00
Mikalai Radchuk
1f2a32d506
Fixes docstrings in fields.py
...
Fixes docstrings for `to_choices_dict` and `flatten_choices_dict` functions in fields.py.
Mistakes were introduced in #4d69286
2016-02-03 12:36:00 +03:00
José Padilla
0512c394a3
Merge pull request #3875 from m1kola/bugfix/HTMLFormRenderer-render-renderer_context-default
...
Fixes AttributeError in HTMLFormRenderer.render
2016-02-01 16:28:11 -04:00
Mikhail Nacharov
d0f7b04805
enhancement #3886 Internationalization in admin interface rest_framework.authtoken
...
+ verbose_name in models.Token fields
+ Meta-options verbose_name & verbose_name_plural
+ Labels in AuthTokenSerializer fields in case of usages in Brousable API
+ provide AppConfig class as described in django documentation with verbose_name came through ugettext_lazy
2016-02-01 13:20:16 +05:00
Mikalay Radchuk
714607307e
Fixes AttributeError in HTMLFormRenderer.render
...
If `HTMLFormRenderer.render` will be called with default arguments,
`AttributeError: 'NoneType' object has no attribute 'get'` will be raised.
2016-01-26 21:26:30 +03:00
Xavier Ordoquy
9e8ddb88fc
Restore the abstract on Token model when the app isn't declared
...
The fact that we don't import Token from authentication doesn't invalidate
the need for the model to be abstract whenever the authtoken isn't listed
in the INSTALLED_APPS.
2016-01-21 13:28:32 +01:00
Xavier Ordoquy
328000fb34
Merge pull request #3624 from d6bels/master
...
Login form autofocus
2016-01-20 18:21:03 +01:00
Xavier Ordoquy
f1b28b4d63
Merge pull request #3605 from ryanhiebert/slug-related-field-queryset
...
RelatedField get_queryset and context
2016-01-20 18:17:29 +01:00
Xavier Ordoquy
e7fbd264ca
Merge pull request #3703 from sniegu/master
...
Add missing csrf_token in AdminRenderer post form.
2016-01-19 16:58:39 +01:00
Xavier Ordoquy
8ea7d6b5c6
Merge remote-tracking branch 'origin/master' into markdown-compat
...
Conflicts:
requirements/requirements-optionals.txt
2016-01-19 15:34:56 +01:00
Brad Montgomery
40b5774a33
QueryParameterVersioning does not use default version
...
QueryParameterVersioning does not fall back to the value used in the `DEFAULT_VERSION` setting, while other versioning schemes do. This looks like a minor change, and incorporates the `self.default_version` set in the superclass.
I'll sheepishly admit that I edited this inline without running any tests or anything, so please let me know if this needs more work.
2016-01-14 12:00:30 -06:00
Mads Jensen
215e1b6c6b
Regarding #3729
...
python -Werror generates warnings informing that on_delete is a required keyword in Django 2.0
2016-01-14 15:14:33 +01:00
Mads Jensen
a9c394f5b7
2015 update in __init__.py file
2016-01-13 12:54:56 +01:00
areski
4e01796303
Test for TimeField not handling empty values
2016-01-11 12:16:26 +01:00
areski
a76c3ed051
Fixed TimeField not handling empty values
2016-01-11 12:14:40 +01:00
Mikalai Radchuk
6b207d93d6
DateField.to_representation unicode compatibility
2016-01-11 13:11:01 +03:00
José Padilla
057cf13578
Merge pull request #3815 from atombrella/keys_dict_3786
...
Fixes #3786
2016-01-09 22:47:53 -04:00
Tom Christie
f01a3d9c36
Merge pull request #3801 from koordinates/fix-nested-validation-error
...
Fix nested validation error being rendered incorrectly.
2016-01-07 09:22:23 +00:00
Mads Jensen
d4cdb21de9
Fixes #3786
...
Minor fix for dictionary key lookup in settings file
2016-01-06 22:51:11 +01:00
Kevin Massey
7cd3933144
Fixes #3804 , avoiding update of Meta.extra_kwargs
...
Added unit test to cover.
2016-01-06 15:04:51 -05:00
Craig de Stigter
651319e2da
Fix nested validation error being rendered incorrectly.
...
Previously an extra list wrapped nested validation errors raised from serializer's validate() methods.
That was inconsistent with the format of validation errors raised by validate_<fieldname> methods.
i.e. these two resulted in *different* behaviour:
def validate_foo(self):
raise ValidationError(['bar'])
def validate(self):
raise ValidationError({'foo': ['bar']})
2016-01-06 16:05:43 +13:00
Tom Christie
37f7b76f72
Merge pull request #3785 from sheppard/authtoken-import
...
don't import authtoken model until needed
2016-01-05 17:28:48 +00:00
S. Andrew Sheppard
1712c00001
update invalid token case
2016-01-05 09:42:22 -06:00
Xavier Ordoquy
dceb686700
Merge pull request #3774 from tomchristie/decimalfield_validators
...
Min/MaxValueValidator is no longer transferred from a model's DecimalField
2016-01-04 16:36:44 +01:00
Kevin Brown
a772326112
Merged two DecimalValidator tests together
...
These two tests were previously added in
7d79cf35b7
but we have now discovered that there are not actually two separate
cases, there was just a bug in the code that made it look that way.
This also removes a redundant check to see if `DecimalValidator` was
defined.
2016-01-04 10:22:17 -05:00
S. Andrew Sheppard
ff29fdd875
don't import authtoken model until needed
2015-12-30 15:44:19 -06:00
Kevin Brown
87605e1e39
Don't filter out the DecimalValidator if it is not supported
...
Previously, all validators set on a DecimalField in Django would be
stripped when converted to a Django REST framework field. This was
because any validator that was an instance of `DecimalValidator` would
be removed, and when `DecimalValidator` wasn't supported (so it was
`None`), all validators would be removed.
This fixes the issue by only removing the `DecimalValidator` instances
if the `DecimalValidator` is supported.
2015-12-24 14:10:48 -05:00
Robert Romano
5fc938cbd1
The Internet Engineering Task Force approved the new HTTP status code 451. Adding to status.py and docs appropriately.
2015-12-23 12:54:17 -08:00
Michael Lissner
f15026be10
Fixes #3756 , adding the name to the HTML title, if it exists.
2015-12-22 10:31:18 -08:00
Tom Christie
18cdfcd712
Merge pull request #3731 from mjparker777/master
...
Issue 3726 DateTimeField not handling empty values
2015-12-18 11:27:12 +00:00
Tom Christie
61e7f7b0cc
Merge pull request #3715 from Cheglader/settings_errors
...
Raise error when setting a removed rest_framework setting for #3644
2015-12-18 11:19:06 +00:00
mjparker777
d9c360845d
changed datefield to match code layout of datetime and time changes
2015-12-17 12:21:44 -07:00
mjparker777
f3d5e1482b
Merge remote-tracking branch 'upstream/master'
2015-12-17 12:20:47 -07:00
Luis San Pablo
c389aeb051
Lint import ordring
2015-12-16 18:46:23 -06:00
Luis San Pablo
62e2a9706f
Fixed import order settings
2015-12-16 18:37:50 -06:00
Luis San Pablo
dab6bf4b1a
Changed error to warning message
2015-12-16 18:35:02 -06:00
Tom Linford
c78980771d
AutoFilterSet should subclass from self.default_filter_set
2015-12-16 15:36:07 -08:00
Dan Lipsitt
fb94be18be
docstring typo fix: DateAndFiles -> DataAndFiles
2015-12-16 10:42:10 -08:00
Xavier Ordoquy
ef8bde2d42
Bump version to 3.3.2
2015-12-14 07:33:17 +01:00
Xavier Ordoquy
485c297a04
Translations update.
2015-12-14 07:31:38 +01:00
mjparker777
decc5fa901
Merge remote-tracking branch 'upstream/master'
2015-12-13 17:51:06 -07:00
mjparker777
fc08236ab8
updated timefield also
2015-12-13 16:09:56 -07:00
mjparker777
bf60c08010
Issue 3726 DateTimeField not handling empty values
2015-12-13 12:21:13 -07:00
Luis San Pablo
fbd89d6b7e
Moved SETTINGS_DOC
2015-12-12 02:02:53 -06:00
Xavier Ordoquy
7a5d81c0b4
Add extra args/kwargs to authtoken's views ( #3718 )
2015-12-11 07:16:04 +01:00
Raphael Merx
fcc0a70f7c
Fixed suggestion for format in test renderer
...
Rendered would suggest using format='JSON' when the right argument is
format='json'.
2015-12-10 15:19:03 -08:00
Luis San Pablo
a615e37277
Removed depreceated constant
2015-12-07 23:30:45 -06:00
Luis San Pablo
5802dc0f98
Initial, fixes #3644
2015-12-07 23:25:40 -06:00
Luis San Pablo
0f85165b69
Fixed num args for %
2015-12-07 22:36:02 -06:00
Luis San Pablo
5117dad2ca
removed setting typo
2015-12-07 22:32:23 -06:00
Luis San Pablo
13c66b9dfe
Return error
2015-12-07 21:53:33 -06:00
Luis San Pablo
d86a901aff
Removed Settings raise attribute error
2015-12-07 21:45:44 -06:00
knbk
e203967e09
Add app_name to rest_framework.urls.
...
This allows users in Django 1.9+ to include the authentication urls
without specifying the namespace, as in:
urlpatterns = [
...
url(r'^auth/', include('rest_framework.urls'))
]
2015-12-08 02:25:00 +01:00
Xavier Ordoquy
f3949e994d
Update base translation file.
2015-12-07 18:56:47 +01:00
Tom Christie
c227b8188e
Merge pull request #3705 from mcastle/patch-2
...
Admin and API browser fails for views without a filter_class
2015-12-07 10:10:24 +00:00
Marlon
c1b70538a2
Resolve #3596
...
Uses #3597 , but without using `Context`.
2015-12-05 11:10:39 -06:00
Piotr Śniegowski
2faa7bc288
Add missing csrf_token in AdminRenderer post form.
2015-12-04 23:23:56 +01:00
Luis San Pablo
44a3d41ce9
Implement __getnewargs__ for #3628
2015-12-03 21:12:03 +00:00
bphillips
c153bcb479
Added validation to UUIDField to properly catch invalid input types (lists, tuples, etc).
2015-12-01 14:09:10 -05:00
José Padilla
d2f90fd6af
Merge pull request #3662 from awwester/ticket_3228
...
#3228 - add confirm modal for delete
2015-12-01 10:50:34 -04:00
Adam Wester
6d1ed851b5
#3228 - add confirm modal for delete
2015-12-01 07:51:29 -05:00
Tom Christie
832d6322a7
Merge pull request #3631 from syphar/paginat
...
allow setting a custom Django Paginator class
2015-11-30 20:58:32 +00:00
Tom Christie
8dea1aeed0
Merge pull request #3677 from Ernest0x/patch-4
...
Updated NestedBoundField to also handle empty string when rendering its form
2015-11-27 13:21:58 +00:00
Tom Christie
0d0aff44ac
Merge pull request #3668 from akx/exc-hiding
...
Reveal previously hidden AttributeErrors and TypeErrors
2015-11-27 11:51:25 +00:00
Aarni Koskela
69688289ce
Ensure Django{Model,Object}Permissions
don't hide exceptions.
...
Quietly catching `AttributeError` and `TypeError` when calling
`get_queryset()` is rather insidious, as those exceptions get caught no
matter where they might happen in the call stack.
2015-11-27 12:46:30 +02:00
Petros Moisiadis
570187b959
Updated NestedBoundField to also handle empty string when rendering its form
...
If a NestedBoundField field has a value of `None` and is inside another NestedBoundField field, it will have its value converted to an empty string while the form of its enclosing field is being rendered. So, NestedBoundField fields with an empty string value must be handled the same way as NestedBoundField fields with a `None` value.
2015-11-26 17:07:57 +02:00
Aarni Koskela
47c9bb143c
Fix smart_repr()
to also clean upper-case hex addresses.
...
Windows Pythons seem to like printing addresses in upper-case, while Linux
Pythons like lower-case hexes.
This led to an amusing (for a given value of "amusing", anyway) situation
where some repr tests would fail if the objects they were testing happened
to be allocated at an address with a hex digit in the range A..F.
2015-11-26 15:48:04 +02:00
Xavier Ordoquy
d6c326623f
Make DRF compatible with multi template engine in Django 1.8
2015-11-25 07:37:01 +01:00
Steven Loria
b209fe04fc
Fix typo in docstring for ReadOnlyField
2015-11-20 13:51:21 -05:00
Andrei Fokau
2acc6a756c
Use related_objects api for Django 1.9+
2015-11-19 13:04:37 +01:00
Tom Christie
378b7b8963
Merge pull request #3655 from andreif/fix/headers-order
...
Sort response headers in api renderer
2015-11-18 17:25:54 +00:00
Xavier Ordoquy
edc5a79b85
Merge pull request #3497 from Ins1ne/feature/3340
...
update docs about detail page link for AdminRenderer
2015-11-18 17:38:07 +01:00
Andrei Fokau
8692816401
Sort response headers in api renderer to keep the same order
2015-11-18 17:33:12 +01:00
Ryan Hiebert
a19f152065
Note possibility of overriding get_queryset
2015-11-18 10:26:00 -06:00
Andrei Fokau
802ee5d0ea
Fix template.render deprecation warnings for 1.9+
2015-11-18 17:06:35 +01:00
Ryan Hiebert
389b48e394
Avoid making a new module for this function
2015-11-18 08:19:27 -06:00
Tom Christie
04158e187e
Merge pull request #3513 from pattisdr/feature/ListField_needs_to_enforce_list
...
ListField does not enforce that input is a list
2015-11-18 12:19:40 +00:00
Ryan Hiebert
dca2de3a5c
Make the override check a utility function
2015-11-16 12:21:58 -06:00
Martin Hill
ff36cbe4ba
same logic, more pythonic
2015-11-14 23:04:32 -05:00
Martin Hill
bac6f1fcf4
check if field.to_fields is None
2015-11-14 18:26:29 -05:00
Martin Hill
e475464945
fix for issue #3634
2015-11-14 17:00:07 -05:00
Ryan Hiebert
fe12816b82
Move default validation back into init method
2015-11-13 15:16:27 -06:00
Denis Cornehl
3806af3d15
allow setting a custom Django Paginator in pagination.PageNumberPagination
2015-11-13 16:04:12 +01:00
d6bels
82eb4c8d71
Login form autofocus
2015-11-11 10:51:20 +01:00
Michael J. Schultz
abc6fa05e6
Markdown 2.1 compatible
2015-11-09 11:47:00 -06:00
Ryan Hiebert
f2452936e9
Allow no queryset when get_queryset overridden
...
The user may wish to provide a dynamic queryset on a `RelatedField`
based on the `context`. The way to do that is to create a subclass of
`RelatedField` (or a child) and override the `get_queryset` method.
However, this is undocumented, and instantiating that field without a
`queryset` argument (because it's not needed) will raise an assertion
error.
Document `.get_queryset(self)` as an official part of the API of
`RelatedField`, and don't enforce the use of `queryset` when
`get_queryset` is overridden.
2015-11-05 17:34:02 -06:00
Michael J. Schultz
b2e74fb523
Use markdown 2.6 extension_configs to configure extension
2015-11-05 10:52:31 -06:00
Michael J. Schultz
d9d34e4886
Use full python dot path to extension
2015-11-05 10:48:19 -06:00
Michael J. Schultz
276bc3bc2b
Remove safe_mode since it is not safe.
2015-11-05 10:47:56 -06:00
nfletton
f85ad301eb
Fix regression causing raw data form to not display
2015-11-04 15:43:25 -07:00
Tom Christie
33b512b1f2
Version 3.3.1
2015-11-04 14:49:57 +00:00
Tom Christie
544c24e7cb
Merge pull request #3593 from tomchristie/primary-key-check-for-to-field
...
Proper 'primary key' checking on to_fields.
2015-11-04 14:49:11 +00:00
Tom Christie
54b79db214
Proper 'is primary key' checking
2015-11-04 14:37:32 +00:00
Tom Christie
95f92e995c
Merge pull request #3560 from ericholscher/fix-empty-filter
...
Allow HTML to render when no filter_class is defined.
2015-11-04 14:20:03 +00:00
Tom Christie
bfdf795843
Merge pull request #3592 from tomchristie/request-parsing-when-post-accessed
...
Request parsing when .POST accessed
2015-11-04 14:17:55 +00:00
Tom Christie
d587ad1021
Use REST framework request parsing when accessing old-style .POST
2015-11-04 14:10:51 +00:00
Xavier Ordoquy
ce491b3424
Merge pull request #3568 from jpadilla/decimal-validator
...
Add compat util for DecimalValidator
2015-10-30 12:54:08 +01:00
José Padilla
08e4a98822
Merge pull request #3564 from mcastle/patch-1
...
Fix trans template tag error on admin
2015-10-30 06:29:25 -04:00
JocelynDelalande
3b25207099
typo
2015-10-29 16:20:44 +01:00
José Padilla
41d1e42e9c
Add compat util for DecimalValidator
2015-10-29 06:42:16 -04:00
Marlon
3c6ce9dfc0
Fix trans template tag error
...
Trans template tag requires `{% load i18n %}` at top of template.
2015-10-28 22:47:52 -05:00
Eric Holscher
32bd1a2f0b
Use better names for filter variable
2015-10-28 14:36:24 -07:00
Eric Holscher
378d6a1a19
Allow HTML to render when no filter_class is defined.
...
Previously it required a filter_class,
or else it would error when calling `cls()`.
This now sets the `filter` context to `None`
if one does not exist.
Fixes #3559
2015-10-28 12:39:20 -07:00
Rense VanderHoek
0d568ed59f
format_html was missing in optional_logout template-tag
...
The new format_html() was still missing in optional_logout template-tag
at the NoReverseMatch exception.
2015-10-28 18:48:58 +01:00
José Padilla
b8c9c809ff
Merge pull request #3547 from nikolas/bootstrap-3.3.5
...
Update bootstrap from 3.2.0 to 3.3.5
2015-10-28 09:42:01 -04:00
Tom Christie
bb555e6e5e
Version 3.3.0
2015-10-28 11:32:15 +00:00
Tom Christie
fa6f053323
Merge pull request #3544 from dursk/nested-as-form-fields
...
Correctly handle False in NestedBoundField.as_form_field()
2015-10-27 16:55:36 +00:00
Nik Nyby
8c6ded38de
Update bootstrap from 3.2.0 to 3.3.5
2015-10-26 10:40:59 -04:00
José Padilla
21cad8646a
Use format_html in tags that generate HTML
2015-10-25 08:31:28 -04:00
Matthew Madurski
8aed3d4862
Correctly handle false in nested as_form_field
2015-10-24 19:48:17 -04:00
Tom Christie
84e9013417
Merge pull request #3531 from tomchristie/version-3.3
...
Version 3.3
2015-10-23 16:24:08 +01:00
Tom Christie
0fb1ebcfcf
Remove unused import
2015-10-23 16:07:48 +01:00
José Padilla
d64bfef56a
Map all supported FilePathField options
2015-10-23 10:08:29 -04:00
auvipy
fa93d79026
removed south_migrations directory
2015-10-23 10:00:01 -04:00
auvipy
b71e6b596f
removed south migrations
2015-10-23 10:00:00 -04:00
Tom Christie
cf33008571
Release notes etc
2015-10-22 14:05:52 +01:00
Tom Christie
c53c9eddfe
Merge pull request #3315 from tomchristie/filters
...
First pass at HTML rendering for filters
2015-10-22 11:42:35 +01:00
Tom Christie
0c6d46729c
Docs on the filter HTML interface
2015-10-22 11:37:27 +01:00
Tom Christie
6305ae8916
Merge pull request #3475 from tomchristie/forms-api
...
Forms API
2015-10-22 09:59:57 +01:00
likeon
322bda8159
Added support for the to_field on ForeignKey fields
2015-10-21 15:33:18 +03:00
Dawn Pattison
8fa7c5c914
Exclude collections.Mapping from allowable data types in ListField
2015-10-20 08:56:39 -04:00
Tom Christie
34eb18b498
Merge branch 'master' into filters
...
Conflicts:
rest_framework/compat.py
rest_framework/filters.py
2015-10-19 13:14:42 +01:00
Omer Katz
2e178bc970
Replaced all dict and set conversions from lists to dict and set literals.
2015-10-17 12:00:11 +03:00
Dawn Pattison
dac1637bb3
Use set instead of Set
2015-10-16 16:06:18 -04:00
Dawn Pattison
b9316154b1
Add tuple and Set to allowed ListField data types
2015-10-16 16:02:13 -04:00
Dawn Pattison
f808f08a0d
Require that data is a list.
2015-10-16 14:43:43 -04:00
José Padilla
a1dad503cf
Map TextField max_length to CharField
2015-10-16 07:17:33 -04:00
Xavier Ordoquy
1b4a41cb80
Merge pull request #3502 from auvipy/master
...
removed south migrations
2015-10-15 10:41:07 +02:00
auvipy
4db2501399
removed south_migrations directory
2015-10-15 14:17:56 +06:00
auvipy
392df94693
removed south migrations
2015-10-15 14:16:35 +06:00