How to locate websocketbridge.js in Django using channels websocket?












1















I am trying to implement websockets using channels in Django project. I am getting 404 for webscoketbridge.js Below is html template.

{% load staticfiles %}

{% block title %}Delivery{% endblock %}



<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link href='https://fonts.googleapis.com/css?family=Satisfy' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="{% static 'channels/js/websocketbridge.js' %}" type="text/javascript"></script>




enter image description here



enter image description here



Also, I tried to have a look in the virtualenv/lib/python3.5/site-packages/channels path, there is no js folder or any file named websocketbridge.js



Has anyone solved this issue?










share|improve this question

























  • Someone please help to resolve this... I've no clue :/

    – boom_itsme
    Nov 26 '18 at 7:54
















1















I am trying to implement websockets using channels in Django project. I am getting 404 for webscoketbridge.js Below is html template.

{% load staticfiles %}

{% block title %}Delivery{% endblock %}



<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link href='https://fonts.googleapis.com/css?family=Satisfy' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="{% static 'channels/js/websocketbridge.js' %}" type="text/javascript"></script>




enter image description here



enter image description here



Also, I tried to have a look in the virtualenv/lib/python3.5/site-packages/channels path, there is no js folder or any file named websocketbridge.js



Has anyone solved this issue?










share|improve this question

























  • Someone please help to resolve this... I've no clue :/

    – boom_itsme
    Nov 26 '18 at 7:54














1












1








1








I am trying to implement websockets using channels in Django project. I am getting 404 for webscoketbridge.js Below is html template.

{% load staticfiles %}

{% block title %}Delivery{% endblock %}



<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link href='https://fonts.googleapis.com/css?family=Satisfy' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="{% static 'channels/js/websocketbridge.js' %}" type="text/javascript"></script>




enter image description here



enter image description here



Also, I tried to have a look in the virtualenv/lib/python3.5/site-packages/channels path, there is no js folder or any file named websocketbridge.js



Has anyone solved this issue?










share|improve this question
















I am trying to implement websockets using channels in Django project. I am getting 404 for webscoketbridge.js Below is html template.

{% load staticfiles %}

{% block title %}Delivery{% endblock %}



<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link href='https://fonts.googleapis.com/css?family=Satisfy' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="{% static 'channels/js/websocketbridge.js' %}" type="text/javascript"></script>




enter image description here



enter image description here



Also, I tried to have a look in the virtualenv/lib/python3.5/site-packages/channels path, there is no js folder or any file named websocketbridge.js



Has anyone solved this issue?







django python-3.x websocket redis channels






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 '18 at 5:21







boom_itsme

















asked Nov 25 '18 at 15:10









boom_itsmeboom_itsme

338




338













  • Someone please help to resolve this... I've no clue :/

    – boom_itsme
    Nov 26 '18 at 7:54



















  • Someone please help to resolve this... I've no clue :/

    – boom_itsme
    Nov 26 '18 at 7:54

















Someone please help to resolve this... I've no clue :/

– boom_itsme
Nov 26 '18 at 7:54





Someone please help to resolve this... I've no clue :/

– boom_itsme
Nov 26 '18 at 7:54












2 Answers
2






active

oldest

votes


















2














The javascript bridge was removed in v2.1.4. Here's the commit: https://github.com/django/channels/commit/2a9d764ad03927581aa2bfcadccc3e953949cb98#diff-b582cbb2f8294afa8bbe26c4c360a01d



This bit me, in my book that breaks semantic versioning.






