{"title":"Conas Django a úsáid le Daphne","version":"5.2","locale":"ga","docname":"howto/deployment/asgi/daphne","url":"/ga/5.2/howto/deployment/asgi/daphne/","canonical":"https://djangodocs.dev/ga/5.2/howto/deployment/asgi/daphne/","summary":"Daphne is a pure-Python ASGI server for UNIX, maintained by members of the Django project. It acts as the reference server for ASGI. Suiteáil Daphne Link to this…","html":"<h1>Conas Django a úsáid le Daphne<a class=\"heading-anchor\" href=\"#how-to-use-django-with-daphne\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><a class=\"extlink-pypi reference external\" href=\"https://pypi.org/project/daphne/\">Daphne</a> is a pure-Python ASGI server for UNIX, maintained by\nmembers of the Django project. It acts as the reference server for ASGI.</p>\n<section id=\"installing-daphne\">\n<h2>Suiteáil Daphne<a class=\"heading-anchor\" href=\"#installing-daphne\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Is féidir leat Daphne a shuiteáil le <code class=\"docutils literal notranslate\"><span class=\"pre\">pip</span></code>:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>pip<span class=\"w\"> </span>install<span class=\"w\"> </span>daphne\n</code></pre></div>\n</section>\n<section id=\"running-django-in-daphne\">\n<h2>Rith Django i Daphne<a class=\"heading-anchor\" href=\"#running-django-in-daphne\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Nuair a bhíonn Daphne suiteáilte, tá ordú <code class=\"docutils literal notranslate\"><span class=\"pre\">daphne</span></code> ar fáil a thosaíonn próiseas freastalaí Daphne. Ag an rud is simplí, ní mór Daphne a ghlaoch le suíomh modúl ina bhfuil réad feidhmchláir ASGI, agus mar a thugtar ar an bhfeidhmchlár ina dhiaidh sin (scartha le colon).</p>\n<p>Maidir le tionscadal tipiciúil Django, bheadh cuma Daphne ag glaoch:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>daphne<span class=\"w\"> </span>myproject.asgi:application\n</code></pre></div>\n<p>Cuirfidh sé seo tús le próiseas amháin ag éisteacht ar <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>127.0.0. 1:8000 <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">``</span></a>. Éilíonn sé go mbeidh do thionscadal ar chonair Python; chun a chinntiú go rith an t-ordú seo ón eolaire céanna le do chomhad manage.py.</p>\n</section>\n<section id=\"integration-with-runserver\">\n<span id=\"daphne-runserver\"></span><h2>Comhtháthú le <code class=\"docutils literal notranslate\"><span class=\"pre\">runserver</span></code><a class=\"heading-anchor\" href=\"#integration-with-runserver\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Soláthraíonn Daphne ordú a:djadmin: runserver chun freastal ar do shuíomh faoi ASGI le linn na forbartha.</p>\n<p>Is féidir é seo a chumasú trí <code class=\"docutils literal notranslate\"><span class=\"pre\">daphne</span></code> a chur le tús do :setting: INSTALLED_APPS agus socrú <code class=\"docutils literal notranslate\"><span class=\"pre\">ASGI_APPLICATION</span></code> a chur leis ag díriú ar do réad feidhmchláir ASGI:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">INSTALLED_APPS</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"s2\">&quot;daphne&quot;</span><span class=\"p\">,</span>\n    <span class=\"o\">...</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n\n<span class=\"n\">ASGI_APPLICATION</span> <span class=\"o\">=</span> <span class=\"s2\">&quot;myproject.asgi.application&quot;</span>\n</code></pre></div>\n</section>","rootId":"how-to-use-django-with-daphne","toc":[{"title":"Suiteáil Daphne","anchor":"installing-daphne","children":[]},{"title":"Rith Django i Daphne","anchor":"running-django-in-daphne","children":[]},{"title":"Comhtháthú le runserver","anchor":"integration-with-runserver","children":[]}],"breadcrumbs":[{"docname":"howto/index","title":"Treoracha conas","url":"/ga/5.2/howto/"},{"docname":"howto/deployment/index","title":"Conas Django a imscaradh","url":"/ga/5.2/howto/deployment/"},{"docname":"howto/deployment/asgi/index","title":"Conas a imscaradh le ASGI","url":"/ga/5.2/howto/deployment/asgi/"}],"prev":{"docname":"howto/deployment/asgi/index","title":"Conas a imscaradh le ASGI","url":"/ga/5.2/howto/deployment/asgi/"},"next":{"docname":"howto/deployment/asgi/hypercorn","title":"Conas Django a úsáid le Hypercorn","url":"/ga/5.2/howto/deployment/asgi/hypercorn/"},"formats":{"html":"/ga/5.2/howto/deployment/asgi/daphne/","markdown":"/ga/5.2/howto/deployment/asgi/daphne.md","json":"/ga/5.2/howto/deployment/asgi/daphne.json"},"source":"https://github.com/django/django/blob/stable/5.2.x/docs/howto/deployment/asgi/daphne.txt","official":"https://docs.djangoproject.com/ga/5.2/howto/deployment/asgi/daphne/","inVersions":["6.1","6.0","5.2"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}