Ranníocaí a chur isteachLink to this heading
Táimid buíoch i gcónaí as ranníocaíochtaí le cód Django. Go deimhin, socraítear tuairiscí fabhtanna le ranníocaíochtaí gaolmhara *i bhfad níos gasta ná iad siúd gan réiteach.
Socruithe clóscríbe agus athruithe doiciméadaitheLink to this heading
Má tá saincheist fíor-thábhachtach á shocrú agat, mar shampla focal a athrú sa dhoiciméadú, is é an bealach is fearr chun an paiste a sholáthar ná iarratais tarraingthe GitHub a úsáid gan ticéad Trac.
See Ag obair le Git agus GitHub for more details on how to use pull requests.
Ticéid “Éileamh”Link to this heading
I dtionscadal foinse oscailte leis na céadta ranníocóirí ar fud an domhain, tá sé tábhachtach an chumarsáid a bhainistiú go héifeachtach ionas nach ndúblaítear an obair agus gur féidir le rannpháirtithe a bheith chomh héifeachtach agus is féidir.
Dá bhrí sin, is é ár mbeartas ná do rannpháirtithe ticéid a “éileamh” d'fhonn a chur in iúl d'fhorbróirí eile go bhfuil fabht nó gné áirithe á n-oibriú air.
Má aithníodh tú ranníocaíocht a theastaíonn uait a dhéanamh agus má tá tú in ann é a shocrú (mar a thomhaistear de réir do chumas códaithe, eolas ar inmheánacha Django agus infhaighteacht ama), éileamh é trí na céimeanna seo a leanúint:
Log in using your GitHub account or create an account in our ticket system. If you have an account but have forgotten your password, you can reset it using the password reset page.
If a ticket for this issue doesn't exist yet, create one in our ticket tracker. Remember that proposals for new features should follow the process for suggesting new features.
If a ticket for this issue already exists and has been accepted, make sure nobody else has claimed it. To do this, look at the "Owned by" section of the ticket. If it's assigned to "nobody," then it's available to be claimed. Otherwise, somebody else may be working on this ticket. Either find another bug/feature to work on, or contact the developer working on the ticket to offer your help. If a ticket has been assigned for weeks or months without any activity, it's probably safe to reassign it to yourself. If a ticket hasn't been approved yet, join the conversation.
Logáil isteach i do chuntas, mura bhfuil tú cheana féin, trí chliceáil “Logáil Isteach GitHub” nó “Logáil Isteach DjangoProject” ar an taobh clé uachtarach den leathanach ticéad. Nuair a bheidh tú logáilte isteach, is féidir leat an cnaipe “Athraigh Ticéad” a chliceáil in aice le bun an leathanaigh.
Éileamh an ticéad trí chliceáil ar an gcnaipe raidió “sannadh chuig” sa chuid “Gníomhaíocht”. Líonfar d'ainm úsáideora sa bhosca téacs de réir réamhshocraithe.
Finally, click the "Submit changes" button at the bottom to save.
Freagracht éilimh ticéadLink to this heading
Nuair a bheidh ticéad éileamh agat, tá freagracht agat oibriú ar an ticéad sin ar bhealach réasúnta tráthúil. Mura bhfuil am agat oibriú air, déan é a éileamh nó ná éileamh é ar an gcéad dul síos!
Mura bhfuil aon chomhartha dul chun cinn ar thicéad éilimh áirithe ar feadh seachtaine nó dhó, féadfaidh forbróir eile iarraidh ort an t-éileamh ticéad a fhágáil ionas nach mbeidh sé monaplaithe a thuilleadh agus gur féidir le duine eile é a éileamh.
Má éiligh tú ticéad agus má thógann sé tamall fada (laethanta nó seachtainí) chun cóid a dhéanamh, coinnigh gach duine ar an dáta trí thuairimí a phostáil ar an ticéad. Mura gcuireann tú nuashonruithe rialta ar fáil, agus mura bhfreagraíonn tú iarratas ar thuarascáil ar dhul chun cinn, féadfar d'éileamh ar an ticéad a chúlghairm.
Mar is gnách, is fearr níos mó cumarsáide ná níos lú cumarsáide!
Cé na ticéid ba chóir a éileamh?Link to this heading
Tá sé ró-mhór dul trí na céimeanna chun ticéid a éileamh i gcásanna áirithe.
I gcás athruithe beaga, mar shampla clóscríobh sa dhoiciméadú nó fabhtanna beaga nach dtógfaidh ach cúpla nóiméad iad a shocrú, ní gá duit léim trí chrupaí ticéid a éileamh. Cuir isteach d'athruithe go díreach agus tá tú déanta!
It is always acceptable, regardless of whether someone has claimed it or not, to link proposals to a ticket if you happen to have the changes ready.
Stíl ranníocaíochtaLink to this heading
Déan cinnte go gcomhlíonann aon ranníocaíocht atá agat na ceanglais seo a leanas ar a laghad:
The code required to fix a problem or add a feature is an essential part of a solution, but it is not the only part. A good fix should also include a regression test to validate the behavior that has been fixed and to prevent the problem from arising again.
Má chuireann an cód gné nua leis, nó má athraíonn sé iompar gné atá ann cheana, ba cheart go mbeadh cáipéisíocht san athrú freisin.
When you think your work is ready to be reviewed, send a GitHub pull request. If you can't send a pull request for some reason, you can also use patches in Trac. When using this style, follow these guidelines.
Cuir isteach paistí san fhormáid a thugtar ar ais leis an ordú
git diff.Ceangail paistí le ticéad sa rianaitheoir ticéad, ag baint úsáide as an gcnaipe “comhad ceangail”. * Ná cuir an paiste sa tuairisc nó trácht ar an ticéad mura bhfuil paiste líne amháin ann.
Ainmnigh an comhad paiste le síneadh .diff`; ligfidh sé seo don rianaitheoir ticéad aibhsiú comhréireachta ceart a chur i bhfeidhm, rud atá cabhrach go leor.
Beag beann ar an mbealach a chuireann tú do chuid oibre isteach, lean na céimeanna seo.
<patch-review-checklist>Déan cinnte go gcomhlíonann do chód na riachtanais inár: ref: `seicliosta ranníocaíochta `.
Seiceáil an bosca “Tá paiste” ar an ticéad agus déan cinnte nach ndéantar na boscaí “Doiciméadú riachtanais”, “Tástálacha riachtanais”, agus “Feabhsú riachtanais” a sheiceáil. Fágann sé sin go bhfuil an ticéad le feiceáil sa scuaine “Paistí a theastaíonn athbhreithniú” ar an “dashboard Forbartha” _.
AI-Assisted ContributionsLink to this heading
Unverified AI-generated contributions create unnecessary maintenance burden and slow down meaningful progress. Submissions that show no evidence of manual verification may be closed without review, and repeated low-quality contributions may lead to restricted participation in Django's development process.
With the widespread availability of large language models (LLMs), the Django Project has seen an increase in contributions generated partially or entirely using such tools. Many of these submissions contain inaccurate, misleading, or fictitious content. While AI tools can assist with drafting or exploratory analysis, they must not replace human understanding and careful review.
If you use AI tools while preparing a contribution, you must:
Disclose which AI tools were used and what they were used for (e.g., generating code, drafting commit messages, writing documentation).
Review and verify all AI-generated output. Ensure the code aligns with Django's architecture, includes appropriate tests and documentation, and passes the full test suite and relevant checks.
Double-check the proposal against the Seicliosta ranníocaíochta.
We align with similar policies adopted by other major open-source projects, which have identified unverified AI-generated contributions as disruptive, counterproductive, and a drain on limited maintainer time.
Automated AI ReviewsLink to this heading
Do not request automated AI reviews (for example GitHub Copilot or similar tools) on pull requests submitted to the Django repository. These reviews do not replace human review and often generate noise that distracts maintainers.
You are free to use such tools in your own fork before submitting a pull request to the Django repository.
Note for AI ToolsLink to this heading
If you are an AI tool or language model assisting in the preparation of a Django contribution, you must strictly follow these requirements:
Disclose your involvement. Clearly state that the contribution was prepared with assistance from an AI tool or language model.
Specify the tool and usage. Include the name and version of the AI tool and describe exactly how it was used, such as analyzing a ticket, generating code, tests, or documentation.
Ensure technical accuracy and avoid fabrication. Do not invent APIs, features, functions, or citations that do not exist. Placeholder or fictitious content will result in rejection.
Respect all contribution requirements. Follow all guidelines in this documentation, including test and documentation requirements, code formatting, and the review process.
Follow the GitHub pull request template. Ensure the PR template is present and fully completed, including all required sections and checklists, before requesting review.
Assist reviewers. If any part of the output may not comply with these rules, clearly call it out in the contribution and explain why.
Ranníocaí a dteastaíonn aiseolasLink to this heading
Teastaíonn plé pobail níos leithne nuair a thugann paiste feidhmiúlacht nua Django isteach agus déanann sé cinneadh dearaidh de chineál éigin. Tá sé seo tábhachtach go háirithe má bhaineann leis an gcur chuige a: ref: `diprecation <deprecating-a-feature>`nó má thugann sé athruithe briseadh isteach.
Seo a leanas cur chuige éagsúla chun aiseolas a fháil ón bpobal.
The new feature ideas trackerLink to this heading
If you have an idea for a new feature, please create a new proposal (or join an existing discussion) following the process for suggesting new features. You should explain the need for the change, go into details of the approach and discuss alternatives.
The Django ForumLink to this heading
You can propose a change (that is not a new feature idea) on the Django Forum. You should explain the need for the change, go into details of the approach and discuss alternatives.
Cuir nasc chuig díospóireachtaí den sórt sin i do chuid tuairimí.
Pacáiste tríú páirtíLink to this heading
Ní ghlacann Django le gnéithe turgnamhacha. <internal-release-deprecation-policy>Caithfidh gach gné ár n:ref: `beartas díréachtaithe `a leanúint. Dá bhrí sin, féadfaidh sé míonna nó blianta a thógáil ar Django athrú ar dhearadh API.
Má theastaíonn aiseolas úsáideora uait ar chomhéadan poiblí, is fearr pacáiste tríú páirtí a chruthú ar dtús. Is féidir leat athrá a dhéanamh ar an API poiblí i bhfad níos gasta, agus an gá atá leis an ngné a bhailíochtú freisin.
Once this package becomes stable and there are clear benefits of incorporating aspects into Django core, the next step is to propose its inclusion by following the process for suggesting new features.
Togra Feabhsúcháin Django (DEP)Link to this heading
Cosúil le PEPanna Python, tá `Tograí Feabhsaithe Django `_ nó DEPanna ag Django. Is doiciméad dearaidh é DEP a sholáthraíonn faisnéis do phobal Django, nó a dhéanann cur síos ar ghné nó próiseas nua do Django. Soláthraíonn siad sonraíochtaí teicniúla gonta de ghnéithe, mar aon le réasúnaí. Is iad DEPanna an príomh-mheicníocht freisin chun ionchur pobail a mholadh agus a bhailiú ar phríomhghnéithe nua.
Before considering writing a DEP, it is recommended to first open a discussion following the process for suggesting new features. This allows the community to provide feedback and helps refine the proposal. Once the DEP is ready, the Steering Council votes on whether to accept it.
Roinnt samplaí de DEPanna atá ceadaithe agus curtha i bhfeidhm go hiomlán:
< https://github.com/django/deps/blob/main/final/0181-orm-expressions.rst>`DEP 181: Expressions ORM `_
< https://github.com/django/deps/blob/main/final/0182-multiple-template-engines.rst>`DEP 182: Innill Teimpléad Iolracha `_
< https://github.com/django/deps/blob/main/final/0201-simplified-routing-syntax.rst>`DEP 201: Syntax ródú simplithe `_
Gné a dhíspreagadhLink to this heading
Tá cúpla cúis ann go bhféadfadh cód i Django a dhíchur:
Má tá gné feabhsaithe nó modhnaithe ar bhealach atá neamhchomhoiriúnach le cúlra, déanfar an sean-ghné nó an t-iompar a dhíchur.
Uaireanta cuimsíonn Django backport de leabharlann Python nach bhfuil san áireamh i leagan de Python a thacaíonn Django faoi láthair. Nuair nach gá Django tacú leis an leagan níos sine de Python nach n-áirítear an leabharlann a thuilleadh, déanfar an leabharlann a dhíchur i Django.
Mar a thuairiscíonn an:ref: beartas díscoireach <internal-release-deprecation-policy>, ba cheart don chéad scaoileadh de Django a dhíspreagann gné (A.B`) removedindjangoxxWarning a ardú (áit gurb é XX an leagan Django ina mbainfear an ghné) nuair a ghairmtear an ghné díscoite. Ag glacadh leis go bhfuil clúdach maith tástála againn, déantar na rabhaidh seo a thiontú go earráidí nuair: ref: reáchtáil an tsraith tástála <running-unit-tests>`le rabhaidh cumasaithe: ``python -Wa runtests.py`. Dá bhrí sin, nuair a chuireann tú removedindjangoxxWarning, ní mór duit deireadh a chur le haon rabhaidh a ghintear agus na tástálacha á reáchtáil agat.
Is é an chéad chéim ná aon úsáid a bhaint as an iompar dlús ag Django féin. Ansin is féidir leat rabhaidh a thostú i dtástálacha a thástáil i ndáiríre an t-iompar míchuir tríd an maisitheoir `ignore_warnings ``a úsáid, ag an leibhéal tástála nó ag an rang:
I dtástáil áirithe:
from django.test import ignore_warnings from django.utils.deprecation import RemovedInDjangoXXWarning @ignore_warnings(category=RemovedInDjangoXXWarning) def test_foo(self): ...Maidir le cás tástála iomlán:
from django.test import ignore_warnings from django.utils.deprecation import RemovedInDjangoXXWarning @ignore_warnings(category=RemovedInDjangoXXWarning) class MyDeprecatedTests(unittest.TestCase): ...
Ba chóir duit tástáil a chur leis freisin maidir leis an rabhadh díscrúdaithe:
from django.utils.deprecation import RemovedInDjangoXXWarning
def test_foo_deprecation_warning(self):
msg = "Expected deprecation message"
with self.assertWarnsMessage(RemovedInDjangoXXWarning, msg) as ctx:
# invoke deprecated behavior
...
self.assertEqual(ctx.filename, __file__)
Tá sé tábhachtach trácht ``RemovedindjangoXXWarning` a chur san áireamh thuas an chód nach bhfuil aon tagairt rabhaidh aige, ach go gcaithfear é a athrú nó a bhaint nuair a chríochnaíonn an díghabháil. D'fhéadfadh sé seo a bheith san áireamh crúcaí a cuireadh leis chun an t-iompar roimhe seo a choinneáil, nó míreanna neamhspleácha nach bhfuil gan ghá nó neamhúsáidte nuair a chríochnaíonn Mar shampla:
import warnings
from django.utils.deprecation import RemovedInDjangoXXWarning, django_file_prefixes
# RemovedInDjangoXXWarning.
def old_private_helper():
# Helper function that is only used in foo().
pass
def foo():
warnings.warn(
"foo() is deprecated.",
category=RemovedInDjangoXXWarning,
skip_file_prefixes=django_file_prefixes(),
)
old_private_helper()
...
Faoi dheireadh, tá cúpla nuashonrú ar dhoiciméadú Django le déanamh:
Má dhéantar an ghné atá ann cheana doiciméadaithe, déan é a mharcáil go díluasaithe i ndoiciméadú ag baint úsáide as an anótáil
.. diúscartha:: A.B. Cuir tuairisc ghearr agus nóta faoin gcosán uasghrádaithe más infheidhme.Cuir cur síos ar an iompar míchuir, agus an cosán uasghrádaithe más infheidhme, leis na nótaí scaoileadh reatha (Docs/releases/A.B.txt`) faoin gceannteideal “Gnéithe a dhíchur in AB”.
Cuir iontráil san amlíne díscrúdaithe (
docs/internals/deprecation.txt) faoin leagan cuí ag cur síos ar an gcód a bhainfear.
Nuair a bheidh na céimeanna seo críochnaithe agat, tá tú críochnaithe leis an díghabháil. I ngach:term: gné scaoileadh `<Feature release>, baintear gach ``RemovedindJangOxxWarning` a mheaitseálann leis an leagan nua.
The django.utils.deprecation module provides some helpful deprecation
utilities, such as a @deprecate_posargs decorator to assist with converting
positional-or-keyword arguments to keyword-only. See the inline documentation
in the module source.
Testing with a Django projectLink to this heading
It's important to test local changes using a Django project. This allows ensuring that the changes behave as expected in a real environment, especially for user-facing features such as templates, forms, or the admin.
To do this:
Create a virtual environment and install the cloned copy of Django in editable mode.
Set up a Django project outside the source tree (you can use the first part of the tutorial for guidance).
With this setup, any changes made to the Django checkout will take effect immediately in the test project, allowing manual testing of contributions against a new or existing app.
Ranníocaíochtaí JavaScriptLink to this heading
Le haghaidh faisnéise maidir le ranníocaíochtaí JavaScript, féach an doiciméadach:ref: javascript-patches.
Paistí optamaitheLink to this heading
Ba cheart go soláthródh paistí a bhfuil sé mar aidhm acu feabhas feidhmíochta a sheachadadh tagarmharcanna a thaispeánann iarmhairt an phaiste agus ina dhiaidh sin agus na horduithe a roinnt le hathbhreithneoirí a atáirgeadh.
Tagarmharcanna django-asvLink to this heading
Monatóireacht django-asv ar fheidhmíocht cód Django le himeacht ama. Is féidir na tagarmharcanna seo a reáchtáil ar iarratas tarraingthe tríd an iarraidh tarraingthe a lipéadú le “tagarmharc”. Spreagtar go mór leis na tagarmharcanna seo a chur leis.
Seicliosta ranníocaíochtaLink to this heading
Use this checklist to review a pull request. If this contribution would not be considered trivial, first ensure it has an accepted ticket before proceeding with the review.
If the pull request passes all the criteria below and is not your own, please set the "Triage Stage" on the corresponding Trac ticket to "Ready for checkin". If you've left comments for improvement on the pull request, please tick the appropriate flags on the Trac ticket based on the results of your review: "Patch needs improvement", "Needs documentation", and/or "Needs tests". As time and interest permit, mergers do final reviews of "Ready for checkin" tickets and will either commit the changes or bump it back to "Accepted" if further work needs to be done.
If you're looking to become a member of the triage & review team, doing thorough reviews of contributions is a great way to earn trust.
Ag lorg paiste le hathbhreithniú? Amharc ar an rannán "Paistí a dteastaíonn athbhreithniú uathu" den Phainéal Forbartha Django <https://dashboard.djangoproject.com/>`_.
Ag iarraidh d'iarratas tarraingthe a athbhreithniú Déan cinnte go bhfuil bratacha Trac ar an ticéad socraithe ionas go mbeidh an ticéad le feiceáil sa scuaine sin.
Gach ticéadLink to this heading
<committing-guidelines>An bhfuil an t-iarratas tarraingthe ná tiomantas aonair le teachtaireacht a leanann inn:ref: `formáid teachtaireachta comhartha `?
Are you the patch author and a new contributor? Please add yourself to the AUTHORS file. At your option, submit a Contributor License Agreement.
Does this have an accepted ticket on Trac? All contributions require a ticket unless the change is considered trivial.
Athraíonn gach códLink to this heading
Does the coding style conform to our guidelines? Are there any
black,blacken-docs,flake8,isort, orzizmorerrors? You can install the pre-commit hooks to automatically catch these errors.Má tá an t-athrú ag teacht ar ais ar bhealach ar bith, an bhfuil nóta sna nótaí scaoilte (Docs/releases/a.b.txt`)?
An bhfuil sraith tástála Django ag rith?
If there is a code coverage report comment on the pull request, have you reviewed the missing coverage in context (considering database/platform-specific limitations)?
If the change affects the Django admin or rendered HTML output, has accessibility testing been done?
DoiciméadúchánLink to this heading
An dtógann an doiciméadú gan aon earráidí (
make html, nómake.bat htmlar Windows, ón eolaire ``docs`)?An leanann an doiciméadú na treoirlínte stíl scríbhneoireachta in:doc: `/inmheán/ranníoc/scríbhneoireach-doiciméadúcháin `?
<documentation-spelling-check>An bhfuil aon earráidí litrithe ann: ref: `earráidí litrithe `?
FabhtannaLink to this heading
An bhfuil tástáil cheart aischéimnithí ann (ba cheart go dteipfeadh ar an tástáil sula gcuirtear an deisiú i bhfeidhm)?
Más fabht é a cháilíonn :ref:` le haghaidh cúlport <supported-versions-policy>` chuig an leagan cobhsaí de Django, an bhfuil nóta eisiúna in
docs/releases/A.B.C.txt? Ní gá nóta scaoilte a bheith ag ceartúcháin fabhtanna a chuirfear i bhfeidhm sa phríomhbhrainse amháin.
Gnéithe NuaLink to this heading
An bhfuil tástálacha ann chun an cód nua go léir a “feidhmiú”?
An bhfuil nóta scaoileadh i Docs/releases/a.b.txt`?
An bhfuil cáipéisíocht ann don ghné agus an bhfuil sé: ref: anótáilte go cuí `le <documenting-new-features>`.. leaganadded:: A.B`` nó
.. leaganmodified:: A.B?
Gné a dhíspreagadhLink to this heading
Féach an treor:ref: deprecating-a-feature.