Skip to content

Commit e520ea0

Browse files
committed
Merge pull request #2652 from jpadilla/master
Remove the 'docs for 3.0' banners.
2 parents d46d860 + 140b94c commit e520ea0

10 files changed

+13
-65
lines changed

README.md

+5-15
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Full documentation for the project is available at [http://www.django-rest-frame
99

1010
---
1111

12-
**Note**: We have now released Django REST framework 3.0. For older codebases you may want to refer to the version 2.4.4 [source code](https://github.com/tomchristie/django-rest-framework/tree/version-2.4.x), and [documentation](http://tomchristie.github.io/rest-framework-2-docs/).
12+
**Note**: We have now released Django REST framework 3.1. For older codebases you may want to refer to the version 2.4.4 [source code](https://github.com/tomchristie/django-rest-framework/tree/version-2.4.x), and [documentation](http://tomchristie.github.io/rest-framework-2-docs/).
13+
14+
For more details see the [3.1 release notes][3.1-announcement]
1315

1416
---
1517

@@ -23,7 +25,7 @@ Some reasons you might want to use REST framework:
2325
* [Authentication policies][authentication] including optional packages for [OAuth1a][oauth1-section] and [OAuth2][oauth2-section].
2426
* [Serialization][serializers] that supports both [ORM][modelserializer-section] and [non-ORM][serializer-section] data sources.
2527
* Customizable all the way down - just use [regular function-based views][functionview-section] if you don't need the [more][generic-views] [powerful][viewsets] [features][routers].
26-
* [Extensive documentation][index], and [great community support][group].
28+
* [Extensive documentation][docs], and [great community support][group].
2729

2830
There is a live example API for testing purposes, [available here][sandbox].
2931

@@ -186,10 +188,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
186188
[pypi]: https://pypi.python.org/pypi/djangorestframework
187189
[twitter]: https://twitter.com/_tomchristie
188190
[group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
189-
[0.4]: https://github.com/tomchristie/django-rest-framework/tree/0.4.X
190191
[sandbox]: http://restframework.herokuapp.com/
191192

192-
[index]: http://www.django-rest-framework.org/
193193
[oauth1-section]: http://www.django-rest-framework.org/api-guide/authentication/#django-rest-framework-oauth
194194
[oauth2-section]: http://www.django-rest-framework.org/api-guide/authentication/#django-oauth-toolkit
195195
[serializer-section]: http://www.django-rest-framework.org/api-guide/serializers/#serializers
@@ -200,18 +200,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
200200
[routers]: http://www.django-rest-framework.org/api-guide/routers/
201201
[serializers]: http://www.django-rest-framework.org/api-guide/serializers/
202202
[authentication]: http://www.django-rest-framework.org/api-guide/authentication/
203-
[rest-framework-2-announcement]: http://www.django-rest-framework.org/topics/rest-framework-2-announcement/
204-
[2.1.0-notes]: https://groups.google.com/d/topic/django-rest-framework/Vv2M0CMY9bg/discussion
205203
[image]: http://www.django-rest-framework.org/img/quickstart.png
206204

207-
[tox]: http://testrun.org/tox/latest/
208-
209-
[tehjones]: https://twitter.com/tehjones/status/294986071979196416
210-
[wlonk]: https://twitter.com/wlonk/status/261689665952833536
211-
[laserllama]: https://twitter.com/laserllama/status/328688333750407168
212-
213205
[docs]: http://www.django-rest-framework.org/
214-
[urlobject]: https://github.com/zacharyvoase/urlobject
215-
[markdown]: http://pypi.python.org/pypi/Markdown/
216-
[django-filter]: http://pypi.python.org/pypi/django-filter
217206
[security-mail]: mailto:[email protected]
207+
[3.1-announcement]: http://www.django-rest-framework.org/topics/3.1-announcement/

docs/api-guide/authentication.md

100755100644
File mode changed.

docs/api-guide/fields.md

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
source: fields.py
22

3-
---
4-
5-
**Note**: This is the documentation for the **version 3.0** of REST framework. Documentation for [version 2.4](http://tomchristie.github.io/rest-framework-2-docs/) is also available.
6-
7-
---
8-
93
# Serializer fields
104

115
> Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format.

docs/api-guide/generic-views.md

100755100644
-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
source: mixins.py
22
generics.py
33

4-
---
5-
6-
**Note**: This is the documentation for the **version 3.0** of REST framework. Documentation for [version 2.4](http://tomchristie.github.io/rest-framework-2-docs/) is also available.
7-
8-
---
9-
104
# Generic views
115

126
> Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself.

docs/api-guide/metadata.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
source: metadata.py
22

3-
---
4-
5-
**Note**: This is the documentation for the **version 3.0** of REST framework. Documentation for [version 2.4](http://tomchristie.github.io/rest-framework-2-docs/) is also available.
6-
7-
---
8-
93
# Metadata
104

115
> [The `OPTIONS`] method allows a client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.
@@ -59,7 +53,7 @@ Or you can set the metadata class individually for a view:
5953

6054
class APIRoot(APIView):
6155
metadata_class = APIRootMetadata
62-
56+
6357
def get(self, request, format=None):
6458
return Response({
6559
...

docs/api-guide/relations.md

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
source: relations.py
22

3-
---
4-
5-
**Note**: This is the documentation for the **version 3.0** of REST framework. Documentation for [version 2.4](http://tomchristie.github.io/rest-framework-2-docs/) is also available.
6-
7-
---
8-
93
# Serializer relations
104

115
> Bad programmers worry about the code.

docs/api-guide/requests.md

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
source: request.py
22

3-
---
4-
5-
**Note**: This is the documentation for the **version 3.0** of REST framework. Documentation for [version 2.4](http://tomchristie.github.io/rest-framework-2-docs/) is also available.
6-
7-
---
8-
93
# Requests
104

115
> If you're doing REST-based web service stuff ... you should ignore request.POST.

docs/api-guide/serializers.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
source: serializers.py
22

3-
---
4-
5-
**Note**: This is the documentation for the **version 3.0** of REST framework. Documentation for [version 2.4](http://tomchristie.github.io/rest-framework-2-docs/) is also available.
6-
7-
---
8-
93
# Serializers
104

115
> Expanding the usefulness of the serializers is something that we would
@@ -23,7 +17,7 @@ The serializers in REST framework work very similarly to Django's `Form` and `Mo
2317
Let's start by creating a simple object we can use for example purposes:
2418

2519
from datetime import datetime
26-
20+
2721
class Comment(object):
2822
def __init__(self, email, content, created=None):
2923
self.email = email

docs/api-guide/validators.md

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
source: validators.py
22

3-
---
4-
5-
**Note**: This is the documentation for the **version 3.0** of REST framework. Documentation for [version 2.4](http://tomchristie.github.io/rest-framework-2-docs/) is also available.
6-
7-
---
8-
93
# Validators
104

115
> Validators can be useful for re-using validation logic between different types of fields.
@@ -33,7 +27,7 @@ When you're using `ModelSerializer` all of this is handled automatically for you
3327
As an example of how REST framework uses explicit validation, we'll take a simple model class that has a field with a uniqueness constraint.
3428

3529
class CustomerReportRecord(models.Model):
36-
time_raised = models.DateTimeField(default=timezone.now, editable=False)
30+
time_raised = models.DateTimeField(default=timezone.now, editable=False)
3731
reference = models.CharField(unique=True, max_length=20)
3832
description = models.TextField()
3933

@@ -43,7 +37,7 @@ Here's a basic `ModelSerializer` that we can use for creating or updating instan
4337
class Meta:
4438
model = CustomerReportRecord
4539

46-
If we open up the Django shell using `manage.py shell` we can now
40+
If we open up the Django shell using `manage.py shell` we can now
4741

4842
>>> from project.example.serializers import CustomerReportSerializer
4943
>>> serializer = CustomerReportSerializer()
@@ -204,7 +198,7 @@ A validator may be any callable that raises a `serializers.ValidationError` on f
204198

205199
def even_number(value):
206200
if value % 2 != 0:
207-
raise serializers.ValidationError('This field must be an even number.')
201+
raise serializers.ValidationError('This field must be an even number.')
208202

209203
## Class based
210204

@@ -213,7 +207,7 @@ To write a class based validator, use the `__call__` method. Class based validat
213207
class MultipleOf:
214208
def __init__(self, base):
215209
self.base = base
216-
210+
217211
def __call__(self, value):
218212
if value % self.base != 0
219213
message = 'This field must be a multiple of %d.' % self.base

docs/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
---
1111

12-
**Note**: This is the documentation for the **version 3.0** of REST framework. Documentation for [version 2.4](http://tomchristie.github.io/rest-framework-2-docs/) is also available.
12+
**Note**: This is the documentation for the **version 3.1** of REST framework. Documentation for [version 2.4](http://tomchristie.github.io/rest-framework-2-docs/) is also available.
1313

14-
For more details see the [3.0 release notes][3.0-announcement].
14+
For more details see the [3.1 release notes][3.1-announcement].
1515

1616
---
1717

0 commit comments

Comments
 (0)