share|improve this answer































    0














    As the way @tobyspark said, javascript wrapper has been completely removed in the django-channels 2. You can read more on how the js websocket wrapper was working in channels 1 here.



    the simplest workaround to clear that error in your browser create a file called websocketbridge.js in the path shown in the error, "static/channels/js/", or you can specify any other path in your HTML src attribute matching the location of the static files and then add the code from here.



    But you have to find a better implementation. You can use ReconnectingWebSocket. In the channels 2 release documentation, it is stated there might be other third-party packages for the binding but I don't know any other.






    share|improve this answer


























    • Thanks for the info. I will surely have a check on this

      – boom_itsme
      Dec 28 '18 at 5:16











    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53468845%2fhow-to-locate-websocketbridge-js-in-django-using-channels-websocket%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    The javascript bridge was removed in v2.1.4. Here's the commit: https://github.com/django/channels/commit/2a9d764ad03927581aa2bfcadccc3e953949cb98#diff-b582cbb2f8294afa8bbe26c4c360a01d



    This bit me, in my book that breaks semantic versioning.






    share|improve this answer




























      2














      The javascript bridge was removed in v2.1.4. Here's the commit: https://github.com/django/channels/commit/2a9d764ad03927581aa2bfcadccc3e953949cb98#diff-b582cbb2f8294afa8bbe26c4c360a01d



      This bit me, in my book that breaks semantic versioning.






      share|improve this answer


























        2












        2








        2







        The javascript bridge was removed in v2.1.4. Here's the commit: https://github.com/django/channels/commit/2a9d764ad03927581aa2bfcadccc3e953949cb98#diff-b582cbb2f8294afa8bbe26c4c360a01d



        This bit me, in my book that breaks semantic versioning.






        share|improve this answer













        The javascript bridge was removed in v2.1.4. Here's the commit: https://github.com/django/channels/commit/2a9d764ad03927581aa2bfcadccc3e953949cb98#diff-b582cbb2f8294afa8bbe26c4c360a01d



        This bit me, in my book that breaks semantic versioning.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 13 '18 at 18:15









        tobysparktobyspark

        214




        214

























            0














            As the way @tobyspark said, javascript wrapper has been completely removed in the django-channels 2. You can read more on how the js websocket wrapper was working in channels 1 here.



            the simplest workaround to clear that error in your browser create a file called websocketbridge.js in the path shown in the error, "static/channels/js/", or you can specify any other path in your HTML src attribute matching the location of the static files and then add the code from here.



            But you have to find a better implementation. You can use ReconnectingWebSocket. In the channels 2 release documentation, it is stated there might be other third-party packages for the binding but I don't know any other.






            share|improve this answer


























            • Thanks for the info. I will surely have a check on this

              – boom_itsme
              Dec 28 '18 at 5:16
















            0














            As the way @tobyspark said, javascript wrapper has been completely removed in the django-channels 2. You can read more on how the js websocket wrapper was working in channels 1 here.



            the simplest workaround to clear that error in your browser create a file called websocketbridge.js in the path shown in the error, "static/channels/js/", or you can specify any other path in your HTML src attribute matching the location of the static files and then add the code from here.



            But you have to find a better implementation. You can use ReconnectingWebSocket. In the channels 2 release documentation, it is stated there might be other third-party packages for the binding but I don't know any other.






            share|improve this answer


























            • Thanks for the info. I will surely have a check on this

              – boom_itsme
              Dec 28 '18 at 5:16














            0












            0








            0







            As the way @tobyspark said, javascript wrapper has been completely removed in the django-channels 2. You can read more on how the js websocket wrapper was working in channels 1 here.



            the simplest workaround to clear that error in your browser create a file called websocketbridge.js in the path shown in the error, "static/channels/js/", or you can specify any other path in your HTML src attribute matching the location of the static files and then add the code from here.



            But you have to find a better implementation. You can use ReconnectingWebSocket. In the channels 2 release documentation, it is stated there might be other third-party packages for the binding but I don't know any other.






            share|improve this answer















            As the way @tobyspark said, javascript wrapper has been completely removed in the django-channels 2. You can read more on how the js websocket wrapper was working in channels 1 here.



            the simplest workaround to clear that error in your browser create a file called websocketbridge.js in the path shown in the error, "static/channels/js/", or you can specify any other path in your HTML src attribute matching the location of the static files and then add the code from here.



            But you have to find a better implementation. You can use ReconnectingWebSocket. In the channels 2 release documentation, it is stated there might be other third-party packages for the binding but I don't know any other.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 25 '18 at 2:16

























            answered Dec 24 '18 at 9:34









            El-shaddaiEl-shaddai

            34




            34













            • Thanks for the info. I will surely have a check on this

              – boom_itsme
              Dec 28 '18 at 5:16



















            • Thanks for the info. I will surely have a check on this

              – boom_itsme
              Dec 28 '18 at 5:16

















            Thanks for the info. I will surely have a check on this

            – boom_itsme
            Dec 28 '18 at 5:16





            Thanks for the info. I will surely have a check on this

            – boom_itsme
            Dec 28 '18 at 5:16


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53468845%2fhow-to-locate-websocketbridge-js-in-django-using-channels-websocket%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Costa Masnaga

            Fotorealismo

            Sidney Franklin