{"title":"Writing your first Django app, part 8","version":"4.2","locale":"it","docname":"intro/tutorial08","url":"/it/4.2/intro/tutorial08/","canonical":"https://djangodocs.dev/it/4.2/intro/tutorial08/","summary":"This tutorial begins where Tutorial 7 left off. We’ve built our web-poll application and will now look at third-party packages. One of Django’s strengths is the…","html":"<h1>Writing your first Django app, part 8<a class=\"heading-anchor\" href=\"#writing-your-first-django-app-part-8\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>This tutorial begins where <a class=\"reference internal\" href=\"/it/4.2/intro/tutorial07/\"><span class=\"doc\">Tutorial 7</span></a> left off. We’ve\nbuilt our web-poll application and will now look at third-party packages. One of\nDjango’s strengths is the rich ecosystem of third-party packages. They’re\ncommunity developed packages that can be used to quickly improve the feature set\nof an application.</p>\n<p>This tutorial will show how to add <a class=\"reference external\" href=\"https://django-debug-toolbar.readthedocs.io\">Django Debug Toolbar</a>, a commonly used third-party\npackage. The Django Debug Toolbar has ranked in the top three most used\nthird-party packages in the Django Developers Survey in recent years.</p>\n<aside class=\"admonition-where-to-get-help admonition\">\n<p class=\"admonition-title\">Dove trovare aiuto:</p>\n<p>Se hai difficoltà a completare questo tutorial,  per favore vai alla sezione <a class=\"reference internal\" href=\"/it/4.2/faq/help/\"><span class=\"doc\">Getting Help</span></a> delle FAQ.</p>\n</aside>\n<section id=\"installing-django-debug-toolbar\">\n<h2>Installing Django Debug Toolbar<a class=\"heading-anchor\" href=\"#installing-django-debug-toolbar\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Django Debug Toolbar is a useful tool for debugging Django web applications.\nIt’s a third-party package maintained by the <a class=\"reference external\" href=\"https://jazzband.co\">Jazzband</a> organization. The toolbar helps you understand how your\napplication functions and to identify problems. It does so by providing panels\nthat provide debug information about the current request and response.</p>\n<p>To install a third-party application like the toolbar, you need to install\nthe package by running the below command within an activated virtual\nenvironment. This is similar to our earlier step to <a class=\"reference internal\" href=\"/it/4.2/topics/install/#installing-official-release\"><span class=\"std std-ref\">install Django</span></a>.</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>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>pip<span class=\"w\"> </span>install<span class=\"w\"> </span>django-debug-toolbar\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> py -m pip install django-debug-toolbar\n</code></pre></div></div></div>\n<p>Third-party packages that integrate with Django need some post-installation\nsetup to integrate them with your project. Often you will need to add the\npackage’s Django app to your <a class=\"reference internal\" href=\"/it/4.2/ref/settings/#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a> setting. Some packages\nneed other changes, like additions to your URLconf (<code class=\"docutils literal notranslate\"><span class=\"pre\">urls.py</span></code>).</p>\n<p>Django Debug Toolbar requires several setup steps. Follow them in <a class=\"reference external\" href=\"https://django-debug-toolbar.readthedocs.io/en/latest/installation.html\">its\ninstallation guide</a>.\nThe steps are not duplicated in this tutorial, because as a third-party\npackage, it may change separately to Django’s schedule.</p>\n<p>Once installed, you should be able to see the DjDT «handle» on the right side\nof the browser window when you refresh the polls application. Click it to open\nthe debug toolbar and use the tools in each panel. See the <a class=\"reference external\" href=\"https://django-debug-toolbar.readthedocs.io/en/latest/panels.html\">panels\ndocumentation page</a> for more\ninformation on what the panels show.</p>\n</section>\n<section id=\"getting-help-from-others\">\n<h2>Getting help from others<a class=\"heading-anchor\" href=\"#getting-help-from-others\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>At some point you will run into a problem, for example the\ntoolbar may not render. When this happens and you’re unable to\nresolve the issue yourself, there are options available to you.</p>\n<ol class=\"arabic simple\">\n<li><p>If the problem is with a specific package, check if there’s a\ntroubleshooting of FAQ in the package’s documentation. For example the\nDjango Debug Toolbar has a <a class=\"reference external\" href=\"https://django-debug-toolbar.readthedocs.io/en/latest/tips.html\">Tips section</a> that\noutlines troubleshooting options.</p></li>\n<li><p>Search for similar issues on the package’s issue tracker. Django Debug\nToolbar’s is <a class=\"reference external\" href=\"https://github.com/jazzband/django-debug-toolbar/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc\">on GitHub</a>.</p></li>\n<li><p>Consult the <a class=\"reference external\" href=\"https://forum.djangoproject.com/\">Django Forum</a>.</p></li>\n<li><p>Join the <a class=\"reference external\" href=\"https://discord.gg/xcRH6mN4fa\">Django Discord server</a>.</p></li>\n<li><p>Join the #Django IRC channel on <a class=\"reference external\" href=\"https://libera.chat/\">Libera.chat</a>.</p></li>\n</ol>\n</section>\n<section id=\"installing-other-third-party-packages\">\n<h2>Installing other third-party packages<a class=\"heading-anchor\" href=\"#installing-other-third-party-packages\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>There are many more third-party packages, which you can find using the\nfantastic Django resource, <a class=\"reference external\" href=\"https://djangopackages.org/\">Django Packages</a>.</p>\n<p>It can be difficult to know what third-party packages you should use. This\ndepends on your needs and goals. Sometimes it’s fine to use a package that’s\nin its alpha state. Other times, you need to know it’s production ready.\n<a class=\"reference external\" href=\"https://adamj.eu/tech/2021/11/04/the-well-maintained-test/\">Adam Johnson has a blog post</a> that outlines\na set of characteristics that qualifies a package as «well maintained».\nDjango Packages shows data for some of these characteristics, such as when the\npackage was last updated.</p>\n<p>As Adam points out in his post, when the answer to one of the questions is\n«no», that’s an opportunity to contribute.</p>\n</section>\n<section id=\"what-s-next\">\n<h2>Cos’altro?<a class=\"heading-anchor\" href=\"#what-s-next\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Il tutorial per principianti termina qui. Nel frattempo, potresti voler controllare alcuni suggerimenti su <a class=\"reference internal\" href=\"/it/4.2/intro/whatsnext/\"><span class=\"doc\">dove andare da qui</span></a>.</p>\n<p>Se hai familiarità con la creazione di pacchetti Python e sei interessato a imparare come trasformare i sondaggi in una «app riutilizzabile», controlla <a class=\"reference internal\" href=\"/it/4.2/intro/reusable-apps/\"><span class=\"doc\">Tutorial avanzato: come scrivere app riutilizzabili</span></a>.</p>\n</section>","rootId":"writing-your-first-django-app-part-8","toc":[{"title":"Installing Django Debug Toolbar","anchor":"installing-django-debug-toolbar","children":[]},{"title":"Getting help from others","anchor":"getting-help-from-others","children":[]},{"title":"Installing other third-party packages","anchor":"installing-other-third-party-packages","children":[]},{"title":"Cos’altro?","anchor":"what-s-next","children":[]}],"breadcrumbs":[{"docname":"intro/index","title":"Come iniziare","url":"/it/4.2/intro/"}],"prev":{"docname":"intro/tutorial07","title":"Scrivere la tua prima applicazione in Django, parte 7","url":"/it/4.2/intro/tutorial07/"},"next":{"docname":"intro/reusable-apps","title":"Tutorial avanzato: Come scrivere applicazioni riutilizzabili","url":"/it/4.2/intro/reusable-apps/"},"formats":{"html":"/it/4.2/intro/tutorial08/","markdown":"/it/4.2/intro/tutorial08.md","json":"/it/4.2/intro/tutorial08.json"},"source":"https://github.com/django/django/blob/stable/4.2.x/docs/intro/tutorial08.txt","official":"https://docs.djangoproject.com/it/4.2/intro/tutorial08/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2"],"inLocales":["en","zh-hans","fr","ja","id","it","pt-br","ko","es","el","pl"]}