Commit Graph

171 Commits

Author SHA1 Message Date
Mariusz Felisiak
3001b56e06 Fixed Django 2.0 compatibility due to django.conf.urls.include parameters change. (#4866) 2017-01-30 16:11:19 +00:00
Mariusz Felisiak
1c437a793c
Removed unnecessary importlib wrapper. 2017-01-29 20:38:39 +01:00
Mariusz Felisiak
5c0f9f147c Removed unnecessary utc wrapper. (#4839) 2017-01-23 16:22:32 +00:00
Asif Saifuddin Auvi
5717e853db fix import of utc 2017-01-18 19:28:57 +06:00
Asif Saifuddin Auvi
5436df54c6 added compat shim for utc/UTC 2017-01-18 19:06:41 +06:00
Tom Christie
30bf9df5d0 Fix guardian import (#4612) 2016-10-21 16:59:43 +01:00
Lukasz Karolewski
0b346e94b1 changing order of imports (#4601)
when using with django-filter and rest_framework_swagger need to import coreapi before django-filter as django filter tries to load rest_framework.coreapi which is undefined at this point
2016-10-21 15:00:25 +01:00
Tom Christie
0dec36eb41 Version 3.5 (#4525)
* Start test case

* Added 'requests' test client

* Address typos

* Graceful fallback if requests is not installed.

* Add cookie support

* Tests for auth and CSRF

* Py3 compat

* py3 compat

* py3 compat

* Add get_requests_client

* Added SchemaGenerator.should_include_link

* add settings for html cutoff on related fields

* Router doesn't work if prefix is blank, though project urls.py handles prefix

* Fix Django 1.10 to-many deprecation

* Add django.core.urlresolvers compatibility

* Update django-filter & django-guardian

* Check for empty router prefix; adjust URL accordingly

It's easiest to fix this issue after we have made the regex.  To try
to fix it before would require doing something different for List vs
Detail, which means we'd have to know which type of url we're
constructing before acting accordingly.

* Fix misc django deprecations

* Use TOC extension instead of header

* Fix deprecations for py3k

* Add py3k compatibility to is_simple_callable

* Add is_simple_callable tests

* Drop python 3.2 support (EOL, Dropped by Django)

* schema_renderers= should *set* the renderers, not append to them.

* API client (#4424)

* Fix release notes

* Add note about 'User account is disabled.' vs 'Unable to log in'

* Clean up schema generation (#4527)

* Handle multiple methods on custom action (#4529)

* RequestsClient, CoreAPIClient

* exclude_from_schema

* Added 'get_schema_view()' shortcut

* Added schema descriptions

* Better descriptions for schemas

* Add type annotation to schema generation

* Coerce schema 'pk' in path to actual field name

* Deprecations move into assertion errors

* Use get_schema_view in tests

* Updte CoreJSON media type

* Handle schema structure correctly when path prefixs exist. Closes #4401

* Add PendingDeprecation to Router schema generation.

* Added SCHEMA_COERCE_PATH_PK and SCHEMA_COERCE_METHOD_NAMES

* Renamed and documented 'get_schema_fields' interface.
2016-10-10 13:03:46 +01:00
Dmitry Dygalo
e1768bdc16 Fixed various typos (#4366) 2016-08-08 09:32:22 +01:00
Tom Christie
11a2468379 Access request.user.is_authenticated as property not method, under Django 1.10+ (#4358)
* For Django >=1.10 use user.is_authenticated, not user.is_authenticated()
2016-08-05 11:04:01 +01:00
Tom Christie
061e0ed084 Added url and schema_url arguments (#4321) 2016-07-28 12:08:34 +01:00
Aymeric Augustin
a436515196 Add missing return statement.
Fix #4272.
2016-07-16 22:44:49 +02:00
Tom Christie
6ff9840bde Schemas & client libraries. (#4179)
* Added schema generation support.
* New tutorial section.
* API guide on schema generation.
* Topic guide on API clients.
2016-07-04 16:38:17 +01:00
Tom Christie
9c996d7d2a Clean up existing deprecation warnings. (#4166)
* Add Meta.fields = '__all__' to serializer classes where required.
* Add explicit on_delete=models.CASCADE to ForeignKey fields.
* Use '.remote_field' and '.model' in preference to '.rel' and '.to' when inspecting model fields.
* Use new value_from_object in preference to internal _get_val_from_obj
2016-06-02 14:39:10 +01:00
Tom Christie
994e1ba927 Django 1.10 support. (#4158)
* Added TEMPLATES setting to tests
* Remove deprecated view-string in URL conf
* Replace 'urls = ...' in test classes with override_settings('ROOT_URLCONF=...')
* Refactor UsingURLPatterns to use override_settings(ROOT_URLCONF=...) style
* Get model managers and names in a version-compatible manner.
* Apply override_settings to a TestCase, not a mixin class
* Use '.callback' property instead of private attributes when inspecting urlpatterns
* Pass 'user' to template explicitly
* Correct sorting of import statements.
* Remove unused TEMPLATE_LOADERS setting, in favor of TEMPLATES.
* Remove code style issue
* BaseFilter test requires a concrete model
* Resolve tox.ini issues
* Resolve isort differences between local and tox environments
2016-06-01 15:31:00 +01: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
Simon Charette
1a052d6ee3 Silenced deprecation warnings on Django 1.8. 2016-02-04 13:49:55 -05: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
Xavier Ordoquy
d6c326623f Make DRF compatible with multi template engine in Django 1.8 2015-11-25 07:37:01 +01:00
Andrei Fokau
2acc6a756c Use related_objects api for Django 1.9+ 2015-11-19 13:04:37 +01:00
Andrei Fokau
802ee5d0ea Fix template.render deprecation warnings for 1.9+ 2015-11-18 17:06:35 +01:00
Michael J. Schultz
abc6fa05e6 Markdown 2.1 compatible 2015-11-09 11:47:00 -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
José Padilla
41d1e42e9c Add compat util for DecimalValidator 2015-10-29 06:42:16 -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
Dulmandakh
431ac45168 Update compat.py
try to import guardian if it's in INSTALLED_APPS
2015-10-09 11:03:19 +08:00
Tom Christie
10dbf1316f Added JSONField. Closes #3170. 2015-09-28 17:25:52 +01:00
Carlton Gibson
45ace5010e Remove OrderedDict fallback 2015-09-22 16:35:38 +02:00
Carlton Gibson
0b34408172 Remove unittest.skipUnless 2015-09-22 16:24:22 +02:00
Carlton Gibson
6e86a53c92 Remove apps.get_model fallback
* Corrects presumed logic error in `ResolveModelWithPatchedDjangoTests`
2015-09-22 16:14:45 +02:00
Carlton Gibson
68c88e180f Remove ContentType import fallback 2015-09-22 15:55:39 +02:00
Carlton Gibson
8ea1606abf Remove Django 1.5 clean_manytomany_helptext fallback 2015-09-21 20:16:52 +02:00
Carlton Gibson
25de8c960f Remove Django 1.5 get_model_name fallback 2015-09-21 20:10:31 +02:00
Carlton Gibson
e625cff8a5 Remove Django 1.5 URLValidator fallback 2015-09-21 16:22:46 +02:00
Carlton Gibson
9216dc9a25 Remove Django 1.5 EmailValidator fallback 2015-09-21 16:20:07 +02:00
Tom Christie
a3067bea55 Merge branch 'master' into version-3.3 2015-09-17 16:24:46 +01:00
Tom Christie
39ec564ae9 Do not access settings on compat import 2015-09-03 14:22:13 +01:00
Tom Christie
24a2c3f5c3 Resolve unittest compat 2015-08-28 10:19:18 +01:00
Tom Christie
e70da5ac6b Compat for GenericForeignKey, GenericRelation 2015-08-28 10:03:08 +01:00
Tom Christie
4f27697467 Fix get_model import 2015-08-27 17:28:12 +01:00
Tom Christie
48540f180a unittest compat fallback 2015-08-27 17:11:53 +01:00
Tom Christie
aeb57913c9 Filter HTML refinments 2015-08-27 14:25:44 +01:00
Tom Christie
b4b2dc18fa Clean-up refactoring of SearchFilter implementation 2015-08-20 11:35:32 +01:00
Tymur Maryokhin
4e5da16961 Remove Django 1.4 compat code 2015-08-07 00:02:29 +02:00
Tom Christie
877e964d7e Don't need to support Django 1.4 with FilePathField. 2015-08-03 10:15:28 +01:00
Tom Christie
8d7c0a8474 Merge branch 'feature/filepathfield' of https://github.com/Ins1ne/django-rest-framework into Ins1ne-feature/filepathfield 2015-08-03 10:09:46 +01:00
Tom Christie
c8ad0cce19 Bump minimum Django version to 1.5 2015-07-30 15:43:39 +01:00
Aider Ibragimov
a1397ac699 fix bugs, move version branching to compat, update ModelSerializer mapping 2015-07-19 00:26:03 +03:00