{"id":6370,"date":"2019-09-02T18:28:01","date_gmt":"2019-09-02T18:28:01","guid":{"rendered":"https:\/\/cheesecakelabs.com\/blog\/?p=6370\/"},"modified":"2022-07-01T17:14:58","modified_gmt":"2022-07-01T17:14:58","slug":"white-label-django-made-easy","status":"publish","type":"post","link":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/","title":{"rendered":"White label with Django made easy"},"content":{"rendered":"<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/cheesecakelabs.com\/blog\/blog\/django-framework-app-development\/\">Django Framework<\/a> has great out-of-the-box features that when used wisely can become powerful allies to create quick scalable solutions with less code. The Sites Framework is one of these great hidden gems, especially if you are trying to create a solution that handles multiple websites on the same application, such as White Label platforms.<\/span><\/p>\n<p><!--more--><\/p>\n<p><span style=\"font-weight: 400;\">In this tutorial I will show you how Django can make your life much easier for creating a white label using the sites framework. But first things first: what is a white label application?<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In short, it is a solution or product that can be customized by easily inserting a new brand and still make it look like it was tailor-made.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">During the tutorial, we will create a white label for an <\/span><span style=\"font-weight: 400;\">e-commerce website<\/span><span style=\"font-weight: 400;\">. The structure consists of <\/span><span style=\"font-weight: 400;\">multiple stores<\/span><span style=\"font-weight: 400;\">, each one with its own domain. All with the same code base.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you are already familiar with Django you can skip the &#8220;Setup the project&#8221; part of this tutorial. If not, I will show you how to create a basic structure, so you can test our new white label with it. Let\u2019s start it!<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Setup the project&nbsp;<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">First, let&#8217;s structure our project by creating a virtual environment and installing Django.<\/span><\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\"># Create the site folder\nmkdir -p white_label_tutorial\/src\/templates\ncd white_label_tutorial\/\n\n# Create and activate the virtual env\npython3 -m venv venv\nsource venv\/bin\/activate\n\n# Install django and create our app\ncd src\/\npip install django\ndjango-admin startproject app .\npython manage.py startapp store<\/code><\/pre>\n<p>Don&#8217;t forget to add our app and template directory to the app\/settings.py file.<\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\">\nINSTALLED_APPS = [\n    ...,\n    \"store\",\n]\n\nTEMPLATES = [\n    ...\n    \"DIRS\": [os.path.join(BASE_DIR, \"templates\")],\n    ...\n]\n<\/code><\/pre>\n<p><span style=\"font-weight: 400;\"><br \/>\nNow, let&#8217;s create our models. Inside<\/span><i><span style=\"font-weight: 400;\"> store\/models.py<\/span><\/i><span style=\"font-weight: 400;\"> add:<\/span><\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\">\nclass Store(models.Model):\n    name = models.CharField(max_length=255)\n\n    def __str__(self):\n        return self.name\n\nclass Product(models.Model):\n    store = models.ForeignKey(Store, on_delete=models.CASCADE)\n    title = models.CharField(max_length=255)\n    description = models.TextField(blank=True, null=True)\n\n    def __str__(self):\n        return self.title<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">Apply migrations<\/span><\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\">python manage.py makemigrations\npython manage.py migrate<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">&nbsp;and register our new models at <\/span><i><span style=\"font-weight: 400;\">store\/admin.py<\/span><\/i><\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\">from django.contrib import admin\nfrom .models import Store, Product\n\nadmin.site.register(Store)\nadmin.site.register(Product)<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">Great! To see our progress so far, create a super user<\/span><\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\">python manage.py createsuperuser<\/code><\/pre>\n<p>and start the development server.<\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\">python manage.py runserver<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">You can login with your new user and see our templates at the Django admin page:<\/span><\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\">http:\/\/localhost:8000\/admin<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">You can now create stores and products using the Django admin website.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now, let&#8217;s create a view, a template and the url to show the data outside Django admin. Change the following files:<\/span><\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\">from django.views.generic.list import ListView\nfrom .models import Product\n\n\nclass ProductListView(ListView):\n    model = Product\n    context_object_name = 'products'<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">app\/urls.py<\/span><\/p>\n<pre class=\"language-swift\"><code class=\"language-swift\">from store import views\n\nurlpatterns = [\n    \u2026,\n    path(\"\", views.ProductListView.as_view(), name=\"product-list\"),\n]<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">For brevity, we&#8217;re creating the whole document structure in this file and also used inline styles. Read more about template organization and hierarchy here:&nbsp; <\/span><a href=\"https:\/\/tutorial.djangogirls.org\/en\/template_extending\/\"><span style=\"font-weight: 400;\">https:\/\/tutorial.djangogirls.org\/en\/template_extending\/<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Create a new file in <\/span><i><span style=\"font-weight: 400;\">templates\/store\/product_list.html<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">templates\/store\/product_list.html<\/span><\/p>\n<pre class=\"language-html\"><code class=\"language-html\">\n&lt;!doctype html&gt;\n&lt;html lang=\"en\"&gt;\n  &lt;head&gt;\n\t&lt;meta charset=\"utf-8\"&gt;\n\t&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"&gt;\n\t&lt;link rel=\"stylesheet\" href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.3.1\/css\/bootstrap.min.css\" integrity=\"sha384-ggOyR0iXCbMQv3Xipma34MD+dH\/1fQ784\/j6cY\/iJTQUOhcWr7x9JvoRxT2MZw1T\" crossorigin=\"anonymous\"&gt;\n\n\t&lt;title&gt;White label - Ecommerce&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n\t&lt;div class=\"container\" style=\"display:flex; flex-wrap:wrap\"&gt;\n  \t{% for product in products %}\n    \t&lt;div class=\"card\" style=\"width:18rem; margin:10px\"&gt;\n          &lt;div class=\"card-body\"&gt;\n              &lt;h5 class=\"card-title\"&gt;{{ product.title }}&lt;\/h5&gt;\n              &lt;p class=\"card-text\"&gt;{{ product.description }}&lt;\/p&gt;\n              &lt;a href=\"#\" class=\"btn btn-primary\"&gt;Buy now&lt;\/a&gt;\n          &lt;\/div&gt;\n    \t&lt;\/div&gt;\n  \t{% endfor %}\n\t&lt;\/div&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">Run the server again with the runserver command if you have stopped it, and open<\/span><i><span style=\"font-weight: 400;\">&nbsp;localhost:8000\/<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\"><br \/>\nAll set! We already have what we need to add the Django sites framework to the project.<br \/>\n<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Adding Sites to the Project<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">To add the sites framework to the project, let&#8217;s change our <\/span><i><span style=\"font-weight: 400;\">app\/setting.py<\/span><\/i><span style=\"font-weight: 400;\"> file by changing INSTALLED_APPS.<\/span><\/p>\n<pre class=\"language-html\"><code class=\"language-html\">\nINSTALLED_APPS = [\n    ...,\n    \"django.contrib.sites\",\n    \"store\",\n]<\/code><\/pre>\n<p>Let&#8217;s add the relationship between website and Store model, so each store will have its own Site model.<\/p>\n<pre class=\"language-html\"><code class=\"language-html\">\nfrom django.contrib.sites.models import Site\nfrom django.db import models\n\n\nclass Store(models.Model):\n    name = models.CharField(max_length=255)\n    site = models.OneToOneField(Site, related_name=\"store\", on_delete=models.CASCADE, null=True)\n\n    def __str__(self):\n        return self.name\n<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">Then apply the migrations.<\/span><\/p>\n<pre class=\"language-html\"><code class=\"language-html\">\npython manage.py makemigrations\npython manage.py migrate\n<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">Now when we access admin we will see a new Site model.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">By running the migrations, Django already creates a first <\/span><i><span style=\"font-weight: 400;\">example.com<\/span><\/i><span style=\"font-weight: 400;\"> site, but we are still able to access our app through the old localhost address.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We will add a new middleware that will only allow registered sites to access our application.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Before that, change the site domain added by Django exemple.com to localhost.com, so our application will continue to work locally. Add a new site myecommerce.com&#8217; to be possible to test the application with a different domain, I will show how to test it locally. The new Site admin should look like this:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-6371\" src=\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-30-at-3.07.18-PM.png\" alt=\"Print Screen of a table with two columns (Domain Name and Display Name) and two rows (Localhost.com and myecommerce.com)\" width=\"1484\" height=\"186\" srcset=\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-30-at-3.07.18-PM.png 1484w, https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-30-at-3.07.18-PM-768x96.png 768w\" sizes=\"(max-width: 1484px) 100vw, 1484px\" \/>&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Add in <\/span><i><span style=\"font-weight: 400;\">app\/settings.py<\/span><\/i><span style=\"font-weight: 400;\"> the following middleware<\/span><\/p>\n<pre class=\"language-html\"><code class=\"language-html\">\nMIDDLEWARE = \u200b\u200b[\n    ...,\n    'django.contrib.sites.middleware.CurrentSiteMiddleware',\n]\n<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">This middleware adds in every request a new site attribute.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For everything to work we need to update the ALLOWED_HOSTS in app\/settings.py.&nbsp; For testing purpose you can use:<\/span><\/p>\n<pre class=\"language-html\"><code class=\"language-html\">\nALLOWED_HOSTS = ['*',]\n<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">It will accept requests from every host, but it is not a good practice.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We recommend using a lib to handle environment variables for you, so you don\u2019t need to change the settings file and just change the environment variable. <\/span><a href=\"https:\/\/django-environ.readthedocs.io\/en\/latest\/\"><span style=\"font-weight: 400;\">Read more about environment variables here<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To test our application with different domains let&#8217;s add a new record to the file etc\/hosts (for UNIX-like systems):<\/span><\/p>\n<pre class=\"language-html\"><code class=\"language-html\">\n127.0.0.1 myecommerce.com\n127.0.0.1 localhost.com\n<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">Now with the server running we will access the admin interface and link the site we created to our store.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can now access our site either through localhost.com or myecommerce.com.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We will change our template to show the name of the store that belongs to that site, so just above our div container in templates\/store\/product_list.html add the following code:<\/span><\/p>\n<pre class=\"language-html\"><code class=\"language-html\">&lt;div class=\"container\"&gt;\n   &lt;h1&gt;{{request.site.store}}&lt;\/h1&gt;\n&lt;\/div&gt;<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">Going to <\/span><span style=\"font-weight: 400;\">myecommerce.com:8000\/<\/span><span style=\"font-weight: 400;\"> you should see the store name linked to that site.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Finally we will show only the products for that store, so let&#8217;s overwrite the get_context_data method on the ProductListView class on store\/views.py file.<\/span><\/p>\n<pre class=\"language-html\"><code class=\"language-html\">\ndef get_context_data(self, **kwargs):\n    context = super().get_context_data(**kwargs)\n    context['products'] = Product.objects.filter(store__site=self.request.site)\n    return context\n<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">This way, every site accessed will only show products filtered for a store associated with the respective domain.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Quick and easy. We set up a white label application using Django&#8217;s own tools.<\/span><br \/>\n<span style=\"font-weight: 400;\">I hope you enjoyed this tutorial. The source code is on <\/span><a href=\"https:\/\/github.com\/matpfernandes\/white_label_tutorial\"><span style=\"font-weight: 400;\">GITHUB LINK<\/span><\/a><span style=\"font-weight: 400;\">, if you have questions or suggestions feel free to ping me on matheusfernandes@ckl.io <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Django Framework has great out-of-the-box features that when used wisely can become powerful allies to create quick scalable solutions with less code. The Sites Framework is one of these great hidden gems, especially if you are trying to create a solution that handles multiple websites on the same application, such as White Label platforms.<\/p>\n","protected":false},"author":65,"featured_media":6382,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[432],"tags":[350],"class_list":["post-6370","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineering","tag-tag-django"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>White label with Django made easy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"White label with Django made easy\" \/>\n<meta property=\"og:description\" content=\"Django Framework has great out-of-the-box features that when used wisely can become powerful allies to create quick scalable solutions with less code. The Sites Framework is one of these great hidden gems, especially if you are trying to create a solution that handles multiple websites on the same application, such as White Label platforms.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/\" \/>\n<meta property=\"og:site_name\" content=\"Cheesecake Labs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cheesecakelabs\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-02T18:28:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-01T17:14:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Cheesecake Labs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cheesecakelabs\" \/>\n<meta name=\"twitter:site\" content=\"@cheesecakelabs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/\"},\"author\":{\"name\":\"Matheus Fernandes\"},\"headline\":\"White label with Django made easy\",\"datePublished\":\"2019-09-02T18:28:01+00:00\",\"dateModified\":\"2022-07-01T17:14:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/\"},\"wordCount\":840,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png\",\"keywords\":[\"Django\"],\"articleSection\":[\"Engineering\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/\",\"url\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/\",\"name\":\"White label with Django made easy\",\"isPartOf\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png\",\"datePublished\":\"2019-09-02T18:28:01+00:00\",\"dateModified\":\"2022-07-01T17:14:58+00:00\",\"author\":{\"@type\":\"person\",\"name\":\"Matheus Fernandes\"},\"breadcrumb\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#primaryimage\",\"url\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png\",\"contentUrl\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png\",\"width\":2000,\"height\":720,\"caption\":\"A small screen with an arrow going from it to two other screens much bigger.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cheesecakelabs.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"White label with Django made easy\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/#website\",\"url\":\"https:\/\/cheesecakelabs.com\/blog\/\",\"name\":\"Cheesecake Labs\",\"description\":\"Nearshore outsourcing company for Web and Mobile design and engineering services, and staff augmentation for startups and enterprises..\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cheesecakelabs.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"name\":\"Matheus Fernandes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2017\/06\/matheus-300x300.jpg\",\"contentUrl\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2017\/06\/matheus-300x300.jpg\",\"caption\":\"Matheus Fernandes\"},\"description\":\"10 years of experience in Marketing and Sales in the Technology sector. My main purpose is help, support and structure efficient operations and also develop independent and multidisciplinary teams.\",\"url\":\"https:\/\/cheesecakelabs.com\/blog\/autor\/matheusfernandes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"White label with Django made easy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/","og_locale":"en_US","og_type":"article","og_title":"White label with Django made easy","og_description":"Django Framework has great out-of-the-box features that when used wisely can become powerful allies to create quick scalable solutions with less code. The Sites Framework is one of these great hidden gems, especially if you are trying to create a solution that handles multiple websites on the same application, such as White Label platforms.","og_url":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/","og_site_name":"Cheesecake Labs","article_publisher":"https:\/\/www.facebook.com\/cheesecakelabs","article_published_time":"2019-09-02T18:28:01+00:00","article_modified_time":"2022-07-01T17:14:58+00:00","og_image":[{"width":2000,"height":720,"url":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png","type":"image\/png"}],"author":"Cheesecake Labs","twitter_card":"summary_large_image","twitter_creator":"@cheesecakelabs","twitter_site":"@cheesecakelabs","twitter_misc":{"Written by":null,"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#article","isPartOf":{"@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/"},"author":{"name":"Matheus Fernandes"},"headline":"White label with Django made easy","datePublished":"2019-09-02T18:28:01+00:00","dateModified":"2022-07-01T17:14:58+00:00","mainEntityOfPage":{"@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/"},"wordCount":840,"commentCount":0,"image":{"@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#primaryimage"},"thumbnailUrl":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png","keywords":["Django"],"articleSection":["Engineering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/","url":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/","name":"White label with Django made easy","isPartOf":{"@id":"https:\/\/cheesecakelabs.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#primaryimage"},"image":{"@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#primaryimage"},"thumbnailUrl":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png","datePublished":"2019-09-02T18:28:01+00:00","dateModified":"2022-07-01T17:14:58+00:00","author":{"@type":"person","name":"Matheus Fernandes"},"breadcrumb":{"@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#primaryimage","url":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png","contentUrl":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2019\/09\/Django_White_Label-1.png","width":2000,"height":720,"caption":"A small screen with an arrow going from it to two other screens much bigger."},{"@type":"BreadcrumbList","@id":"https:\/\/cheesecakelabs.com\/blog\/white-label-django-made-easy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cheesecakelabs.com\/blog\/"},{"@type":"ListItem","position":2,"name":"White label with Django made easy"}]},{"@type":"WebSite","@id":"https:\/\/cheesecakelabs.com\/blog\/#website","url":"https:\/\/cheesecakelabs.com\/blog\/","name":"Cheesecake Labs","description":"Nearshore outsourcing company for Web and Mobile design and engineering services, and staff augmentation for startups and enterprises..","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cheesecakelabs.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","name":"Matheus Fernandes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cheesecakelabs.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2017\/06\/matheus-300x300.jpg","contentUrl":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2017\/06\/matheus-300x300.jpg","caption":"Matheus Fernandes"},"description":"10 years of experience in Marketing and Sales in the Technology sector. My main purpose is help, support and structure efficient operations and also develop independent and multidisciplinary teams.","url":"https:\/\/cheesecakelabs.com\/blog\/autor\/matheusfernandes\/"}]}},"_links":{"self":[{"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/posts\/6370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/comments?post=6370"}],"version-history":[{"count":1,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/posts\/6370\/revisions"}],"predecessor-version":[{"id":10198,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/posts\/6370\/revisions\/10198"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/media\/6382"}],"wp:attachment":[{"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/media?parent=6370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/categories?post=6370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/tags?post=6370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}