CINXE.COM

DjangoTricks

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta name="description" content="Learn tips and tricks about web development with Django daily" /> <meta name="author" content="Aidas Bendoraitis" /> <meta name="robots" content="noindex, nofollow" /> <title>DjangoTricks</title> <link rel="apple-touch-icon-precomposed" sizes="57x57" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/apple-touch-icon-57x57.png" /> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/apple-touch-icon-114x114.png" /> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/apple-touch-icon-72x72.png" /> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/apple-touch-icon-144x144.png" /> <link rel="apple-touch-icon-precomposed" sizes="60x60" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/apple-touch-icon-60x60.png" /> <link rel="apple-touch-icon-precomposed" sizes="120x120" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/apple-touch-icon-120x120.png" /> <link rel="apple-touch-icon-precomposed" sizes="76x76" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/apple-touch-icon-76x76.png" /> <link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/apple-touch-icon-152x152.png" /> <link rel="icon" type="image/png" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/favicon-196x196.png" sizes="196x196" /> <link rel="icon" type="image/png" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/favicon-96x96.png" sizes="96x96" /> <link rel="icon" type="image/png" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/favicon-32x32.png" sizes="32x32" /> <link rel="icon" type="image/png" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/favicon-16x16.png" sizes="16x16" /> <link rel="icon" type="image/png" href="https://www.djangotricks.com/static/20250206011431/site/img/favicon/favicon-128.png" sizes="128x128" /> <meta name="application-name" content="&nbsp;"/> <meta name="msapplication-TileColor" content="#FFFFFF" /> <meta name="msapplication-TileImage" content="https://www.djangotricks.com/static/20250206011431/site/img/favicon/mstile-144x144.png" /> <meta name="msapplication-square70x70logo" content="https://www.djangotricks.com/static/20250206011431/site/img/favicon/mstile-70x70.png" /> <meta name="msapplication-square150x150logo" content="https://www.djangotricks.com/static/20250206011431/site/img/favicon/mstile-150x150.png" /> <meta name="msapplication-wide310x150logo" content="https://www.djangotricks.com/static/20250206011431/site/img/favicon/mstile-310x150.png" /> <meta name="msapplication-square310x310logo" content="https://www.djangotricks.com/static/20250206011431/site/img/favicon/mstile-310x310.png" /> <!-- Bootstrap core CSS --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous" /> <!-- Custom fonts for this template --> <link href="https://fonts.googleapis.com/css?family=Montserrat:900|Open+Sans:400,400i,700&display=swap&subset=latin-ext" rel="stylesheet" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" /> <link rel="canonical" href="https://www.djangotricks.com/cookies/" /> <!-- Custom styles for this template --> <link href="https://www.djangotricks.com/static/20250206011431/gdpr-cookie-consent/css/gdpr-cookie-consent.css" rel="stylesheet" /> <link href="https://www.djangotricks.com/static/20250206011431/site/css/style.css" rel="stylesheet" /> <meta property="og:type" content="website" /> <meta property="og:url" content="" /> <meta property="og:title" content="DjangoTricks" /> <meta property="og:image" content="https://www.djangotricks.com/static/20250206011431/site/img/og.jpg" /> <meta property="og:description" content="" /> <meta property="og:site_name" content="DjangoTricks" /> <meta property="og:locale" content="en_US" /> <!-- Next tags are optional but recommended --> <meta property="og:image:width" content="1200" /> <meta property="og:image:height" content="630" /> <meta name="twitter:card" content="summary"> <meta name="twitter:site" content="@DjangoTricks"> <meta name="twitter:creator" content="@archatas"> <meta name="twitter:url" content=""> <meta name="twitter:title" content="DjangoTricks"> <meta name="twitter:description" content=""> <meta name="twitter:image" content="https://www.djangotricks.com/static/20250206011431/startpage/img/og.jpg"> <meta name="google-site-verification" content="wivh3D0M666toapyJg17LpSiVMCgHNSAsxSkJVVlBjk" /> </head> <body class="bg-light"> <div class="container"> <div class="row"> <div class="col col-fixed"> <nav class="navbar navbar-expand-lg navbar-light bg-light px-0 mx-3"> <a class="navbar-brand" href="/">DjangoTricks</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav mr-auto d-flex justify-content-around w-75"> <li class="nav-item"> <a class="nav-link" href="/tricks/">Tricks</a> </li> <li class="nav-item"> <a class="nav-link" href="/blog/">Blog</a> </li> <li class="nav-item"> <a class="nav-link" href="/goodies/">Goodies</a> </li> <li class="nav-item"> <a class="nav-link" href="/social/">Social</a> </li> <li class="nav-item"> <a class="nav-link" href="https://paypal.me/aidasbendoraitis" target="_blank">Donate</a> </li> <li class="nav-item"> <a class="nav-link active" href="/cookies/" rel="nofollow">Manage Cookies</a> </li> </ul> <a class="btn btn-primary float-right text-nowrap" href="/random/">Random trick ➔</a> </div> </nav> </div> </div> </div> <div role="main"> <div class="container"> <div class="col-fixed"> <div class="card my-4 p-5 shadow rounded bg-white"> <div class="cc-stack"> <h1>Cookies</h1> <p>We use cookies and other tracking technologies to improve your browsing experience on our site, show personalized content and targeted ads, analyze site traffic, and understand where our audiences come from.</p> <p>Please check which cookies you accept or reject and save your preferences.</p> <form id="cc_preferences_form" class="cc-stack" action="/cookies/" method="post"> <input type="hidden" name="csrfmiddlewaretoken" value="Hf32CYKaMdL3AT9RvtlqkEzRyxoax1maTTr8WYYIem34I6z9iZ80AVMzsaHfhMsq"> <header class="cc-header"> <h2>Manage Cookies</h2> </header> <div class="cc-buttons"> <button id="cc_accept_all" class="cc-button btn btn-light m-1" type="button">Accept all</button> <button id="cc_reject_all" class="cc-button btn btn-light m-1" type="button">Reject all</button> </div> <section class="cc-section"> <header class="cc-header"> <h3>Essential Cookies</h3> <label class="cc-switch" id="cc_switch_essential" for="cc_section_essential"> <input id="cc_section_essential" name="sections" value="essential" class="cc_section_checkbox" data-section="essential" type="checkbox" checked="checked" disabled="disabled" aria-checked="false"> <span class="cc-slider"></span> </label> </header> <p>These cookies are always on, as they’re essential for making this website work, and making it safe. Without these cookies, services you’ve asked for can’t be provided.</p> <details> <summary aria-describedby="cc_providers_in_essential" aria-label="Show cookie providers for Essential Cookies">Show cookie providers</summary> <article id="cc_providers_in_essential"> <ul class=""> <li class="">This website</li> </ul> <p><a href="/cookies/#section_essential" class="" aria-label="Learn more about Essential Cookies">Learn more</a></p> </article> </details> </section> <section class="cc-section"> <header class="cc-header"> <h3>Functionality Cookies</h3> <label class="cc-switch" id="cc_switch_functionality" for="cc_section_functionality"> <input id="cc_section_functionality" name="sections" value="functionality" class="cc_section_checkbox" data-section="functionality" type="checkbox" aria-checked="false"> <span class="cc-slider"></span> </label> </header> <p>These cookies help us provide enhanced functionality and personalisation, and remember your settings. They may be set by us or by third party providers.</p> <details> <summary aria-describedby="cc_providers_in_functionality" aria-label="Show cookie providers for Functionality Cookies">Show cookie providers</summary> <article id="cc_providers_in_functionality"> <ul class=""> <li class="">Disqus</li> <li class="">Mailchimp</li> <li class="">Gumroad</li> </ul> <p><a href="/cookies/#section_functionality" class="" aria-label="Learn more about Functionality Cookies">Learn more</a></p> </article> </details> </section> <section class="cc-section"> <header class="cc-header"> <h3>Performance Cookies</h3> <label class="cc-switch" id="cc_switch_performance" for="cc_section_performance"> <input id="cc_section_performance" name="sections" value="performance" class="cc_section_checkbox" data-section="performance" type="checkbox" aria-checked="false"> <span class="cc-slider"></span> </label> </header> <p>These cookies help us analyse how many people are using this website, where they come from and how they're using it. If you opt out of these cookies, we can’t get feedback to make this website better for you and all our users.</p> <details> <summary aria-describedby="cc_providers_in_performance" aria-label="Show cookie providers for Performance Cookies">Show cookie providers</summary> <article id="cc_providers_in_performance"> <ul class=""> <li class="">Google Analytics</li> </ul> <p><a href="/cookies/#section_performance" class="" aria-label="Learn more about Performance Cookies">Learn more</a></p> </article> </details> </section> <section class="cc-section"> <header class="cc-header"> <h3>Marketing Cookies</h3> <label class="cc-switch" id="cc_switch_marketing" for="cc_section_marketing"> <input id="cc_section_marketing" name="sections" value="marketing" class="cc_section_checkbox" data-section="marketing" type="checkbox" aria-checked="false"> <span class="cc-slider"></span> </label> </header> <p>These cookies are set by our advertising partners to track your activity and show you relevant ads on other sites as you browse the internet.</p> <details> <summary aria-describedby="cc_providers_in_marketing" aria-label="Show cookie providers for Marketing Cookies">Show cookie providers</summary> <article id="cc_providers_in_marketing"> <ul class=""> <li class="">Twitter</li> </ul> <p><a href="/cookies/#section_marketing" class="" aria-label="Learn more about Marketing Cookies">Learn more</a></p> </article> </details> </section> <div class="cc-buttons"> <button id="cc_save_preferences" class="cc-button btn btn-primary m-1" type="submit">Save preferences</button> </div> </form> <section class="cc-section"> <a class="cc-section-anchor " id="section_essential">⚓️</a> <header class="cc-header"> <h2>Essential Cookies</h2> </header> <p>These cookies are always on, as they’re essential for making this website work, and making it safe. Without these cookies, services you’ve asked for can’t be provided.</p> <table class="cc-table"> <thead> <tr> <th>COOKIE NAME</th> <th>DURATION</th> </tr> </thead> <tbody> <tr> <td colspan="2"><strong>This website</strong> </td> </tr> <tr> <td>sessionid <p>Session ID used to authenticate you and give permissions to use the site.</p> </td> <td>2 Weeks</td> </tr> <tr> <td>csrftoken <p>Security token used to ensure that no hackers are posting forms on your behalf.</p> </td> <td>Session</td> </tr> <tr> <td>cookie_consent <p>Settings of Cookie Consent preferences.</p> </td> <td>6 Years</td> </tr> </tbody> </table> </section> <section class="cc-section"> <a class="cc-section-anchor " id="section_functionality">⚓️</a> <header class="cc-header"> <h2>Functionality Cookies</h2> </header> <p>These cookies help us provide enhanced functionality and personalisation, and remember your settings. They may be set by us or by third party providers.</p> <table class="cc-table"> <thead> <tr> <th>COOKIE NAME</th> <th>DURATION</th> </tr> </thead> <tbody> <tr> <td colspan="2"><strong>Disqus</strong> <p>Disqus provides comments functionality for DjangoTricks.com.</p> </td> </tr> <tr> <td>disqus_unique </td> <td>1 Year</td> </tr> <tr> <td>__jid </td> <td>30 Minutes</td> </tr> <tr> <td>intercom-session-* </td> <td>7 Days</td> </tr> <tr> <td>intercom-id-* </td> <td>10 Months</td> </tr> <tr> <td>_gid </td> <td>1 Day</td> </tr> <tr> <td>_ga </td> <td>2 Years</td> </tr> <tr> <td colspan="2"><strong>Mailchimp</strong> <p>Mailchimp displays a modal dialog to subscribe to the newsletter.</p> </td> </tr> <tr> <td>bm_sz </td> <td>1 Hour</td> </tr> <tr> <td>_abck </td> <td>1 Year</td> </tr> <tr> <td>ak_bmsc </td> <td>1 Year</td> </tr> <tr> <td>MCPopupClosed </td> <td>1 Year</td> </tr> <tr> <td colspan="2"><strong>Gumroad</strong> <p>Gumroad alows us to sell digital products to you.</p> </td> </tr> <tr> <td>_gumroad_guid </td> <td>10 Years</td> </tr> <tr> <td>ahoy_visitor </td> <td>2 Years</td> </tr> <tr> <td>_ga_* </td> <td>2 Years</td> </tr> <tr> <td>__stripe_mid </td> <td>1 Year</td> </tr> <tr> <td>_gid </td> <td>1 Day</td> </tr> <tr> <td>_gumroad_app_session </td> <td>10 Years</td> </tr> <tr> <td>confirmed_redirect </td> <td>Session</td> </tr> <tr> <td>gumroad-bundle </td> <td>Session</td> </tr> <tr> <td>last_viewed_dashboard </td> <td>Session</td> </tr> <tr> <td>_gumroad_guid </td> <td>10 Years</td> </tr> </tbody> </table> </section> <section class="cc-section"> <a class="cc-section-anchor " id="section_performance">⚓️</a> <header class="cc-header"> <h2>Performance Cookies</h2> </header> <p>These cookies help us analyse how many people are using this website, where they come from and how they're using it. If you opt out of these cookies, we can’t get feedback to make this website better for you and all our users.</p> <table class="cc-table"> <thead> <tr> <th>COOKIE NAME</th> <th>DURATION</th> </tr> </thead> <tbody> <tr> <td colspan="2"><strong>Google Analytics</strong> <p>Google Analytics is used to track website usage statistics.</p> </td> </tr> <tr> <td>_ga <p>Used to distinguish users.</p> </td> <td>2 Years</td> </tr> <tr> <td>_gid <p>Used to distinguish users.</p> </td> <td>24 Hours</td> </tr> <tr> <td>_ga_* <p>Used to persist session state.</p> </td> <td>2 Years</td> </tr> <tr> <td>_gac_gb_* <p>Contains campaign related information. If you have linked your Google Analytics and Google Ads accounts, Google Ads website conversion tags will read this cookie unless you opt-out.</p> </td> <td>90 Days</td> </tr> <tr> <td>_gat_gtag_UA_* <p>Stores unique user ID.</p> </td> <td>1 Minute</td> </tr> </tbody> </table> </section> <section class="cc-section"> <a class="cc-section-anchor " id="section_marketing">⚓️</a> <header class="cc-header"> <h2>Marketing Cookies</h2> </header> <p>These cookies are set by our advertising partners to track your activity and show you relevant ads on other sites as you browse the internet.</p> <table class="cc-table"> <thead> <tr> <th>COOKIE NAME</th> <th>DURATION</th> </tr> </thead> <tbody> <tr> <td colspan="2"><strong>Twitter</strong> <p>Twitter conversion tracking enables us to measure the return on ad spend by tracking the actions people take after viewing or engaging with our ads on Twitter.</p> </td> </tr> <tr> <td>guest_id </td> <td>2 Years</td> </tr> <tr> <td>ct0 </td> <td>3.5 Hours</td> </tr> <tr> <td>personalization_id </td> <td>2 Years</td> </tr> </tbody> </table> </section> <section> <header class="cc-header"> <h2>How to Manage Cookies in the Browser</h2> </header> <p>You can also control cookie usage in your browser:</p> <ul> <li><a href="https://support.google.com/chrome/answer/95647">Chrome</a></li> <li><a href="https://support.mozilla.org/en-US/kb/enhanced-tracking-protection-firefox-desktop">Firefox</a></li> <li><a href="https://support.apple.com/en-ie/guide/safari/sfri11471/mac">Safari</a></li> <li><a href="https://blogs.opera.com/news/2015/08/how-to-manage-cookies-in-opera/">Opera</a></li> <li><a href="https://support.microsoft.com/en-us/microsoft-edge/delete-cookies-in-microsoft-edge-63947406-40ac-c3b8-57b9-2a946a29ae09">Microsoft Edge</a></li> </ul> </section> <section> <header class="cc-header"> <h2>Cookie Consent Management for Your Django Websites?</h2> </header> <p>Did you like this way of managing Cookie Consent and would like to integrate it into your website?</p> <p> <a class="gumroad-button" href="https://gumroad.com/l/AxebP">Buy Django GDPR Cookie Consent app</a> </p> </section> </div> </div> </div> </div> </div> <!-- Bootstrap core JavaScript --> <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> <script src="https://www.djangotricks.com/static/20250206011431/site/js/main.js" defer></script> <script id="cc_script" data-modal-dialog-url="/cookies/modal-dialog/" src="https://www.djangotricks.com/static/20250206011431/gdpr-cookie-consent/js/gdpr-cookie-consent.min.js" nonce="6A2iTPe9ImFaHRax91bxrQ=="></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10