From 18b2fbfb06d0848b51b047a10cf10839853c3cf9 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 15 Nov 2020 16:08:22 -0500 Subject: added site build var to pages app --- app/builder/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/builder/base.py') diff --git a/app/builder/base.py b/app/builder/base.py index fabea6e..04a92ce 100644 --- a/app/builder/base.py +++ b/app/builder/base.py @@ -1,6 +1,7 @@ import os from math import ceil from decimal import Decimal +from django.contrib.sites.models import Site from django.test.client import Client from django.template.loader import render_to_string from django.template import Context @@ -33,7 +34,9 @@ class _FileWriter(object): class BuildNew(): - def __init__(self, model, app): + + def __init__(self, model, app, site=1): + self.site = Site.objects.get(domain=site) self.model = apps.get_model(model, app) self.get_model_queryset() self.client = Client() -- cgit v1.2.3-70-g09d2