{"title":"Scríobh do chéad ranníocaíocht do Django","version":"5.2","locale":"ga","docname":"intro/contributing","url":"/ga/5.2/intro/contributing/","canonical":"https://djangodocs.dev/ga/5.2/intro/contributing/","summary":"Interested in giving back to the community a little? Maybe you've found a bug in Django that you'd like to see fixed, or maybe there's a small feature you…","html":"<h1>Scríobh do chéad ranníocaíocht do Django<a class=\"heading-anchor\" href=\"#writing-your-first-contribution-for-django\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<section id=\"introduction\">\n<h2>Réamhrá<a class=\"heading-anchor\" href=\"#introduction\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Interested in giving back to the community a little? Maybe you've found a bug\nin Django that you'd like to see fixed, or maybe there's a small feature you\nwant added (but remember that proposals for new features should follow the\n<a class=\"reference internal\" href=\"/ga/5.2/internals/contributing/bugs-and-features/#requesting-features\"><span class=\"std std-ref\">process for suggesting new features</span></a>).</p>\n<p>Is é an bealach is fearr chun do chuid imní féin a fheiceáil ag cur ar ais chuig Django féin. D'fhéadfadh sé seo cosúil daunting ar dtús, ach tá sé ina cosán dea-thaistil le doiciméadú, tooling, agus pobal chun tacú leat. Siúlfaimid tú tríd an bpróiseas ar fad, ionas gur féidir leat foghlaim trí shampla.</p>\n<section id=\"who-s-this-tutorial-for\">\n<h3>Cé dó an rang teagaisc seo?<a class=\"heading-anchor\" href=\"#who-s-this-tutorial-for\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"admonition admonition-seealso\" role=\"note\">\n<p class=\"admonition-title\">See also</p>\n<p>Má tá tú ag lorg teistiméireachta ar na sonraí maidir le ranníocaíochtaí cód a dhéanamh, féach an doiciméadú <span class=\"xref std std-doc\">/inmheánach/ranníocaíocht/cód-scríobh/innéacs</span>.</p>\n</aside>\n<p>Maidir leis an rang teagaisc seo, táimid ag súil go bhfuil tuiscint bhunúsach ar a laghad agat ar an gcaoi a n-oibríonn Django. Ciallaíonn sé seo gur chóir duit a bheith compordach ag dul tríd na ranganna teagaisc atá ann cheana féin ar :d oc:writing your first Django app&lt;/intro/tutorial01&gt;. Ina theannta sin, ba chóir go mbeadh tuiscint mhaith agat ar Python féin. Ach mura ndéanann tú, is leabhar iontach (agus saor in aisce) ar líne é <a class=\"reference external\" href=\"https://diveintopython3.net/\">Dive Into Python</a> chun ríomhchláraitheoirí Python a thosú.</p>\n<p>Iad siúd agaibh nach bhfuil cur amach acu ar chórais rialaithe leaganacha agus gheobhaidh Trac amach go bhfuil an rang teagaisc seo agus a naisc san áireamh ach go leor eolais chun tús a chur leis. Mar sin féin, is dócha gur mhaith leat níos mó a léamh faoi na huirlisí éagsúla seo má tá sé ar intinn agat cur le Django go rialta.</p>\n<p>Den chuid is mó, áfach, déanann an rang teagaisc seo iarracht an oiread agus is féidir a mhíniú, ionas gur féidir é a úsáid don lucht féachana is leithne.</p>\n<aside class=\"admonition-where-to-get-help admonition\" role=\"note\">\n<p class=\"admonition-title\">Cá háit le cabhair a fháil:</p>\n<p>If you're having trouble going through this tutorial, please post a message\non the <a class=\"reference external\" href=\"https://forum.djangoproject.com/\">Django Forum</a> or drop by the <a class=\"reference external\" href=\"https://chat.djangoproject.com\">Django Discord server</a> to chat with\nother Django users who might be able to help.</p>\n</aside>\n</section>\n<section id=\"what-does-this-tutorial-cover\">\n<h3>Cad a chlúdaíonn an rang teagaisc seo?<a class=\"heading-anchor\" href=\"#what-does-this-tutorial-cover\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Beimid ag siúl leat trí chur le Django den chéad uair. Faoi dheireadh an teagaisc seo, ba chóir go mbeadh tuiscint bhunúsach agat ar na huirlisí agus ar na próisis atá i gceist. Go sonrach, beimid ag clúdach na nithe seo a leanas:</p>\n<ul class=\"simple\">\n<li><p>Suiteáil Git.</p></li>\n<li><p>Cóip de leagan forbartha Django a íoslódáil.</p></li>\n<li><p>Ag rith sraith tástála Django.</p></li>\n<li><p>Tástáil a scríobh le haghaidh do chuid athruithe.</p></li>\n<li><p>Scríobh an cód do do chuid athruithe.</p></li>\n<li><p>Do chuid athruithe a thástáil.</p></li>\n<li><p>Iarratas ar tharraingt a chur isteach.</p></li>\n<li><p>Cá háit le tuilleadh eolais a lorg.</p></li>\n</ul>\n<p>Nuair a bheidh tú ag déanamh leis an rang teagaisc, is féidir leat breathnú tríd an gcuid eile de :d oc:Django's documentation on contributing&lt;/internals/contributing/index&gt;. Tá go leor eolais iontach ann agus ní mór é a léamh do dhuine ar bith ar mhaith leo a bheith ina ranníocóir rialta le Django. Má tá ceisteanna agat, is dócha go bhfuair sé na freagraí.</p>\n<aside class=\"admonition-python-3-required admonition\" role=\"note\">\n<p class=\"admonition-title\">Python 3 ag teastáil!</p>\n<p>Ní thacaíonn an leagan reatha de Django le Python 2.7. Faigh Python 3 ag leathanach íoslódála <a class=\"reference external\" href=\"https://www.python.org/downloads/\">Python's</a> nó le bainisteoir pacáiste do chórais oibriúcháin.</p>\n</aside>\n<aside class=\"admonition-for-windows-users admonition\" role=\"note\">\n<p class=\"admonition-title\">D'úsáideoirí Windows</p>\n<p>Féach <a class=\"reference internal\" href=\"/ga/5.2/howto/windows/#install-python-windows\"><span class=\"std std-ref\">Suiteáil Python</span></a> ar docs Windows le haghaidh treoir bhreise.</p>\n</aside>\n</section>\n</section>\n<section id=\"code-of-conduct\">\n<h2>Cód Iompair<a class=\"heading-anchor\" href=\"#code-of-conduct\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Mar ranníocóir, is féidir leat cabhrú linn pobal Django a choinneáil oscailte agus cuimsitheach. Léigh agus lean ár <a class=\"reference external\" href=\"https://www.djangoproject.com/conduct/\">Cód Iompair</a>.</p>\n</section>\n<section id=\"installing-git\">\n<h2>Git á shuiteáil<a class=\"heading-anchor\" href=\"#installing-git\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Don rang teagaisc seo, beidh ort Git suiteáilte chun an leagan forbartha reatha de Django a íoslódáil agus brainse a ghiniúint do na hathruithe a dhéanann tú.</p>\n<p>Chun seiceáil an bhfuil Git suiteáilte agat nó nach bhfuil, cuir <code class=\"docutils literal notranslate\">git</code> isteach i líne na n-orduithe. Má fhaigheann tú teachtaireachtaí ag rá nach bhféadfaí an t-ordú seo a aimsiú, beidh ort é a íoslódáil agus a shuiteáil, féach <a href=\"#id9\"><span class=\"problematic\" id=\"id10\">`Leathanach íoslódála Git`__</span></a>.</p>\n<p>Mura bhfuil tú chomh eolach sin ar Git, is féidir leat níos mó a fháil amach i gcónaí faoina orduithe (nuair atá sé suiteáilte) trí <code class=\"docutils literal notranslate\">cabhair git</code> a chlóscríobh isteach i líne na n-orduithe.</p>\n</section>\n<section id=\"getting-a-copy-of-django-s-development-version\">\n<h2>Cóip de leagan forbartha Django a fháil<a class=\"heading-anchor\" href=\"#getting-a-copy-of-django-s-development-version\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Is é an chéad chéim chun cur le Django ná cóip den bhunchód a fháil. Ar dtús, <a href=\"#id9\"><span class=\"problematic\" id=\"id11\">`forc Django ar GitHub &lt; https://github.com/django/django/fork&gt;`__</span></a>. Ansin, ón líne ordaithe, bain úsáid as an ordú `` cd`` chun dul chuig an eolaire ina mbeidh tú ag iarraidh go mbeadh do chóip áitiúil de Django beo.</p>\n<p>Íoslódáil stór cód foinse Django ag baint úsáide as an ordú seo a leanas:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-0-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>git clone https://github.com/YourGitHubName/django.git\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-0-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> git clone https://github.com/YourGitHubName/django.git\n</code></pre></div></div></div>\n<aside class=\"admonition-low-bandwidth-connection admonition\" role=\"note\">\n<p class=\"admonition-title\">Nasc bandaleithead íseal?</p>\n<p>Is féidir leat an argóint <code class=\"docutils literal notranslate\">--depth 1</code> a chur le `` git clone`` chun gan bacadh le híoslódáil a dhéanamh ar stair tiomantais Django go léir, rud a laghdaíonn aistriú sonraí ó ~ 250 MB go ~ 70 MB.</p>\n</aside>\n<p>Anois go bhfuil cóip áitiúil de Django agat, is féidir leat é a shuiteáil díreach mar a dhéanfá aon phacáiste a shuiteáil ag baint úsáide as <code class=\"docutils literal notranslate\">pip</code>. Is é an bealach is áisiúla chun é sin a dhéanamh ná trí <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">*</span></a>virtual environment <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">*</span></a>a úsáid, ar gné é atá tógtha isteach i Python a ligeann duit eolaire ar leith de phacáistí suiteáilte a choinneáil do gach ceann de do thionscadail ionas nach gcuirfidh siad isteach ar a chéile.</p>\n<p>Is smaoineamh maith é do thimpeallachtaí fíorúla go léir a choinneáil in aon áit amháin, mar shampla i <code class=\"docutils literal notranslate\">.virtualenvs/</code> i d'eolaire baile.</p>\n<p id=\"intro-contributing-install-local-copy\">Cruthaigh timpeallacht fhíorúil nua trí na nithe seo a leanas a rith:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-1-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>python3 -m venv ~/.virtualenvs/djangodev\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-1-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> py -m venv <span class=\"nv\">%HOMEPATH%</span>\\.virtualenvs\\djangodev\n</code></pre></div></div></div>\n<p>Is é an cosán an áit a sábhálfar an timpeallacht nua ar do ríomhaire.</p>\n<p>Is é an chéim dheiridh maidir le do thimpeallacht fhíorúil a bhunú ná é a ghníomhachtú:</p>\n<div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span><span class=\"nb\">source</span> ~/.virtualenvs/djangodev/bin/activate\n</code></pre></div>\n<p>Mura bhfuil an t-ordú `` foinse`` ar fáil, is féidir leat triail a bhaint as ponc ina ionad sin:</p>\n<div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>. ~/.virtualenvs/djangodev/bin/activate\n</code></pre></div>\n<p>Caithfidh tú an timpeallacht fhíorúil a ghníomhachtú aon uair a osclaíonn tú fuinneog teirminéil nua.</p>\n<aside class=\"admonition-for-windows-users admonition\" role=\"note\">\n<p class=\"admonition-title\">D'úsáideoirí Windows</p>\n<p>Chun do thimpeallacht fhíorúil a ghníomhachtú ar Windows, rith:</p>\n<div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows code\"><code><span class=\"gp\">...\\&gt;</span> <span class=\"nv\">%HOMEPATH%</span>\\.virtualenvs\\djangodev\\Scripts\\activate.bat\n</code></pre></div>\n</aside>\n<p>Taispeántar ainm na timpeallachta fíorúla atá gníomhachtaithe faoi láthair ar líne na n-orduithe chun cabhrú leat súil a choinneáil ar an gceann atá in úsáid agat. Déanfar aon rud a shuiteálann tú trí <code class=\"docutils literal notranslate\">pip</code> agus an t-ainm seo ar taispeáint a shuiteáil sa timpeallacht fhíorúil sin, scoite amach ó thimpeallachtaí eile agus ó phacáistí ar fud an chórais.</p>\n<p>Téigh ar aghaidh agus suiteáil an chóip chlónáilte de Django roimhe seo:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-2-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>python -m pip install -e /path/to/your/local/clone/django/\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-2-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> py -m pip install -e \\path\\to\\your\\local\\clone\\django\\\n</code></pre></div></div></div>\n<p>The installed version of Django is now pointing at your local copy by installing\nin editable mode. You will immediately see any changes you make to it, which is\nof great help when testing your first contribution.</p>\n</section>\n<section id=\"running-django-s-test-suite-for-the-first-time\">\n<h2>Seomra tástála Django a reáchtáil den chéad uair<a class=\"heading-anchor\" href=\"#running-django-s-test-suite-for-the-first-time\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Agus tú ag cur le Django tá sé an-tábhachtach nach dtugann d'athruithe cód fabhtanna isteach i réimsí eile de Django. Bealach amháin chun a sheiceáil go n-oibríonn Django fós tar éis duit do chuid athruithe a dhéanamh ná trí shraith tástála Django a reáchtáil. Má éiríonn leis na tástálacha go léir fós, is féidir leat a bheith réasúnta cinnte go n-oibríonn do chuid athruithe agus nár bhris tú codanna eile de Django. Mura ritheann tú sraith tástála Django riamh roimhe seo, is smaoineamh maith é a reáchtáil uair amháin roimh ré chun dul i dtaithí ar a aschur.</p>\n<p>Sula ritheann tú an tsraith tástála, iontráil an chomhadlann Django <code class=\"docutils literal notranslate\">tests/</code> ag baint úsáide as an ordú <code class=\"docutils literal notranslate\">cd tests</code>, agus suiteáil spleáchais tástála trí rith:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-3-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>python -m pip install -r requirements/py3.txt\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-3-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> py -m pip install -r requirements\\py3.txt\n</code></pre></div></div></div>\n<p>Má thagann tú ar earráid le linn na suiteála, d'fhéadfadh spleáchas a bheith in easnamh ar do chóras le haghaidh ceann amháin nó níos mó de na pacáistí Python. Téigh i gcomhairle le doiciméadú an phacáiste a bhfuil ag teip air nó cuardaigh an gréasán leis an teachtaireacht earráide a thagann ort.</p>\n<p>Anois táimid réidh leis an tsraith tástála a rith:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-4-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>./runtests.py\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-4-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> runtests.py \n</code></pre></div></div></div>\n<p>Now sit back and relax. Django's entire test suite has thousands of tests, and\nit takes at least a few minutes to run, depending on the speed of your\ncomputer.</p>\n<p>While Django's test suite is running, you'll see a stream of characters\nrepresenting the status of each test as it completes. <code class=\"docutils literal notranslate\">E</code> indicates that an\nerror was raised during a test, and <code class=\"docutils literal notranslate\">F</code> indicates that a test's assertions\nfailed. Both of these are considered to be test failures. Meanwhile, <code class=\"docutils literal notranslate\">x</code> and\n<code class=\"docutils literal notranslate\">s</code> indicate expected failures and skipped tests, respectively. Dots indicate\npassing tests.</p>\n<p>Go hiondúil is mar gheall ar leabharlanna seachtracha a bhíonn ag teastáil chun an tástáil a rith a bhíonn na trialacha scipeála in easnamh; féach <a class=\"reference internal\" href=\"/ga/5.2/internals/contributing/writing-code/unit-tests/#running-unit-tests-dependencies\"><span class=\"std std-ref\">Na tástálacha go léir á rith</span></a> le haghaidh liosta spleáchais agus bí cinnte go suiteálann tú ceann ar bith do thástálacha a bhaineann leis na hathruithe atá á dhéanamh agat (ní bheidh aon ghá againn don rang teagaisc seo). Baineann roinnt tástálacha go sonrach le hinneal bunachair shonraí ar leith agus déanfar iad a scipeáil mura ndéantar iad a thástáil leis an inneall sin. Is é SQLite inneall an bhunachair shonraí do na socruithe réamhshocraithe. Chun na trialacha a rith ag baint úsáide as inneall difriúil, féach <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">:tag:`running-unit-tests-settings`</span></a>.</p>\n<p>Nuair a bheidh na trialacha críochnaithe, ba chóir teachtaireacht a chur chugat ag cur in iúl duit cé acu ar éirigh nó nár éirigh leis an tsraith tástála. Ós rud é nach bhfuil aon athruithe déanta agat fós ar chód Django, ba chóir go mbeadh an tsraith tástála ar fad <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">**</span></a>ba chóir ** pas a fháil. Má fhaigheann tú teipeanna nó earráidí déan cinnte gur lean tú gach ceann de na céimeanna roimhe seo i gceart. Féach <a class=\"reference internal\" href=\"/ga/5.2/internals/contributing/writing-code/unit-tests/#running-unit-tests\"><span class=\"std std-ref\">Tástálacha aonaid a rith</span></a> le haghaidh tuilleadh eolais.</p>\n<p>Tabhair faoi deara go mb'fhéidir nach mbeadh an brainse &quot;príomh&quot; Django is déanaí cobhsaí i gcónaí. Agus tú ag forbairt i gcoinne &quot;príomh&quot;, is féidir leat Tógann comhtháthú leanúnach Django a sheiceáil __ chun a chinneadh an bhfuil na teipeanna sonrach do do mheaisín nó má tá siad i láthair freisin i dtógáil oifigiúil Django. Má chliceálann tú chun amharc ar thógáil ar leith, is féidir leat féachaint ar an &quot;Maitrís Cumraíochta&quot; a thaispeánann teipeanna briste síos de réir leagan Python agus inneall bunachar sonraí.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>Don teagasc seo agus don ticéad a bhfuilimid ag obair air, is leor an tástáil in aghaidh SQLite, áfach, is féidir (agus uaireanta is gá) <a class=\"reference internal\" href=\"/ga/5.2/internals/contributing/writing-code/unit-tests/#running-unit-tests-settings\"><span class=\"std std-ref\">na tástálacha a rith ag baint úsáide as bunachar sonraí eile</span></a>. Agus athruithe comhéadain á ndéanamh agat, beidh ort :tag:<a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>na tástálacha Seiléiniam &lt;running-seiléiniam-tests&gt; a rith.</p>\n</aside>\n</section>\n<section id=\"working-on-an-approved-new-feature\">\n<h2>Working on an approved new feature<a class=\"heading-anchor\" href=\"#working-on-an-approved-new-feature\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>For this tutorial, we'll work on a &quot;fake accepted ticket&quot; as a case study. Here\nare the imaginary details:</p>\n<aside class=\"admonition-ticket-99999-allow-making-toast admonition\" role=\"note\">\n<p class=\"admonition-title\">Ticéad #99999 -- Ceadaigh tósta a dhéanamh</p>\n<p>Ba chóir do Django feidhm <code class=\"docutils literal notranslate\">django.shortcuts.make_toast()</code> a chur ar fáil a fhilleann <code class=\"docutils literal notranslate\">'toast</code>'.</p>\n</aside>\n<p>Cuirfimid an ghné seo agus na trialacha gaolmhara i bhfeidhm anois.</p>\n</section>\n<section id=\"creating-a-branch\">\n<h2>Brainse a chruthú<a class=\"heading-anchor\" href=\"#creating-a-branch\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Sula ndéanfaidh tú aon athruithe, cruthaigh brainse nua don ticéad:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-5-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>git checkout -b ticket_99999\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-5-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> git checkout -b ticket_99999\n</code></pre></div></div></div>\n<p>Is féidir leat aon ainm is mian leat a roghnú don bhrainse, is sampla é &quot;ticket_99999&quot;. Beidh na hathruithe ar fad a dhéanfar sa bhrainse seo sonrach don ticéad agus ní bheidh tionchar acu ar an bpríomhchóip den chód a chlónáil muid níos luaithe.</p>\n</section>\n<section id=\"writing-some-tests-for-your-ticket\">\n<h2>Scríobh roinnt tástálacha do do thicéad<a class=\"heading-anchor\" href=\"#writing-some-tests-for-your-ticket\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>I bhformhór na gcásanna, chun ranníocaíocht a ghlacadh isteach i Django caithfidh sé tástálacha a chur san áireamh. Maidir le ranníocaíochtaí a shocrú fabht, ciallaíonn sé seo tástáil aischéimnithí a scríobh chun a chinntiú nach n-athbhunaítear an fabht i Django níos déanaí. Ba chóir tástáil aischéimnithí a scríobh sa chaoi is go dteipfidh air agus an fabht fós ann agus pas a fháil nuair a bheidh an fabht socraithe. I gcás ranníocaíochtaí ina bhfuil gnéithe nua, beidh ort tástálacha a chur san áireamh a chinntíonn go bhfuil na gnéithe nua ag obair i gceart. Ba chóir go dteipfeadh orthu freisin nuair nach bhfuil an ghné nua i láthair, agus ansin pas a fháil nuair a bheidh sé curtha i bhfeidhm.</p>\n<p>Bealach maith chun é seo a dhéanamh ná do thástálacha nua a scríobh ar dtús, sula ndéanann tú aon athruithe ar an gcód. Tugtar forbairt faoi thionchar tástála ar an stíl forbartha seo agus is féidir é a chur i bhfeidhm ar thionscadail iomlána agus ar athruithe aonair araon. Tar éis duit do chuid tástálacha a scríobh, ritheann tú leo ansin chun a chinntiú go dteipeann orthu go deimhin (ós rud é nach bhfuil an fabht sin socraithe agat nó gur chuir tú an ghné sin leis go fóill). Mura dteipeann ar do thástálacha nua, beidh ort iad a shocrú ionas go ndéanfaidh siad. Tar éis an tsaoil, níl tástáil aischéimnithí a théann beag beann ar cibé an bhfuil fabht i láthair an-chabhrach chun cosc a chur ar an fabht sin dul síos an bóthar.</p>\n<p>Anois le haghaidh ár lámha-ar shampla.</p>\n<section id=\"writing-a-test-for-ticket-99999\">\n<h3>Tástáil a scríobh le haghaidh ticéad #99999<a class=\"heading-anchor\" href=\"#writing-a-test-for-ticket-99999\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Chun an ticéad seo a réiteach, cuirfimid feidhm <code class=\"docutils literal notranslate\">make_toast()</code> leis an modúl <code class=\"docutils literal notranslate\">django.shortcuts</code>. Ar dtús táimid chun tástáil a scríobh a dhéanann iarracht an fheidhm a úsáid agus a sheiceáil go bhfuil cuma cheart ar an aschur.</p>\n<p>Téigh chuig fillteán <code class=\"docutils literal notranslate\">tests/shortcuts/</code> Django agus cruthaigh comhad nua <code class=\"docutils literal notranslate\">test_make_toast.py</code>. Cuir an cód seo a leanas leis:</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=\"kn\">from</span> <span class=\"nn\">django.shortcuts</span> <span class=\"kn\">import</span> make_toast\n<span class=\"kn\">from</span> <span class=\"nn\">django.test</span> <span class=\"kn\">import</span> SimpleTestCase\n\n\n<span class=\"k\">class</span> <span class=\"nc\">MakeToastTests</span><span class=\"p\">(</span>SimpleTestCase<span class=\"p\">):</span>\n    <span class=\"k\">def</span> <span class=\"nf\">test_make_toast</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">):</span>\n        <span class=\"bp\">self</span><span class=\"o\">.</span>assertEqual<span class=\"p\">(</span>make_toast<span class=\"p\">(),</span> <span class=\"s2\">&quot;toast&quot;</span><span class=\"p\">)</span>\n</code></pre></div>\n<p>Seiceálann an tástáil seo go bhfilleann an <code class=\"docutils literal notranslate\">make_toast()</code> ar <code class=\"docutils literal notranslate\">'toast'</code>.</p>\n<aside class=\"admonition-but-this-testing-thing-looks-kinda-hard admonition\" role=\"note\">\n<p class=\"admonition-title\">Ach tá cuma kinda crua ar an rud tástála seo...</p>\n<p>Mura raibh ort déileáil le tástálacha roimhe seo, is féidir leo breathnú beagán deacair a scríobh ar an gcéad amharc. Ar ámharaí an tsaoil, is ábhar mór <em>an-</em> é tástáil i gcláir ríomhaire, mar sin tá go leor eolais amuigh ansin:</p>\n<ul class=\"simple\">\n<li><p>Is féidir breathnú ar dtús maith ar thástálacha scríbhneoireachta do Django a fháil sna doiciméid ar :d oc:/topics/testing/overview.</p></li>\n<li><p>Cuimsíonn Dive Into Python (leabhar ar líne saor in aisce d'fhorbróirí Python tosaigh) <a href=\"#id9\"><span class=\"problematic\" id=\"id12\">`réamhrá iontach ar Thástáil Aonaid`__</span></a>.</p></li>\n<li><p>Tar éis duit iad siúd a léamh, más mian leat rud beag meatier chun do chuid fiacla a dhoirteadh isteach, tá doiciméadú Python :mod:'unittest' ann i gcónaí.</p></li>\n</ul>\n</aside>\n</section>\n<section id=\"running-your-new-test\">\n<h3>Do thástáil nua a reáchtáil<a class=\"heading-anchor\" href=\"#running-your-new-test\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Ós rud é nach bhfuil aon mhodhnuithe déanta againn ar <code class=\"docutils literal notranslate\">django.shortcuts</code> fós, ba cheart go dteipfeadh ar ár dtástáil. Rithimis na trialacha go léir san fhillteán <code class=\"docutils literal notranslate\">shortcuts</code> chun a chinntiú gurb é sin an rud a tharlaíonn i ndáiríre. <code class=\"docutils literal notranslate\">cd</code> chuig eolaire Django <code class=\"docutils literal notranslate\">tests/</code> agus rith:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-6-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>./runtests.py shortcuts\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-6-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> runtests.py shortcuts\n</code></pre></div></div></div>\n<p>Má rith na tástálacha i gceart, ba cheart go bhfeicfeá teip amháin a fhreagraíonn don mhodh tástála a chuireamar leis, leis an earráid seo:</p>\n<div class=\"code-block\" data-language=\"pytb\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Pytb</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=\"Pytb code\"><code><span class=\"x\">ImportError: cannot import name &#39;make_toast&#39; from &#39;django.shortcuts&#39;</span>\n</code></pre></div>\n<p>Má éirigh leis na tástálacha go léir, beidh tú ag iarraidh a chinntiú gur chuir tú an tástáil nua a thaispeántar thuas leis an bhfillteán cuí agus leis an ainm comhaid.</p>\n</section>\n</section>\n<section id=\"writing-the-code-for-your-ticket\">\n<h2>Scríobh an cód do do thicéad<a class=\"heading-anchor\" href=\"#writing-the-code-for-your-ticket\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Ansin cuirfimid an fheidhm <code class=\"docutils literal notranslate\">make_toast()</code> leis.</p>\n<p>Déan nascleanúint go dtí an fillteán <code class=\"docutils literal notranslate\">django/</code> agus oscail an comhad <code class=\"docutils literal notranslate\">aicearraí.py</code>. Ag an mbun, cuir leis:</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=\"k\">def</span> <span class=\"nf\">make_toast</span><span class=\"p\">():</span>\n    <span class=\"k\">return</span> <span class=\"s2\">&quot;toast&quot;</span>\n</code></pre></div>\n<p>Anois ní mór dúinn a chinntiú go dtéann an tástáil a scríobh muid níos luaithe, ionas gur féidir linn a fheiceáil an bhfuil an cód a chuir muid leis ag obair i gceart. Arís, téigh chuig eolaire Django <code class=\"docutils literal notranslate\">tests/</code> agus rith:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-7-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>./runtests.py shortcuts\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-7-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> runtests.py shortcuts\n</code></pre></div></div></div>\n<p>Ba chóir go mbeadh gach rud pas a fháil. Mura bhfuil, cinntigh gur chuir tú an fheidhm leis an gcomhad ceart i gceart.</p>\n</section>\n<section id=\"running-django-s-test-suite-for-the-second-time\">\n<h2>Seomra tástála Django a reáchtáil don dara huair<a class=\"heading-anchor\" href=\"#running-django-s-test-suite-for-the-second-time\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Once you've verified that your changes and test are working correctly, it's\na good idea to run the entire Django test suite to verify that your change\nhasn't introduced any bugs into other areas of Django. While successfully\npassing the entire test suite doesn't guarantee your code is bug free, it does\nhelp identify many bugs and regressions that might otherwise go unnoticed.</p>\n<p>Chun an tsraith tástála Django ar fad a reáchtáil, <code class=\"docutils literal notranslate\">cd</code> isteach san eolaire Django <code class=\"docutils literal notranslate\">tests/</code> agus rith:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-8-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>./runtests.py\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-8-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> runtests.py \n</code></pre></div></div></div>\n</section>\n<section id=\"writing-documentation\">\n<h2>Cáipéisíocht Scríbhneoireachta<a class=\"heading-anchor\" href=\"#writing-documentation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Is gné nua é seo, mar sin ba chóir é a dhoiciméadú. Oscail an comhad <code class=\"docutils literal notranslate\">docs/topics/http/shortcuts.txt</code> agus cuir an méid seo a leanas ag deireadh an chomhaid:</p>\n<div class=\"code-block\" data-language=\"rst\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Rst</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=\"Rst code\"><code><span class=\"gh\">``make_toast()``</span>\n<span class=\"gh\">================</span>\n\n<span class=\"p\">..</span> <span class=\"ow\">function</span><span class=\"p\">::</span> make_toast()\n\n<span class=\"p\">..</span> <span class=\"ow\">versionadded</span><span class=\"p\">::</span> 2.2\n\nReturns <span class=\"s\">``&#39;toast&#39;``</span>.\n</code></pre></div>\n<p>Ós rud é go mbeidh an ghné nua seo i scaoileadh atá le teacht cuirtear é freisin leis na nótaí scaoilte don chéad leagan eile de Django. Oscail na nótaí eisiúna don leagan is déanaí in <code class=\"docutils literal notranslate\">docs/releases/</code>, arb é <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>2.2.txt' é tráth scríofa. Cuir nóta leis faoin gceanntásc &quot;Mionghnéithe&quot;:</p>\n<div class=\"code-block\" data-language=\"rst\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Rst</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=\"Rst code\"><code><span class=\"gh\">:mod:`django.shortcuts`</span>\n<span class=\"gh\">~~~~~~~~~~~~~~~~~~~~~~~</span>\n\n<span class=\"m\">*</span> The new <span class=\"na\">:func:</span><span class=\"nv\">`django.shortcuts.make_toast`</span> function returns <span class=\"s\">``&#39;toast&#39;``</span>.\n</code></pre></div>\n<p>Chun tuilleadh eolais a fháil ar cháipéisíocht scríbhneoireachta, lena n-áirítear míniú ar cad atá i gceist leis an ngiolc <code class=\"docutils literal notranslate\">versionadded</code>, féach :d oc:'/internals/contributing/writing-documentation'. Cuimsíonn an leathanach sin míniú freisin ar conas cóip de na doiciméid a thógáil go háitiúil, ionas gur féidir leat réamhamharc a dhéanamh ar an HTML a ghinfear.</p>\n</section>\n<section id=\"previewing-your-changes\">\n<h2>Réamhamharc ar do chuid athruithe<a class=\"heading-anchor\" href=\"#previewing-your-changes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Anois tá sé in am athbhreithniú a dhéanamh ar na hathruithe atá déanta sa chraobh. Chun na hathruithe go léir a chur ar stáitse réidh le tiomantas, rith:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-9-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>git add --all\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-9-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> git add --all\n</code></pre></div></div></div>\n<p>Ansin taispeáin na difríochtaí idir do chóip reatha de Django (le do chuid athruithe) agus an t-athbhreithniú a sheiceáil tú ar dtús níos luaithe sa rang teagaisc le:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-10-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>git diff --cached\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-10-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> git diff --cached\n</code></pre></div></div></div>\n<p>Bain úsáid as na heochracha arrow chun bogadh suas agus síos.</p>\n<div class=\"code-block\" data-language=\"diff\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Diff</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=\"Diff code\"><code><span class=\"gh\">diff --git a/django/shortcuts.py b/django/shortcuts.py</span>\n<span class=\"gh\">index 7ab1df0e9d..8dde9e28d9 100644</span>\n<span class=\"gd\">--- a/django/shortcuts.py</span>\n<span class=\"gi\">+++ b/django/shortcuts.py</span>\n<span class=\"gu\">@@ -156,3 +156,7 @@ def resolve_url(to, *args, **kwargs):</span>\n\n     # Finally, fall back and assume it&#39;s a URL\n     return to\n<span class=\"gi\">+</span>\n<span class=\"gi\">+</span>\n<span class=\"gi\">+def make_toast():</span>\n<span class=\"gi\">+    return &#39;toast&#39;</span>\n<span class=\"gh\">diff --git a/docs/releases/2.2.txt b/docs/releases/2.2.txt</span>\n<span class=\"gh\">index 7d85d30c4a..81518187b3 100644</span>\n<span class=\"gd\">--- a/docs/releases/2.2.txt</span>\n<span class=\"gi\">+++ b/docs/releases/2.2.txt</span>\n<span class=\"gu\">@@ -40,6 +40,11 @@ database constraints. Constraints are added to models using the</span>\n Minor features\n --------------\n\n<span class=\"gi\">+:mod:`django.shortcuts`</span>\n<span class=\"gi\">+~~~~~~~~~~~~~~~~~~~~~~~</span>\n<span class=\"gi\">+</span>\n<span class=\"gi\">+* The new :func:`django.shortcuts.make_toast` function returns ``&#39;toast&#39;``.</span>\n<span class=\"gi\">+</span>\n :mod:`django.contrib.admin`\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n<span class=\"gh\">diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt</span>\n<span class=\"gh\">index 7b3a3a2c00..711bf6bb6d 100644</span>\n<span class=\"gd\">--- a/docs/topics/http/shortcuts.txt</span>\n<span class=\"gi\">+++ b/docs/topics/http/shortcuts.txt</span>\n<span class=\"gu\">@@ -271,3 +271,12 @@ This example is equivalent to::</span>\n         my_objects = list(MyModel.objects.filter(published=True))\n         if not my_objects:\n             raise Http404(&quot;No MyModel matches the given query.&quot;)\n<span class=\"gi\">+</span>\n<span class=\"gi\">+``make_toast()``</span>\n<span class=\"gi\">+================</span>\n<span class=\"gi\">+</span>\n<span class=\"gi\">+.. function:: make_toast()</span>\n<span class=\"gi\">+</span>\n<span class=\"gi\">+.. versionadded:: 2.2</span>\n<span class=\"gi\">+</span>\n<span class=\"gi\">+Returns ``&#39;toast&#39;``.</span>\n<span class=\"gh\">diff --git a/tests/shortcuts/test_make_toast.py b/tests/shortcuts/test_make_toast.py</span>\nnew file mode 100644\n<span class=\"gh\">index 0000000000..6f4c627b6e</span>\n<span class=\"gd\">--- /dev/null</span>\n<span class=\"gi\">+++ b/tests/shortcuts/test_make_toast.py</span>\n<span class=\"gu\">@@ -0,0 +1,7 @@</span>\n<span class=\"gi\">+from django.shortcuts import make_toast</span>\n<span class=\"gi\">+from django.test import SimpleTestCase</span>\n<span class=\"gi\">+</span>\n<span class=\"gi\">+</span>\n<span class=\"gi\">+class MakeToastTests(SimpleTestCase):</span>\n<span class=\"gi\">+    def test_make_toast(self):</span>\n<span class=\"gi\">+        self.assertEqual(make_toast(), &#39;toast&#39;)</span>\n</code></pre></div>\n<p>Nuair a bhíonn réamhamharc déanta agat ar na hathruithe, buail an eochair <code class=\"docutils literal notranslate\">q</code> chun filleadh ar líne na n-orduithe. Má d'fhéach an diff ceart go leor, tá sé in am na hathruithe a dhéanamh.</p>\n</section>\n<section id=\"committing-the-changes\">\n<h2>Na hathruithe a dhéanamh<a class=\"heading-anchor\" href=\"#committing-the-changes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Chun na hathruithe a ghealladh:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-11-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>git commit\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-11-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> git commit\n</code></pre></div></div></div>\n<p>Osclaíonn sé seo eagarthóir téacs chun an teachtaireacht tiomantais a chlóscríobh. Lean an <a class=\"reference internal\" href=\"/ga/5.2/internals/contributing/committing-code/#committing-guidelines\"><span class=\"std std-ref\">commit message guidelines</span></a> agus scríobh teachtaireacht mar seo a leanas:</p>\n<div class=\"code-block\" data-language=\"text\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Text</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=\"Text code\"><code>Fixed #99999 -- Added a shortcut function to make toast.\n</code></pre></div>\n</section>\n<section id=\"pushing-the-commit-and-making-a-pull-request\">\n<h2>An tiomantas a bhrú agus iarratas tarraingthe a dhéanamh<a class=\"heading-anchor\" href=\"#pushing-the-commit-and-making-a-pull-request\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Tar éis duit na hathruithe a dhéanamh, seol chuig do forc é ar GitHub (cuir &quot;ticket_99999&quot; in ionad ainm do bhrainse má tá sé difriúil):</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-12-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><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><span class=\"gp\">$ </span>git push origin ticket_99999\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-12-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</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=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> git push origin ticket_99999\n</code></pre></div></div></div>\n<p>Is féidir leat iarratas tarraingthe a chruthú trí chuairt a thabhairt ar an leathanach <a class=\"reference external\" href=\"https://github.com/django/django/\">Django GitHub</a>. Feicfidh tú do chraobh faoi &quot;Do chraobhacha a bhrúitear le déanaí&quot;. Cliceáil &quot;Déan comparáid idir &amp; iarratas tarraingt&quot; in aice leis.</p>\n<p>Ná déan é don rang teagaisc seo le do thoil, ach ar an gcéad leathanach eile a thaispeánann réamhamharc ar na hathruithe, chliceáilfeá &quot;Cruthaigh iarratas tarraingthe&quot;.</p>\n</section>\n<section id=\"next-steps\">\n<h2>Na chéad chéimeanna eile<a class=\"heading-anchor\" href=\"#next-steps\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Comhghairdeas, d'fhoghlaim tú conas iarratas tarraingthe a dhéanamh chuig Django! Tá sonraí faoi theicnící níos forbartha a d'fhéadfadh a bheith ag teastáil uait in :d oc:/internals/contributing/writing-code/working-with-git.</p>\n<p>Anois is féidir leat na scileanna sin a úsáid go maith trí chabhrú le codebase Django a fheabhsú.</p>\n<section id=\"more-information-for-new-contributors\">\n<h3>Tuilleadh eolais do ranníocóirí nua<a class=\"heading-anchor\" href=\"#more-information-for-new-contributors\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Sula gcuirfidh tú isteach ar ranníoc le Django freisin, tá beagán faisnéise breise ar rannchuidiú ar cheart duit féachaint air:</p>\n<ul class=\"simple\">\n<li><p>Ba cheart duit a chinntiú go léifidh tú doiciméadú Django ar <a class=\"reference internal\" href=\"/ga/5.2/internals/contributing/writing-code/submitting-patches/\"><span class=\"doc\">ticéid a éileamh agus iarratais tarraingthe a chur isteach</span></a>. Clúdaíonn sé béasaíocht Trac, conas ticéid a éileamh duit féin, an stíl chódaithe a bhfuiltear ag súil leis (le haghaidh cód agus doiciméad), agus go leor sonraí tábhachtacha eile.</p></li>\n<li><p>Ba cheart do ranníocóirí céaduaire :d oc:documentation for first time contributors&lt;/internals/contributing/new-contributors/&gt; a léamh freisin. Tá go leor comhairle mhaith ann dóibh siúd againn atá nua chun cabhrú le Django.</p></li>\n<li><p>Ina dhiaidh sin, má tá ocras ort fós le haghaidh tuilleadh eolais faoi rannchuidiú, is féidir leat brabhsáil i gcónaí tríd an gcuid eile de :d oc:Django's documentation on contributing&lt;/internals/contributing/index&gt;. Tá tonna eolais úsáideach ann agus ba chóir go mbeadh sé ar do chéad fhoinse chun aon cheisteanna a d'fhéadfadh a bheith agat a fhreagairt.</p></li>\n</ul>\n</section>\n<section id=\"finding-your-first-real-ticket\">\n<h3>Do chéad ticéad fíor a aimsiú<a class=\"heading-anchor\" href=\"#finding-your-first-real-ticket\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Nuair a bheidh tú ag breathnú trí chuid den fhaisnéis sin, beidh tú réidh le dul amach agus ticéad de do chuid féin a fháil chun cur leis. Tabhair aird ar leith ar thicéid leis an gcritéar &quot;piocadh éasca&quot;. Is minic a bhíonn na ticéid seo i bhfad níos simplí agus tá siad iontach do rannpháirtithe den chéad uair. Nuair a bhíonn tú eolach ar rannchuidiú le Django, is féidir leat tosú ag obair ar thicéid níos deacra agus níos casta.</p>\n<p>Más mian leat tosú cheana féin (agus ní chuirfeadh aon duine an milleán ort!), déan iarracht féachaint ar an liosta <a href=\"#id9\"><span class=\"problematic\" id=\"id13\">`ticéad éasca gan brainse`__</span></a> agus ar na <a href=\"#id9\"><span class=\"problematic\" id=\"id14\">`ticéad éasca a bhfuil craobhacha de dhíth orthu a fheabhsú`__</span></a>. Má tá tú eolach ar thrialacha scríbhneoireachta, is féidir leat breathnú freisin ar an liosta <a href=\"#id9\"><span class=\"problematic\" id=\"id15\">`ticéad éasca a bhfuil tástálacha ag teastáil uathu`__</span></a>. Ná déan dearmad na treoirlínte a leanúint maidir le ticéid a éileamh a luadh sa nasc chuig doiciméadú Django ar :doc: ticéad a éileamh agus craobhacha a chur isteach &lt;/internals/ranníocaíocht/cód-scríobh/submitting-patches&gt;.</p>\n</section>\n<section id=\"what-s-next-after-creating-a-pull-request\">\n<h3>Cad atá romhainn tar éis iarratas tarraingthe a chruthú?<a class=\"heading-anchor\" href=\"#what-s-next-after-creating-a-pull-request\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Tar éis brainse a bheith ag ticéad, ní mór don dara sraith súl athbhreithniú a dhéanamh air. Tar éis iarratas tarraingthe a chur isteach, nuashonraigh meiteashonraí an ticéid trí na bratacha a shocrú ar an ticéad chun &quot;tá paiste&quot; a rá, &quot;ní gá tástálacha&quot;, srl, ionas gur féidir le daoine eile é a fháil le haghaidh athbhreithnithe. Ní gá go gciallódh cur leis an gcód scríbhneoireachta ó thús i gcónaí. Is ranníocaíocht an-chabhrach é athbhreithniú a dhéanamh ar iarratais ar tharraingt oscailte freisin. Féach :d oc:internals/contributing/triaging-tickets le haghaidh sonraí.</p>\n</section>\n</section>","rootId":"writing-your-first-contribution-for-django","toc":[{"title":"Réamhrá","anchor":"introduction","children":[{"title":"Cé dó an rang teagaisc seo?","anchor":"who-s-this-tutorial-for","children":[]},{"title":"Cad a chlúdaíonn an rang teagaisc seo?","anchor":"what-does-this-tutorial-cover","children":[]}]},{"title":"Cód Iompair","anchor":"code-of-conduct","children":[]},{"title":"Git á shuiteáil","anchor":"installing-git","children":[]},{"title":"Cóip de leagan forbartha Django a fháil","anchor":"getting-a-copy-of-django-s-development-version","children":[]},{"title":"Seomra tástála Django a reáchtáil den chéad uair","anchor":"running-django-s-test-suite-for-the-first-time","children":[]},{"title":"Working on an approved new feature","anchor":"working-on-an-approved-new-feature","children":[]},{"title":"Brainse a chruthú","anchor":"creating-a-branch","children":[]},{"title":"Scríobh roinnt tástálacha do do thicéad","anchor":"writing-some-tests-for-your-ticket","children":[{"title":"Tástáil a scríobh le haghaidh ticéad #99999","anchor":"writing-a-test-for-ticket-99999","children":[]},{"title":"Do thástáil nua a reáchtáil","anchor":"running-your-new-test","children":[]}]},{"title":"Scríobh an cód do do thicéad","anchor":"writing-the-code-for-your-ticket","children":[]},{"title":"Seomra tástála Django a reáchtáil don dara huair","anchor":"running-django-s-test-suite-for-the-second-time","children":[]},{"title":"Cáipéisíocht Scríbhneoireachta","anchor":"writing-documentation","children":[]},{"title":"Réamhamharc ar do chuid athruithe","anchor":"previewing-your-changes","children":[]},{"title":"Na hathruithe a dhéanamh","anchor":"committing-the-changes","children":[]},{"title":"An tiomantas a bhrú agus iarratas tarraingthe a dhéanamh","anchor":"pushing-the-commit-and-making-a-pull-request","children":[]},{"title":"Na chéad chéimeanna eile","anchor":"next-steps","children":[{"title":"Tuilleadh eolais do ranníocóirí nua","anchor":"more-information-for-new-contributors","children":[]},{"title":"Do chéad ticéad fíor a aimsiú","anchor":"finding-your-first-real-ticket","children":[]},{"title":"Cad atá romhainn tar éis iarratas tarraingthe a chruthú?","anchor":"what-s-next-after-creating-a-pull-request","children":[]}]}],"breadcrumbs":[{"docname":"intro/index","title":"Ag tosnú","url":"/ga/5.2/intro/"}],"prev":{"docname":"intro/whatsnext","title":"Cad atá le léamh ina dhiaidh sin","url":"/ga/5.2/intro/whatsnext/"},"next":{"docname":"topics/index","title":"Using Django","url":"/ga/5.2/topics/"},"formats":{"html":"/ga/5.2/intro/contributing/","markdown":"/ga/5.2/intro/contributing.md","json":"/ga/5.2/intro/contributing.json"},"source":"https://github.com/django/django/blob/stable/5.2.x/docs/intro/contributing.txt","official":"https://docs.djangoproject.com/ga/5.2/intro/contributing/","inVersions":["6.1","6.0","5.2"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}