Questions tagged [django]
Django is an open-source server-side web application framework written in Python. It is designed to reduce the effort required to create complex data-driven websites and web applications, focusing on less code, no redundancy and being more explicit than implicit.
django
140
questions
0
votes
0
answers
11
views
Cannot display image with JavaScript from Django Base
I am attempting to get a customer logo to load when a user signs into my app. To do that I am using the views function below to generate the logo url:
Views:
def view_company_logo(request):
print(&...
1
vote
1
answer
14
views
Count by Month in Django Query
Good afternoon,
I am struggling with a query. Ultimately, I have some records I want to query and get a count by month.
Ultimately, my goal is to come up with a data set that looks like:
Month, ...
0
votes
0
answers
29
views
Why can't I save the Django FileField with a null value
I want to use a POST request to create an object with file fields.
At the same time, at the model level, I declared that fields can be null.
But Django does not allow me to save this object with empty ...
0
votes
0
answers
6
views
Mutliple JWT generation with different django secrets based on subdomains
I am using simple JWT (django-rest-framework-simplejwt).
I have an auth server which authenticates users. Each user can belong to a single or multiple Tenants and each tenant is represented by a ...
0
votes
2
answers
34
views
I am recieving a NoReverseMatch error does anyone know what I'm doing wrong?
Im trying to allow the user to edit an existing entry. But when I include
new_entry.html
`{% extends "learning_logs/base.html" %}
{% block content %}
<p> <a href="{% url '...
-1
votes
0
answers
22
views
auto-py-to-exe expected str, bytes or os.PathLike object, not NoneType
I'm using auto-py-to-exe to convert my django project in an exe file but I couldn´t:
Traceback (most recent call last): File
"C:\Users\gerar\AppData\Local\Programs\Python\Python312\Lib\site-...
1
vote
0
answers
35
views
Attempting to put data from database onto dashboard in Django
So I am following this guide: https://www.youtube.com/watch?v=_sWgionzDoM and am at around 55 mins so far
I have the login stuff all working however I am unable to get the dashboard to show my data ...
0
votes
0
answers
20
views
How To Register Model For Admin Page in Core App?
I defined a model (File) in core app(uploader) and tried to register it for admin page but didnt work.
then i tried adding core apps name to installed_apps in setting . after that admin page shows ...
0
votes
0
answers
7
views
Error while trying to connect Django With ReactNative
I am building a React Native app with Django as the backend. I have set up the login screen in React Native and configured JWT authentication with rest_framework_simplejwt in Django. However, I ...
0
votes
0
answers
4
views
Heroku DB Connection Limit hit when using Python ThreadPoolExecutor
I have a Django app hosted on Heroku. Some user requests to this app require making long-running queries to external resources. In order to get around the Heroku 30 request timeout, I created a system ...
0
votes
0
answers
18
views
I can't open server in 0.0.0.0 instead it is working in 127.0.0.1 in while using Docker , Django and Postgres [duplicate]
I am a newbie to this.
settings.py file is:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD':...
1
vote
0
answers
23
views
Custom email validation in django form
In my django Account app I have a model for Account
class Account(AbstractBaseUser):
wallet_value = models.DecimalField(max_digits=10, decimal_places=2, default=0.00)
first_name = models....
-1
votes
0
answers
19
views
I get an error while running django project [closed]
Manage.py file looks like this:
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
""&...
0
votes
0
answers
16
views
Django: Error sending email: (530, b'5.7.0 Authentication Required
I am working on a Django project and get the problem with sending email.
This is my code in views.py
class ForgotPasswordView(APIView):
def get(self, request):
return render(request, '...
0
votes
1
answer
31
views
How do I send 401 response with custom login_required decorator after Django session expires?
I have a custom login_required decorator that looks like this:
def login_required(function):
"""
Ensure that user is logged in
"""
def wrap(request, *...