Skip to content

Remove the 'docs for 3.0' banners. #2652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Full documentation for the project is available at [http://www.django-rest-frame

---

**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/).
**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/).

For more details see the [3.1 release notes][3.1-announcement]

---

Expand All @@ -23,7 +25,7 @@ Some reasons you might want to use REST framework:
* [Authentication policies][authentication] including optional packages for [OAuth1a][oauth1-section] and [OAuth2][oauth2-section].
* [Serialization][serializers] that supports both [ORM][modelserializer-section] and [non-ORM][serializer-section] data sources.
* 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].
* [Extensive documentation][index], and [great community support][group].
* [Extensive documentation][docs], and [great community support][group].

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

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

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

[tox]: http://testrun.org/tox/latest/

[tehjones]: https://twitter.com/tehjones/status/294986071979196416
[wlonk]: https://twitter.com/wlonk/status/261689665952833536
[laserllama]: https://twitter.com/laserllama/status/328688333750407168

[docs]: http://www.django-rest-framework.org/
[urlobject]: https://github.com/zacharyvoase/urlobject
[markdown]: http://pypi.python.org/pypi/Markdown/
[django-filter]: http://pypi.python.org/pypi/django-filter
[security-mail]: mailto:[email protected]
[3.1-announcement]: http://www.django-rest-framework.org/topics/3.1-announcement/
Empty file modified docs/api-guide/authentication.md
100755 → 100644
Empty file.
6 changes: 0 additions & 6 deletions docs/api-guide/fields.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
source: fields.py

---

**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.

---

# Serializer fields

> Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format.
Expand Down
6 changes: 0 additions & 6 deletions docs/api-guide/generic-views.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
source: mixins.py
generics.py

---

**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.

---

# Generic views

> 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.
Expand Down
8 changes: 1 addition & 7 deletions docs/api-guide/metadata.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
source: metadata.py

---

**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.

---

# Metadata

> [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.
Expand Down Expand Up @@ -59,7 +53,7 @@ Or you can set the metadata class individually for a view:

class APIRoot(APIView):
metadata_class = APIRootMetadata

def get(self, request, format=None):
return Response({
...
Expand Down
6 changes: 0 additions & 6 deletions docs/api-guide/relations.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
source: relations.py

---

**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.

---

# Serializer relations

> Bad programmers worry about the code.
Expand Down
6 changes: 0 additions & 6 deletions docs/api-guide/requests.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
source: request.py

---

**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.

---

# Requests

> If you're doing REST-based web service stuff ... you should ignore request.POST.
Expand Down
8 changes: 1 addition & 7 deletions docs/api-guide/serializers.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
source: serializers.py

---

**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.

---

# Serializers

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

from datetime import datetime

class Comment(object):
def __init__(self, email, content, created=None):
self.email = email
Expand Down
14 changes: 4 additions & 10 deletions docs/api-guide/validators.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
source: validators.py

---

**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.

---

# Validators

> Validators can be useful for re-using validation logic between different types of fields.
Expand Down Expand Up @@ -33,7 +27,7 @@ When you're using `ModelSerializer` all of this is handled automatically for you
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.

class CustomerReportRecord(models.Model):
time_raised = models.DateTimeField(default=timezone.now, editable=False)
time_raised = models.DateTimeField(default=timezone.now, editable=False)
reference = models.CharField(unique=True, max_length=20)
description = models.TextField()

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

If we open up the Django shell using `manage.py shell` we can now
If we open up the Django shell using `manage.py shell` we can now

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

def even_number(value):
if value % 2 != 0:
raise serializers.ValidationError('This field must be an even number.')
raise serializers.ValidationError('This field must be an even number.')

## Class based

Expand All @@ -213,7 +207,7 @@ To write a class based validator, use the `__call__` method. Class based validat
class MultipleOf:
def __init__(self, base):
self.base = base

def __call__(self, value):
if value % self.base != 0
message = 'This field must be a multiple of %d.' % self.base
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

---

**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.
**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.

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

---

Expand Down