Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Error: TypeError: 'coroutine' object is not subscriptable
Code: total_deposit = transaction.filter(type='deposit').aaggregate(total=Sum('amount'))['total'] or 0 total_transfer = transaction.filter(type='transfer').aaggregate(total=Sum('amount'))['total'] or 0 Error: total_deposit = transaction.filter(type='deposit').aaggregate(total=Sum('amount'))['total'] or 0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ How do i fix this?? -
Django email not sending — no error, but messages don’t arrive (using Gmail SMTP)
I’m trying to send emails from my Django project using Gmail’s SMTP server. The server runs without any errors, and my code executes successfully, but the emails never reach the recipient — not even in the spam folder. I’ve enabled 2-Step Verification on my Gmail account and generated an App Password specifically for this project, but it still doesn’t work. I want to understand why Django thinks the email was sent but it never actually arrives. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 465 EMAIL_USE_SSL = True EMAIL_HOST_USER = 'mygmail@gmail.com' EMAIL_HOST_PASSWORD = 'my-16-digit-app-password' DEFAULT_FROM_EMAIL = EMAIL_HOST_USER i the Expected result was Recipient receives the email. but the actual result is Email never arrives, and no errors are raised. -
django getting 530, 5.7.0 Authentication Required despite using google's App Paswords
Have 2fa on Google, created the password, putting in the correct email and app password in the settings.py, yet still get Authentication Error. Tried both 587(TLS=True) and 465(SSL=True) but didn't seem to change anything. settings.py: EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 465 EMAIL_USE_TLS = False EMAIL_USE_SSL = True EMAIL_HOST_USER = 'mygmail@gmail.com' EMAIL_PASSWORD = "my16digitpassword" DEFAULT_FROM_EMAIL = 'mygmail@gmail.com' What might be the problem/solution? Any answers for this problem feature "use google app password". -
How can I properly implement ManifestStaticFilesStorage in Django?
I'm attempting to implement ManifestStaticFilesStorage in my Django project. From what I've seen, this should be simple, but it's not behaving in the way I expect. Firstly, I have DEBUG=os.getenv("DEBUG", "False").lower() == "true" In my settings.py file, with DEBUG in my .env file set to "False". Next, I have the following settings for my static files: STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' MAX_DOCUMENT_FILE_SIZE_MB = 50 STATIC_URL = '/static/' if LOCAL: # LOCAL is False here STATIC_ROOT = os.path.join(BASE_DIR, 'static_collected') else: STATIC_ROOT = os.getenv('STATIC_ROOT') Finally, for my own sanity, I have some print statements at the end of my settings file that output when I run collectstatic, which output: STATICFILES_STORAGE: django.contrib.staticfiles.storage.ManifestStaticFilesStorage STATIC_ROOT: /var/www/html/static STATIC_URL: /static/ I have an nginx server set to serve static files at the above STATIC_ROOT. Finally, in my project's venv, I run python manage.py collectstatic And it copies the files successfully to the output directory I specified. The nginx server correctly serves them. However, after all this, the filenames remain their basic iterations, rather than including a hash as I expect. I'm using Django's {% static %} template in all my template HTML files. I've tried deleting the entire static folder and re-running collectstatic, but it outputs the same thing … -
How to aggregate a group by queryset in django?
I'm working with time series data which are represented using this model: class Price: timestamp = models.IntegerField() price = models.FloatField() Assuming timestamp has 1 min interval data, this is how I would resample it to 1 hr: queryset = ( Price.objects.annotate(timestamp_agg=Floor(F('timestamp') / 3600)) .values('timestamp_agg') .annotate( timestamp=Min('timestamp'), high=Max('price'), ) .values('timestamp', 'high') .order_by('timestamp') ) which runs the following sql under the hood: select min(timestamp) timestamp, max(price) high from core_price group by floor((timestamp / 3600)) order by timestamp Now I want to calculate a 4 hr moving average, usually calculated in the following way: select *, avg(high) over (order by timestamp rows between 4 preceding and current row) ma from (select min(timestamp) timestamp, max(price) high from core_price group by floor((timestamp / 3600)) order by timestamp) or Window(expression=Avg('price'), frame=RowRange(start=-4, end=0)) How to apply the window aggregation above to the first query? Obviously I can't do something like this since the first query is already an aggregation: >>> queryset.annotate(ma=Window(expression=Avg('high'), frame=RowRange(start=-4, end=0))) django.core.exceptions.FieldError: Cannot compute Avg('high'): 'high' is an aggregate -
How to search by multiple fields on django_opensearch_dsl
I have an opensearch server in which I want to search items and apply some filters to the search: search = Item.search().query("match", name="test") I need to search items by multiple filters, like name, date, location, etc. For this I will need some other kind of queries like "range" or "terms". Now the issue is I've trying using opensearch-dsl package like this: search_1 = ESQ("match", name="test") search_2 = ESQ("terms", name="location") search_3 = ESQ("range", name="date") filters = [search_1, search_2, search_3] query = ESQ("bool", should=filters) search = FreezerItemDocument.search().query(query) This is not working, constantly returning errors like: {"error":"unhashable type: 'Bool'"} Event if I try to run the query individually like this: query = ESQ("match", name="test") search = FreezerItemDocument.search().query(query) How can I do a search by multiple fields? -
Why does pytest fail to resolve Related model references in a Django package?
I have an installable Django package that I have built and was starting to write tests for it. I am using pytest-django. However, when I run the tests, almost all the tests fail and I keep getting this error:- request = <SubRequest 'django_db_setup' for <Function test_filter_with_full_name>>, django_test_environment = None django_db_blocker = <pytest_django.plugin.DjangoDbBlocker object at 0x10072ba40>, django_db_use_migrations = False, django_db_keepdb = True django_db_createdb = False, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) .venv/lib/python3.12/site-packages/pytest_django/fixtures.py:198: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ … -
How to integrate OpenAI GPT API in Django REST Framework project?
I’m building a Django REST Framework (DRF) project and I want to integrate OpenAI GPT API to provide AI-powered responses to users. I’ve tried setting up the API call using Python’s requests library and also with the official openai Python package, but I’m running into issues with authentication and response handling. Here’s my current code snippet: import openai openai.api_key = "YOUR_API_KEY" response = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello, can you help me with Django?"} ] ) print(response['choices'][0]['message']['content']) Problem: Sometimes I get an authentication error: "Invalid API key" Other times the API call works but I’m not sure how to integrate it properly into a DRF view so that it returns a JSON response to the frontend. What I want: A clear way to call OpenAI GPT from a Django REST API endpoint Return the GPT response in JSON format to a React frontend What I’ve tried: Adding API key in .env and using os.environ Testing with curl — works sometimes Wrapping the call inside a DRF APIView — but facing serialization issues Any advice or working example would be highly appreciated 🙏 I tried calling the OpenAI GPT API inside … -
Django runserver returns ERR_CONNECTION_RESET on Windows 11 (no errors in terminal)
I’m learning Django and trying to run my project locally on Windows 11. When I start the server, it runs without any errors, but when I try to open it in my browser (127.0.0.1:8000 or 127.0.0.1:8001), I get this message: Hmmm… can’t reach this page ERR_CONNECTION_RESET What I’ve Tried Running python manage.py runserver 0.0.0.0:8001 Running from both PowerShell and Command Prompt Confirmed I’m using a virtual environment (venv) inside my project folder Checked that my firewall allows Python Reinstalled Django and Python Verified no errors show in the terminal Terminal output: Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). Django version 5.2.5, using settings 'StudentERP.settings' Starting development server at http://0.0.0.0:8001/ Quit the server with CTRL-BREAK. WARNING: This is a development server. Do not use it in a production setting. [27/Aug/2025 14:57:56,986] - Broken pipe from ('127.0.0.1', 23878) [27/Aug/2025 14:57:57,167] - Broken pipe from ('127.0.0.1', 23879) What I Expected I expected to see Django’s default “Congratulations!” page at http://127.0.0.1:8001/. My Setup Windows 11 Home, Version 23H2 (Build 22631) Python 3.11.9 (64-bit) installed from python.org Django 5.2.5 Running inside VS Code PowerShell terminal Personal laptop (not managed by any organization) Question Why am I … -
How to authenticate requests with django allauth (headless)
I am always getting a 401 response after login to django-allauth on session (and other endpoints). See example code: def login(email, password): response = requests.post( f'{baseurl}/api/allauth/app/v1/auth/login', headers={ 'accept': 'application/json', 'Content-Type': 'application/json', }, json={ 'password': password, 'email': email } ) return response def get_session(session_token): response = requests.get( f'{baseurl}/api/allauth/app/v1/auth/session', headers={ 'accept': 'application/json', 'Content-Type': 'application/json', 'X-Session-Token': session_token, } ) return response login_response = login(email, password) print(f"Status Code: {login_response.status_code}") #print(f"Response: {json.dumps(login_response.json(), indent=2)}") session_token = login_response.json()["meta"]["session_token"] print("Session_token=",session_token) session_response = get_session(session_token) print(f"Status Code: {session_response.status_code}") print(f"Response: {json.dumps(session_response.json(), indent=2)}") Here is the output I am getting: Status Code: 200 Session_token= 165aj7jqqq165drt6nbg8wo5dcf9ncch Status Code: 401 Response: { "status": 401, "data": { "flows": [ { "id": "login" }, { "id": "signup" }, { "id": "password_reset_by_code", "is_pending": false } ] }, "meta": { "is_authenticated": false } } So login works fine, but then calling other allauth headless endpoints always lead to 401 response. Calling other DRF endpoints protected by permission_classes = [permissions.IsAuthenticated] works just fine too. Here are my important settings... INSTALLED_APPS = [ ... "allauth", "allauth.account", "allauth.headless", #'allauth.socialaccount', # "allauth.mfa", "allauth.usersessions", "oauth2_provider", ... "rest_framework", ... ] AUTHENTICATION_BACKENDS = ( # Django "django.contrib.auth.backends.ModelBackend", # allauth "allauth.account.auth_backends.AuthenticationBackend", # oauth2 "oauth2_provider.backends.OAuth2Backend", ) REST_FRAMEWORK = { "DEFAULT_AUTHENTICATION_CLASSES": ( "allauth.headless.contrib.rest_framework.authentication.XSessionTokenAuthentication", "oauth2_provider.contrib.rest_framework.OAuth2Authentication", # oauth2 "rest_framework.authentication.SessionAuthentication", "rest_framework.authentication.BasicAuthentication", … -
Highlight affected lung regions in chest X-rays using Python, Django, and CNN in a web-based pneumonia detection app
Our team is building a web-based pneumonia detection system using Python, Django, and a CNN. The model classifies chest X-rays as pneumonia or normal, but we now want to highlight affected lung regions for healthcare workers. Challenges: Generating heatmaps/saliency maps (e.g., Grad-CAM). Efficiently preprocessing images in Django. Integrating predictions + highlights into the frontend. Handling low-quality/noisy images. Keeping the pipeline fast, maintainable, and user-friendly. How can we structure the end-to-end pipeline to show interpretable visualizations alongside predictions? Any best practices, libraries, or design patterns for CNN-based pneumonia detection apps that highlight affected areas in real-time? We have successfully trained a CNN model that classifies pneumonia with good accuracy and integrated basic image uploads in Django. We tried generating simple Grad-CAM heatmaps in Python, but we’re unsure how to connect these visualizations efficiently to Django views while handling real-time predictions. We expect a seamless workflow where users can upload X-rays and see both classification and highlighted areas immediately, but current attempts are slow or messy. -
Usage of Django
I know this question will sound silly but how exactly is django used in production servers, like is it used mostly with rest_framework for creating APIs or is it just used as a full-stack framework with template rendering. Asking because templates in prod seems not right. Want to know the general case of usage of Django -
Why does my Django model’s save() method run twice when creating an object in the admin panel?
I have a Django model with a custom save() method: class MyModel(models.Model): name = models.CharField(max_length=100) def save(self, *args, **kwargs): print('Saving...') super().save(*args, **kwargs) When I create a new object through the Django admin, I see "Saving..." printed twice in the console. -
How to configure an enterprise Django project with type safety, AI agents, and built-in support system?
I’m working on a large-scale Django project for enterprise use and facing challenges related to: Reliable type safety for settings and configuration (preferably using Pydantic) Combining core business features (user management, support/ticketing, CRM, reporting, and AI agents) without manually integrating and customizing a dozen third-party apps Fast production setup, including multi-database, Docker deployment, automated client generation, and background tasks With the traditional settings.py approach, keeping everything maintainable and scalable is tough—lots of boilerplate, validation issues, and manual integration steps that slow down development. Are there any open-source Django frameworks or libraries that provide these features out-of-the-box, with type safety and ready integration for enterprise-scale deployment? I recently started developing django-cfg (docs), which aims to address these exact pain points by providing Pydantic-based configuration, built-in enterprise apps, and automated tooling. I’m interested in community feedback, suggestions for best practices, or alternative solutions that others have used for similar requirements. -
VS Code Multi line Selection problem in version code_1.104.3-1759409451_amd64
how do i resolve this error in VS code_1.104.3-1759409451_amd64 , when you click down mouse to select a line of code, or block of code, its like it select s each of the character and turns the whole ide gibberish you cant even see what you selected, i have disabled Column Select Mode Clicking and dragging to select text or code causes severe visual corruption, making the entire interface flicker and the selection impossible to see. -
How to handle simultaneous data from multiple ESP32 devices without mixing data in Django + DRF?
I’m working on my thesis and building a Django web application that receives height, weight, and temperature data from multiple ESP32 devices. Each ESP32 has a unique device_id and sends all three measurements to my Django backend using Django REST Framework (via HTTP POST with JSON). The issue happens when two ESP32 devices send data at the same time. The backend sometimes mixes their data, with measurements from one device overwriting or merging with another’s entry in the cache. Question: What’s the best way to handle simultaneous data submissions from multiple devices in Django + DRF, ensuring each device’s data stays separate and accurate? i tried to make the web app scan available devices or online esp32 devices, now the problem is whenever the esp32 sends data saying that it is available, it stack showing multiple devices in the selection. -
Query Django Users by get_username method
I am trying to get the Django User object with a specific username. The obvious way to do it is like this: from django.contrib.auth.models import User bob = User.objects.get(username="Bob") But I noticed that User objects have a get_username() method which states that you should use this method instead of referencing the username attribute directly. This makes me wary of using the attribute in queries. Is there a way to query User objects by this method instead of by the username attribute? I'm looking for a more elegant, queryset-oriented version of this: bob = [u for u in User.objects.all() if u.get_username() == "Bob"][0] if such a thing exists. -
I have a problem using SASS with Live SASS Compiler
I am trying to use W3Schools CSS framework in web project. I am using VScode, Python , Django and the Live SASS compiler extension. What I want is to be able to use one or more of the W3Schools classes in my own CSS classes. I have downloaded the W3 CSS file and it is available locally on my computer. I am using @mixins, @include, @use and @extend. The following simple testing code works as I want _mixins.sass @use '../../PropertiesApp/static/css/w3' $myButtonBackgroundColor: blue $myButtonTextColor: white @mixin myColor($myColor: $myButtonBackgroundColor, $myTextColor: $myButtonTextColor) background-color: $myColor color: $myTextColor @extend .w3-btn base.sass @use 'mixins' as m .MyColor @include m.myColor base.html ... <!-- W3.CSS --> <link href="{% static 'css/w3.css' %}" rel="stylesheet"> <!-- My CSS--> <link href="{% static 'css/base.css' rel="stylesheet" %}"> % block content %}{% endblock content %} ... home.html {% extends "base.html" %} {% block content %} <button class="MyColor" > Push me </button> {% endblock Content %} This gives me a button styled as I expect. What it also gives me is base.css which not only contains my style rule .MyColor { background-color: blue; color: white; } it also gives me in that base.css file 1921 lines of W3Schools CSS styles. So my question is how do … -
Connection MSSql using Azure AAD - Service Principal Auth
Issue I am facing trouble connecting to an MS SQL Database hosted on Azure SQL Server. Dependencies Python@3.10.0 Django@4.2.21 pyodbc@4.0.39 Other details In the Azure environment: I have registered an application in my Directory I have created Client credentials for my application I have created a SQL Logical Server called organisation and a SQL Database called university I have added my application as the admin of the SQL server and assigned my role as a Reader I have white-listed my public IP CREATE USER [<<application_name>>] FROM EXTERNAL PROVIDER; ALTER ROLE db_datareader ADD MEMBER [<<application_name>>]; P.S. I was able to connect using the same credentials in VS Code with no problem. I ran telnet your_server_name.database.windows.net 1433 and was able to find my SQL server. In the development environment(local environment): I am running my application on a docker I am using MSAL to create an access token I connected using the following code: # Connection string CONNECTION_STRING: Final[str] = "DRIVER={{ODBC Driver 18 for SQL Server}};SERVER=tcp:{server_url},{port};DATABASE={database_name};Encrypt=yes;TrustServerCertificate=yes;" # Create an access token for login using # 1. Tenant ID # 2. Application ID # 3. Secret value AUTHORITY_URL: Final[str] = "https://login.microsoftonline.com/{tenant_id}" application_instance: ConfidentialClientApplication = ( ConfidentialClientApplication( client_id= {application_id}, authority= AUTHORITY_URL, client_credential= {secret_value}, ) ) … -
Is PyLint outdated? Many time shows irrelevant error
PyLint Error I was using the serializers class from rest_framework package, even the package does contain the serialzers class, The Linter shows a warning of the package not holding the class. I was expecting no Warning because the rest_framework contains the serializers class -
How can I automatically add user's info to a model in Django?
I have a status and user apps in my project and all the statuses are obviously created by particular users. I want to keep info about statuses creators (id) in my db, but I don't know how to add it automatically - without having a field in a form. Like I'm just authenticated, I create a status and my db knows it was me. I tried to do this with an initial parameter but it didn't work out. Files that I attached are from the status app views.py ... class StatusCreateView(View): def get(self, request, *args, **kwargs): form = StatusForm() return render(request, "statuses/create.html", {"form": form}) def post(self, request, *args, **kwargs): form = StatusForm(request.POST) if form.is_valid(): form.save() return redirect("statuses_list") return render(request, "statuses/create.html", {"form": form}) ... urls.py ... urlpatterns = [ path("", views.IndexView.as_view(), name="statuses_list"), path("create/", views.StatusCreateView.as_view(), name="statuses_create"), ... ] models.py from django.db import models # Create your models here. class Status(models.Model): name = models.CharField(max_length=200) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) author = models.ForeignKey( "user.CustomUser", on_delete=models.CASCADE, related_name='status_related_author' ) forms.py from django.forms import ModelForm from .models import Status class StatusForm(ModelForm): class Meta: model = Status fields = ["name"] templates/statuses/create.html {% if form.errors %} <div> <ul> {% for error in form.errors %} <li><strong>{{ error|escape }}</strong></li> {% … -
how to start Django?
I have studied python, now I want to learn backend Django, tell me where to learn and how to learn. tell me where to start and from where I can learn Django because I want to participate in hackathons so I want to be prepared for it is there any course online where I can learn professionally is there anything to learn prior to this -
Images are not displaying on blog, after deploying on pythonanywhere
I have deployed my blog on PythonAnywhere by using the following settings in the project-level folder and in the PythonAnywhere static files. But images are not displaying on blog posts after deploying??? path in project-level directory STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') # Media files (uploaded images) MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') static files path on PythonAnywhere -
Django Registration View Not Rendering Template, Returns Minimal Response (71 Bytes)
I'm working on a Django project (version 5.2.6) and facing an issue with the student registration view. The login and logout views work perfectly, but the registration view (StudentRegistrationView) does not render the template (accounts/registration/student_register.html). Instead, the browser shows a minimal response with the message: This view is not implemented yet. URL: /accounts/auth/register/student/ The response size is only 71 bytes, and no errors are logged in the terminal. Below are the relevant details of my setup. Project Details Django Version: 5.2.6 Python Version: (Specify your Python version, e.g., 3.10) Database: SQLite (db.sqlite3) Debug Mode: True Template Backend: DjangoTemplates Development Server: http://127.0.0.1:8000/ When accessing /accounts/auth/register/student/, the page does not render the specified template (accounts/registration/student_register.html). Instead, it returns a 71-byte response with the message: This view is not implemented yet. URL: /accounts/auth/register/student/. No errors are logged in the terminal, and the debug toolbar is enabled. The login and logout views in the same app work correctly. -Relevant Code -Main URL Configuration (urls.py) from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static import debug_toolbar urlpatterns = [ path("admin/", admin.site.urls), path("accounts/", include("apps.accounts.urls", namespace="accounts")), ] if settings.DEBUG: urlpatterns += [ path("__debug__/", include(debug_toolbar.urls)), ] urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) … -
failure to display jazzmin header
I have installed jazzmin for my django application. All is working fine except the header. here is the settings I am using. # Jazzmin admin theme settings (customize as needed) JAZZMIN_SETTINGS = { "SITE_TITLE": "Dose Admin", "SITE_HEADER": "Dose Admin Portal", "SITE_BRAND": "DoseSaaS", "WELCOME_SIGN": "Welcome to DoseSaaS Admin", "copyright": "DoseSaaS 2025", "show_ui_builder": True, # Example: set a custom logo (put your logo in static directory) # "site_logo": "img/dose_logo.png", # Example: set a custom favicon # "site_icon": "img/favicon.ico", # Example: set a custom color theme "PRIMARY_COLOR": "#007bff", "SECONDARY_COLOR": "#6c757d", "topmenu_links": [ # Url that gets reversed (Permissions can be added) {"name": "Main", "url": "/dose/", "permissions": ["auth.view_user"]}, # external url that opens in a new window (Permissions can be added) {"name": "Support", "url": "https://github.com/farridav/django-jazzmin/issues", "new_window": True}, # model admin to link to (Permissions checked against model) {"model": "auth.User"}, ], # More options: https://django-jazzmin.readthedocs.io/en/latest/configuration/ } and my templates section of settings. TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ os.path.join(BASE_DIR, 'dose', 'templates'), os.path.join(BASE_DIR, 'templates'), ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'mysite.custom_context_processors.tenant_theme_context', 'dose.context_processors.tenant_context', ], }, }, ] jazzmin is at the top of the INSTALLED_APPS I have tried creatng base.html and base_site.html to create a custom header in arious blocks, …