CINXE.COM
Getting started with Django | Django
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="ROBOTS" content="ALL" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta name="Copyright" content="Django Software Foundation" /> <meta name="keywords" content="Python, Django, framework, open-source" /> <meta name="description" content="" /> <!-- Favicons --> <link rel="apple-touch-icon" href="https://static.djangoproject.com/img/icon-touch.e4872c4da341.png"> <link rel="icon" sizes="192x192" href="https://static.djangoproject.com/img/icon-touch.e4872c4da341.png"> <link rel="shortcut icon" href="https://static.djangoproject.com/img/favicon.6dbf28c0650e.ico"> <meta name="msapplication-TileColor" content="#113228"> <meta name="msapplication-TileImage" content="https://static.djangoproject.com/img/icon-tile.b01ac0ef9f67.png"> <meta name="theme-color" content="#0C4B33"> <meta property="og:title" content="Getting started with Django" /> <meta property="og:description" content="It's quick & easy to get up and running with Django" /> <meta property="og:image" content="https://static.djangoproject.com/img/logos/django-logo-negative.1d528e2cb5fb.png" /> <meta property="og:image:alt" content="Django logo" /> <meta property="og:image:width" content="1200" /> <meta property="og:image:height" content="546" /> <meta property="og:image:type" content="image/png" /> <meta property="og:url" content="https://www.djangoproject.com/start/" /> <meta property="og:site_name" content="Django Project" /> <meta property="twitter:creator" content="djangoproject" /> <meta property="twitter:site" content="djangoproject" /> <meta property="twitter:card" content="summary"> <title>Getting started with Django | Django</title> <link rel="stylesheet" href="https://static.djangoproject.com/css/output.3473120a7b23.css" > <script src="https://static.djangoproject.com/js/mod/switch-dark-mode.bd4be131d69b.js"></script> </head> <body id="generic" class=""> <header id="top"> <div class="container container--flex--wrap--mobile"> <a class="logo" href="https://www.djangoproject.com/">Django</a> <p class="meta">The web framework for perfectionists with deadlines.</p> <div class="mobile-toggle"> <button class="theme-toggle"> <div class="visually-hidden theme-label-when-auto">Toggle theme (current theme: auto)</div> <div class="visually-hidden theme-label-when-light">Toggle theme (current theme: light)</div> <div class="visually-hidden theme-label-when-dark">Toggle theme (current theme: dark)</div> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg aria-hidden="true" class="theme-icon-when-auto"> <use xlink:href="#icon-auto" /> </svg> <svg aria-hidden="true" class="theme-icon-when-dark"> <use xlink:href="#icon-moon" /> </svg> <svg aria-hidden="true" class="theme-icon-when-light"> <use xlink:href="#icon-sun" /> </svg> </button> </div> <button class="menu-button"> <i class="icon icon-reorder"></i> <span class="visuallyhidden">Menu</span> </button> <nav aria-labelledby="navigation-header"> <span id="navigation-header" class="visuallyhidden">Main navigation</span> <ul> <li class="active"> <a href="https://www.djangoproject.com/start/overview/">Overview</a> </li> <li> <a href="https://www.djangoproject.com/download/">Download</a> </li> <li> <a href="https://docs.djangoproject.com/">Documentation</a> </li> <li> <a href="https://www.djangoproject.com/weblog/">News</a> </li> <li> <a href="https://www.djangoproject.com/community/">Community</a> </li> <li> <a href="https://github.com/django/django" target="_blank" rel="noopener">Code</a> </li> <li> <a href="https://code.djangoproject.com/">Issues</a> </li> <li> <a href="https://www.djangoproject.com/foundation/">About</a> </li> <li> <a href="https://www.djangoproject.com/fundraising/">♥ Donate</a> </li> <li> <button class="theme-toggle"> <div class="visually-hidden theme-label-when-auto">Toggle theme (current theme: auto)</div> <div class="visually-hidden theme-label-when-light">Toggle theme (current theme: light)</div> <div class="visually-hidden theme-label-when-dark">Toggle theme (current theme: dark)</div> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg aria-hidden="true" class="theme-icon-when-auto"> <use xlink:href="#icon-auto" /> </svg> <svg aria-hidden="true" class="theme-icon-when-dark"> <use xlink:href="#icon-moon" /> </svg> <svg aria-hidden="true" class="theme-icon-when-light"> <use xlink:href="#icon-sun" /> </svg> </button> </li> </ul> </nav> </div> </header> <section class="copy-banner"> <div class="container "> <div class="layout-2col"> <div class="col two-third"> <p>It’s <em>quick & easy</em> to get up and running with <em>Django</em>.</p> </div> <div class="col one-third last-child"> <a href="https://www.djangoproject.com/download/" class="cta"> Download <em>version 5.2</em> </a> </div> </div> </div> </section> <div id="billboard"></div> <div class="container full-width"> <main> <div class="section"> <h1>Getting started with Django</h1> <p> Depending how new you are to Django, you can <a href="https://docs.djangoproject.com/en/stable/intro/tutorial01/">try a tutorial</a>, or just <a href="https://docs.djangoproject.com/">dive into the documentation</a>. </p> <p> Want to learn more about Django? Read the overview to see whether Django is right for your project. </p> <a class="link-readmore" href="https://www.djangoproject.com/start/overview/">Django overview</a> </div> <div class="section"> <h2>Install Django</h2> <p> Before you can use Django, you’ll need to install it. Our complete installation guide covers all the possibilities; this guide will get you to a simple, minimal installation that’ll work while you walk through the introduction. </p> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/intro/install/"> Django installation guide </a> </div> <div class="section"> <h2>Write your first Django app</h2> <p> Installed Django already? Good. Now <a href="https://docs.djangoproject.com/en/stable/intro/tutorial01/">try this tutorial</a>, which walks you through creating a basic poll application. It’s got two parts: </p> <ol> <li>A public site that lets people view polls and vote in them.</li> <li>An administrative interface that lets you add, change and delete polls.</li> </ol> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/intro/tutorial01/">Take the tutorial</a> </div> <div class="section"> <h2>Sharpen your skills</h2> <p> The official <a href="https://docs.djangoproject.com/">Django documentation</a> covers everything you need to know about Django (and then some). </p> <a href="https://docs.djangoproject.com/" class="link-readmore">Read the docs</a> </div> <div class="section"> <h2><span>Join the community</span></h2> <p> You can help <a href="https://www.djangoproject.com/community/">make us better</a>. Find out about upcoming Django events, learn what’s on other Django developers’ minds, find and post jobs, and more. </p> <a href="https://www.djangoproject.com/community/" class="link-readmore">Join us</a> </div> <div class="list-collapsing-header"> <h2><span>Intro to Django</span></h2> </div> <ul class="list-collapsing"> <li> <h2>Object-relational mapper</h2> <div class="collapsing-content"> <p> Define your data models entirely in Python. You get a rich, dynamic database-access API for free — but you can still write SQL if needed. </p> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/topics/db/models/"> Read more </a> <div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">django.db</span><span class="w"> </span><span class="kn">import</span> <span class="n">models</span> <span class="k">class</span><span class="w"> </span><span class="nc">Band</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span> <span class="w"> </span><span class="sd">"""A model of a rock band."""</span> <span class="n">name</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mi">200</span><span class="p">)</span> <span class="n">can_rock</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">BooleanField</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> <span class="k">class</span><span class="w"> </span><span class="nc">Member</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span> <span class="w"> </span><span class="sd">"""A model of a rock band member."""</span> <span class="n">name</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="s2">"Member's name"</span><span class="p">,</span> <span class="n">max_length</span><span class="o">=</span><span class="mi">200</span><span class="p">)</span> <span class="n">instrument</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span> <span class="n">choices</span><span class="o">=</span><span class="p">(</span> <span class="p">(</span><span class="s2">"g"</span><span class="p">,</span> <span class="s2">"Guitar"</span><span class="p">),</span> <span class="p">(</span><span class="s2">"b"</span><span class="p">,</span> <span class="s2">"Bass"</span><span class="p">),</span> <span class="p">(</span><span class="s2">"d"</span><span class="p">,</span> <span class="s2">"Drums"</span><span class="p">),</span> <span class="p">),</span> <span class="n">max_length</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="p">)</span> <span class="n">band</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="s2">"Band"</span><span class="p">)</span> </pre></div> </div> </li> <li> <h2>URLs and views</h2> <div class="collapsing-content"> <p>A clean, elegant URL scheme is an important detail in a high-quality web application. Django encourages beautiful URL design and doesn’t put any cruft in URLs, like .php or .asp.</p> <p>To design URLs for an application, you create a Python module called a URLconf. Like a table of contents for your app, it contains a simple mapping between URL patterns and your views.</p> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/topics/http/urls/">Read more</a> <div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">django.urls</span><span class="w"> </span><span class="kn">import</span> <span class="n">path</span> <span class="kn">from</span><span class="w"> </span><span class="nn">.</span><span class="w"> </span><span class="kn">import</span> <span class="n">views</span> <span class="n">urlpatterns</span> <span class="o">=</span> <span class="p">[</span> <span class="n">path</span><span class="p">(</span><span class="s2">"bands/"</span><span class="p">,</span> <span class="n">views</span><span class="o">.</span><span class="n">band_listing</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">"band-list"</span><span class="p">),</span> <span class="n">path</span><span class="p">(</span><span class="s2">"bands/<int:band_id>/"</span><span class="p">,</span> <span class="n">views</span><span class="o">.</span><span class="n">band_detail</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">"band-detail"</span><span class="p">),</span> <span class="n">path</span><span class="p">(</span><span class="s2">"bands/search/"</span><span class="p">,</span> <span class="n">views</span><span class="o">.</span><span class="n">band_search</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">"band-search"</span><span class="p">),</span> <span class="p">]</span> </pre></div> <div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">bands.models</span><span class="w"> </span><span class="kn">import</span> <span class="n">Band</span> <span class="kn">from</span><span class="w"> </span><span class="nn">django.shortcuts</span><span class="w"> </span><span class="kn">import</span> <span class="n">render</span> <span class="k">def</span><span class="w"> </span><span class="nf">band_listing</span><span class="p">(</span><span class="n">request</span><span class="p">):</span> <span class="w"> </span><span class="sd">"""A view of all bands."""</span> <span class="n">bands</span> <span class="o">=</span> <span class="n">Band</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">all</span><span class="p">()</span> <span class="k">return</span> <span class="n">render</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="s2">"bands/band_listing.html"</span><span class="p">,</span> <span class="p">{</span><span class="s2">"bands"</span><span class="p">:</span> <span class="n">bands</span><span class="p">})</span> </pre></div> </div> </li> <li> <h2>Templates</h2> <div class="collapsing-content"> <p> Django’s template language is designed to strike a balance between power and ease. It’s designed to feel comfortable and easy-to-learn to those used to working with HTML, like designers and front-end developers. But it is also flexible and highly extensible, allowing developers to augment the template language as needed. </p> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/topics/templates/">Read more</a> <div class="highlight"><pre><span></span><span class="x"><html></span> <span class="x"> <head></span> <span class="x"> <title></span><span class="cp">{%</span> <span class="k">translate</span> <span class="s2">"Band Listing"</span> <span class="cp">%}</span><span class="x"></title></span> <span class="x"> </head></span> <span class="x"> <body></span> <span class="x"> <h1></span><span class="cp">{%</span> <span class="k">translate</span> <span class="s2">"All Bands"</span> <span class="cp">%}</span><span class="x"></h1></span> <span class="x"> <ul></span> <span class="x"> </span><span class="cp">{%</span> <span class="k">for</span> <span class="nv">band</span> <span class="k">in</span> <span class="nv">bands</span> <span class="cp">%}</span> <span class="x"> <li></span> <span class="x"> <h2><a href="</span><span class="cp">{{</span> <span class="nv">band.get_absolute_url</span> <span class="cp">}}</span><span class="x">"></span><span class="cp">{{</span> <span class="nv">band.name</span> <span class="cp">}}</span><span class="x"></a></h2></span> <span class="x"> </span><span class="cp">{%</span> <span class="k">if</span> <span class="nv">band.can_rock</span> <span class="cp">%}</span><span class="x"><p></span><span class="cp">{%</span> <span class="k">translate</span> <span class="s2">"This band can rock!"</span> <span class="cp">%}</span><span class="x"></p></span><span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span> <span class="x"> </li></span> <span class="x"> </span><span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span> <span class="x"> </ul></span> <span class="x"> </body></span> <span class="x"></html></span> </pre></div> </div> </li> <li> <h2>Forms</h2> <div class="collapsing-content"> <p> Django provides a powerful form library that handles rendering forms as HTML, validating user-submitted data, and converting that data to native Python types. Django also provides a way to generate forms from your existing models and use those forms to create and update data. </p> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/topics/forms/">Read more</a> <div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">django</span><span class="w"> </span><span class="kn">import</span> <span class="n">forms</span> <span class="k">class</span><span class="w"> </span><span class="nc">BandContactForm</span><span class="p">(</span><span class="n">forms</span><span class="o">.</span><span class="n">Form</span><span class="p">):</span> <span class="n">subject</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mi">100</span><span class="p">)</span> <span class="n">message</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">TextField</span><span class="p">()</span> <span class="n">sender</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">EmailField</span><span class="p">()</span> <span class="n">cc_myself</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">BooleanField</span><span class="p">(</span><span class="n">required</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> </pre></div> </div> </li> <li> <h2>Authentication</h2> <div class="collapsing-content"> <p> Django comes with a full-featured and secure authentication system. It handles user accounts, groups, permissions and cookie-based user sessions. This lets you easily build sites that allow users to create accounts and safely log in/out. </p> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/topics/auth/">Read more</a> <div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">django.contrib.auth.decorators</span><span class="w"> </span><span class="kn">import</span> <span class="n">login_required</span> <span class="kn">from</span><span class="w"> </span><span class="nn">django.shortcuts</span><span class="w"> </span><span class="kn">import</span> <span class="n">render</span> <span class="nd">@login_required</span> <span class="k">def</span><span class="w"> </span><span class="nf">my_protected_view</span><span class="p">(</span><span class="n">request</span><span class="p">):</span> <span class="w"> </span><span class="sd">"""A view that can only be accessed by logged-in users"""</span> <span class="k">return</span> <span class="n">render</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="s2">"protected.html"</span><span class="p">,</span> <span class="p">{</span><span class="s2">"current_user"</span><span class="p">:</span> <span class="n">request</span><span class="o">.</span><span class="n">user</span><span class="p">})</span> </pre></div> </div> </li> <li> <h2>Admin</h2> <div class="collapsing-content"> <p> One of the most powerful parts of Django is its automatic admin interface. It reads metadata in your models to provide a powerful and production-ready interface that content producers can immediately use to start managing content on your site. It’s easy to set up and provides many hooks for customization. </p> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/ref/contrib/admin/">Read more</a> <div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">bands.models</span><span class="w"> </span><span class="kn">import</span> <span class="n">Band</span><span class="p">,</span> <span class="n">Member</span> <span class="kn">from</span><span class="w"> </span><span class="nn">django.contrib</span><span class="w"> </span><span class="kn">import</span> <span class="n">admin</span> <span class="k">class</span><span class="w"> </span><span class="nc">MemberAdmin</span><span class="p">(</span><span class="n">admin</span><span class="o">.</span><span class="n">ModelAdmin</span><span class="p">):</span> <span class="w"> </span><span class="sd">"""Customize the look of the auto-generated admin for the Member model"""</span> <span class="n">list_display</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"name"</span><span class="p">,</span> <span class="s2">"instrument"</span><span class="p">)</span> <span class="n">list_filter</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"band"</span><span class="p">,)</span> <span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Band</span><span class="p">)</span> <span class="c1"># Use the default options</span> <span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Member</span><span class="p">,</span> <span class="n">MemberAdmin</span><span class="p">)</span> <span class="c1"># Use the customized options</span> </pre></div> </div> </li> <li> <h2>Internationalization</h2> <div class="collapsing-content"> <p> Django offers full support for translating text into different languages, plus locale-specific formatting of dates, times, numbers, and time zones. It lets developers and template authors specify which parts of their apps should be translated or formatted for local languages and cultures, and it uses these hooks to localize web applications for particular users according to their preferences. </p> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/topics/i18n/">Read more</a> <div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">django.shortcuts</span><span class="w"> </span><span class="kn">import</span> <span class="n">render</span> <span class="kn">from</span><span class="w"> </span><span class="nn">django.utils.translation</span><span class="w"> </span><span class="kn">import</span> <span class="n">gettext</span> <span class="k">def</span><span class="w"> </span><span class="nf">homepage</span><span class="p">(</span><span class="n">request</span><span class="p">):</span> <span class="w"> </span><span class="sd">"""</span> <span class="sd"> Shows the homepage with a welcome message that is translated in the</span> <span class="sd"> user's language.</span> <span class="sd"> """</span> <span class="n">message</span> <span class="o">=</span> <span class="n">gettext</span><span class="p">(</span><span class="s2">"Welcome to our site!"</span><span class="p">)</span> <span class="k">return</span> <span class="n">render</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="s2">"homepage.html"</span><span class="p">,</span> <span class="p">{</span><span class="s2">"message"</span><span class="p">:</span> <span class="n">message</span><span class="p">})</span> </pre></div> <div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">load</span> <span class="nv">i18n</span> <span class="cp">%}</span> <span class="x"><html></span> <span class="x"> <head></span> <span class="x"> <title></span><span class="cp">{%</span> <span class="k">translate</span> <span class="s2">"Homepage - Hall of Fame"</span> <span class="cp">%}</span><span class="x"></title></span> <span class="x"> </head></span> <span class="x"> <body></span> <span class="x"> </span><span class="c">{# Translated in the view: #}</span> <span class="x"> <h1></span><span class="cp">{{</span> <span class="nv">message</span> <span class="cp">}}</span><span class="x"></h1></span> <span class="x"> <p></span> <span class="x"> </span><span class="cp">{%</span> <span class="k">blocktranslate</span> <span class="nv">count</span> <span class="nv">member_count</span><span class="o">=</span><span class="nv">bands.count</span> <span class="cp">%}</span> <span class="x"> Here is the only band in the hall of fame:</span> <span class="x"> </span><span class="cp">{%</span> <span class="k">plural</span> <span class="cp">%}</span> <span class="x"> Here are all the </span><span class="cp">{{</span> <span class="nv">member_count</span> <span class="cp">}}</span><span class="x"> bands in the hall of fame:</span> <span class="x"> </span><span class="cp">{%</span> <span class="k">endblocktranslate</span> <span class="cp">%}</span> <span class="x"> </p></span> <span class="x"> <ul></span> <span class="x"> </span><span class="cp">{%</span> <span class="k">for</span> <span class="nv">band</span> <span class="k">in</span> <span class="nv">bands</span> <span class="cp">%}</span> <span class="x"> <li></span> <span class="x"> <h2><a href="</span><span class="cp">{{</span> <span class="nv">band.get_absolute_url</span> <span class="cp">}}</span><span class="x">"></span><span class="cp">{{</span> <span class="nv">band.name</span> <span class="cp">}}</span><span class="x"></a></h2></span> <span class="x"> </span><span class="cp">{%</span> <span class="k">if</span> <span class="nv">band.can_rock</span> <span class="cp">%}</span><span class="x"><p></span><span class="cp">{%</span> <span class="k">translate</span> <span class="s1">'This band can rock!'</span> <span class="cp">%}</span><span class="x"></p></span><span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span> <span class="x"> </li></span> <span class="x"> </span><span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span> <span class="x"> </ul></span> <span class="x"> </body></span> <span class="x"></html></span> </pre></div> </div> </li> <li> <h2>Security</h2> <div class="collapsing-content"> <p>Django provides multiple protections against:</p> <ul> <li>Clickjacking</li> <li>Cross-site scripting</li> <li>Cross Site Request Forgery (CSRF)</li> <li>SQL injection</li> <li>Remote code execution</li> </ul> <a class="link-readmore" href="https://docs.djangoproject.com/en/stable/topics/security/">Read more</a> </div> </li> </ul> <a href="#top" class="backtotop"><i class="icon icon-chevron-up"></i> Back to Top</a> </main> </div> <!-- SVGs --> <svg xmlns="http://www.w3.org/2000/svg"> <symbol viewBox="0 0 24 24" id="icon-auto"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2V4a8 8 0 1 0 0 16z"/></symbol> <symbol viewBox="0 0 24 24" id="icon-moon"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol> <symbol viewBox="0 0 24 24" id="icon-sun"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol> </svg> <!-- END SVGs --> <footer> <div class="subfooter"> <div class="container"> <h2 class="visuallyhidden">Django Links</h2> <div class="column-container"> <div class="col-learn-more"> <h3>Learn More</h3> <ul> <li><a href="https://www.djangoproject.com/start/overview/">About Django</a></li> <li><a href="https://www.djangoproject.com/start/">Getting Started with Django</a></li> <li><a href="https://docs.djangoproject.com/en/dev/internals/organization/">Team Organization</a></li> <li><a href="https://www.djangoproject.com/foundation/">Django Software Foundation</a></li> <li><a href="https://www.djangoproject.com/conduct/">Code of Conduct</a></li> <li><a href="https://www.djangoproject.com/diversity/">Diversity Statement</a></li> </ul> </div> <div class="col-get-involved"> <h3>Get Involved</h3> <ul> <li><a href="https://www.djangoproject.com/community/">Join a Group</a></li> <li><a href="https://docs.djangoproject.com/en/dev/internals/contributing/">Contribute to Django</a></li> <li><a href="https://docs.djangoproject.com/en/dev/internals/contributing/bugs-and-features/">Submit a Bug</a></li> <li><a href="https://docs.djangoproject.com/en/dev/internals/security/#reporting-security-issues">Report a Security Issue</a></li> <li><a href="https://www.djangoproject.com/foundation/individual-members/">Individual membership</a></li> </ul> </div> <div class="col-get-help"> <h3>Get Help</h3> <ul> <li><a href="https://docs.djangoproject.com/en/stable/faq/">Getting Help FAQ</a> </li> <li><a href="https://chat.djangoproject.com" target="_blank">Django Discord</a></li> <li><a href="https://forum.djangoproject.com/" target="_blank">Official Django Forum</a></li> </ul> </div> <div class="col-follow-us"> <h3>Follow Us</h3> <ul> <li><a href="https://github.com/django">GitHub</a></li> <li><a href="https://twitter.com/djangoproject">Twitter</a></li> <li><a href="https://fosstodon.org/@django" rel="me">Fediverse (Mastodon)</a></li> <li><a href="https://www.djangoproject.com/rss/weblog/">News RSS</a></li> </ul> </div> <div class="col-support-us"> <h3>Support Us</h3> <ul> <li><a href="https://www.djangoproject.com/fundraising/">Sponsor Django</a></li> <li><a href="/foundation/corporate-membership/">Corporate membership</a></li> <li><a href="https://django.threadless.com/" target="_blank">Official merchandise store</a></li> <li><a href="/foundation/donate/#benevity-giving">Benevity Workplace Giving Program</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <div class="container"> <div class="footer-logo"> <a class="logo" href="https://www.djangoproject.com/">Django</a> </div> <ul class="thanks"> <li> <span>Hosting by</span> <a class="in-kind-donors" href="https://www.djangoproject.com/fundraising/#in-kind-donors">In-kind donors</a> </li> <li class="design"><span>Design by</span> <a class="threespot" href="https://www.threespot.com">Threespot</a> <span class="ampersand">&</span> <a class="andrevv" href="http://andrevv.com/">andrevv</a></li> </ul> <p class="copyright">© 2005-2025 <a href="https://www.djangoproject.com/foundation/"> Django Software Foundation</a> and individual contributors. Django is a <a href="https://www.djangoproject.com/trademarks/">registered trademark</a> of the Django Software Foundation. </p> </div> </div> </footer> <script> function extless(input) { return input.replace(/(.*)\.[^.]+$/, '$1'); } var require = { shim: { 'jquery': [], 'jquery.flot': ["jquery"], 'stripe': { exports: 'Stripe' } }, paths: { "jquery": extless("https://static.djangoproject.com/js/lib/jquery.min.5790ead7ad3b.js"), "jquery.flot": extless("https://static.djangoproject.com/js/lib/jquery.flot.min.9964206e9d7f.js"), "mod/list-collapsing": extless("https://static.djangoproject.com/js/mod/list-collapsing.2d844151b2ec.js"), "mod/stripe-change-card": extless("https://static.djangoproject.com/js/mod/stripe-change-card.eaa0afc324e9.js"), "mod/switch-dark-mode": extless("https://static.djangoproject.com/js/mod/switch-dark-mode.bd4be131d69b.js"), "stripe-checkout": "https://checkout.stripe.com/checkout", "stripe": "https://js.stripe.com/v3/?" // ? needed due to require.js } }; </script> <script data-main="https://static.djangoproject.com/js/main.f422df460806.js" src="https://static.djangoproject.com/js/lib/require.177879fbe7dd.js"></script> <script src="https://static.djangoproject.com/js/djangoproject.f743688136c5.js"></script> </body> </html>