Updating Channels status regarding inclusion into django core (#424)

* Updating Channels status regarding django inclusion

* Removing the page regarding Cross-Compatibility and the references to it.
This commit is contained in:
Fabien Schwob 2016-11-06 15:15:31 +01:00 committed by Andrew Godwin
parent 6c471ef915
commit 8682e83fd1
3 changed files with 10 additions and 48 deletions

View File

@ -1,44 +0,0 @@
Cross-Compatibility
===================
Channels is being released as both a third-party app for Django 1.8 through 1.10,
and being integrated into Django in future. Both of these implementations will be
very similar, and code for one will work on the other with minimal changes.
The only difference between the two is the import paths. Mostly, where you
imported from ``channels`` for the third-party app, you instead import from
``django.channels`` for the built-in solution.
For example::
from channels import Channel
from channels.auth import channel_session_user
Becomes::
from django.channels import Channel
from django.channels.auth import channel_session_user
There are a few exceptions to this rule, where classes will be moved to other parts
of Django in that make more sense:
* ``channels.tests.ChannelTestCase`` is found under ``django.test.channels.ChannelTestCase``
* ``channels.handler`` is moved to ``django.core.handlers.asgi``
* ``channels.staticfiles`` is moved to ``django.contrib.staticfiles.consumers``
* The ``runserver`` and ``runworker`` commands are in ``django.core.management.commands``
Writing third-party apps against Channels
-----------------------------------------
If you're writing a third-party app that is designed to work with both the
``channels`` third-party app as well as ``django.channels``, we suggest you use
a try-except pattern for imports, like this::
try:
from django.channels import Channel
except ImportError:
from channels import Channel
All the objects in both versions act the same way, they simply are located
on different import paths. There should be no need to change logic.

View File

@ -51,7 +51,6 @@ Topics
binding
backends
testing
cross-compat
reference
faqs
asgi

View File

@ -94,9 +94,16 @@ affect the overall deployed site.
What version of Django does it work with?
-----------------------------------------
You can install Channels as a library for Django 1.8 and 1.9, and it (should be)
part of Django 1.10. It has a few extra dependencies, but these will all
be installed if you use ``pip``.
You can install Channels as a library for Django >= 1.8. It has a few
extra dependencies, but these will all be installed if you use ``pip``.
Official project
----------------
Channels is not in the Django core as it was initially planned, but it's
an official Django project since september 2016. More informations about Channels
as an official project are available on the
`Django blog <https://www.djangoproject.com/weblog/2016/sep/09/channels-adopted-official-django-project/>`_.
What do I read next?