Questions tagged [django]

0 votes
0 replies
Unable to broadcast message using celery
I'm trying to use celery's build in support for broadcast routing using Broadcast and using rabbitmq as the broker. I have been able to successfu...
2 votes
5 replies
Checking my MongoDB and getting an unusual dbs
So today I was in my MongoDB and I type in show dbs. Other than my usual dbs there is an additional hacked_by_unistellar. Anyone might know what...
asked 4 months ago
-1 votes
0 replies
How to Mock django chained queries using python unittest
func_to_test.py from models import MyModel def myFunc(): #Query 1 queryset_exists = MyModel.objects.filter(id=0).exists()) #Query 2 que...
asked 4 months ago
0 votes
1 replies
Too much information in Django's request.META object
I've recently been inspecting request.META for a particular view, and it looks to me that all of the environmental variables such as DJANGO_SECRE...
asked 4 months ago
0 votes
1 replies
Django template rendering: using tags vs using views
In Django, when rendering data in templates that's available through the request, we have 2 options: Obtain the data in the view, and pass it t...
asked 4 months ago
-2 votes
1 replies
What is the differences between between a blog created through coding and a wordpress? [closed]
What is the differences between between a blog created through python and a wordpress? -2 1 Answers 1...
asked 4 months ago
0 votes
1 replies
How to pass to a session the result of a search. The result could be an object or many objects
how to pass multiple objects to a session? fil = Enseignant.objects.filter(matricule_enseignant=identifiant).values_list('niveau__filiere__nom_f...
asked 4 months ago
-1 votes
0 replies
Django order by value returned from function? [duplicate]
I'm faced with a problem wherein I'm trying to create a QuerySet with the results ordered not by a field on a model, but instead ordered by the r...
asked 4 months ago
0 votes
1 replies
Alloting a read replica to a particular app in Django?
The django project has multiple apps and they all right now access the same DB. If I want one app which has only read queries to read from read r...
asked 4 months ago
-2 votes
0 replies
I did not pass in models form tuples value
Dear how to add tuple data(EMPTY_CHOICES) in models field [pro_drive_name]?. i am passing this value but not showing in my admin page from djang...
asked 4 months ago
0 votes
2 replies
Django: View is not putting the value returned by a function
I have the bookingrecordsView view in which I fetch all reservations made by a user. I added a model function is_pending() that fetches a reserva...
asked 4 months ago
0 votes
1 replies
Is it possible to use django-tables 2 with infinte scroll?
I just started to write an application using Django 2 and the most recent version of django-tables2. So far everything works without any problems...
-1 votes
0 replies
Uploading excel(xlsx) file in a web application that analyses its data and exports other data in a different xlsx file
So i am trying to make a web application that does what the title says. The problem is i dont know exactly how to move on. I am thinking using pa...
0 votes
0 replies
XMLHttpRequest with Django -> GET, ERROR 500
My method in views.py try get product_slug because he need product = Product.objects.get(slug=product_slug) and add this product in the cart. U t...
asked 4 months ago
0 votes
1 replies
Value of Select Option in Django's Views.py
I am using select tag in template along with a link having 'submit' type inside a form tag. When I select an option from the dropdown and click o...
0 votes
0 replies
Saving data once (to be able to load to images to server) then updating the same instance after some changes
I'm saving the data from the post request a first time because I need the images to be uploaded to the server like the "upload_image" function su...
asked 4 months ago
0 votes
0 replies
Django delete objects based on query with ManyToMany relation [duplicate]
I need to select several objects to be deleted from my database in django using a webpage. There is no category to select from so I can't delete...
asked 4 months ago
0 votes
2 replies
Setting debug = False makes the Django app crash with the following error, how to fix it?
It gives: internal server error when I try to acces the site/admin or any other app Trying to deploy my app using heroku. THis is the log from t...
0 votes
0 replies
How can get all objects from ManyToMany field to django model's property field
Im new on Django. In my django model field I wanna a scheduled task. For example; I wanna send emails as scheduled task. And need crontab express...
asked 4 months ago
0 votes
0 replies
How to pass a pattern through the reverse method
Here is my code: views.py class CollDetailView(DetailView): if self.request.user.is_authenticated: vote = Vote.objects.get_vote_or...
asked 4 months ago
0 votes
2 replies
django failed to load static image
I have my django app hosted on pythonanywhere. I am using weasyprint to generate a pdf and there is an image to be shown in my pdf. The error in...
0 votes
1 replies
Django channels : why is channel_layer.gruop_send getting skipped?
I'm trying to send message though websocket in django-channgels using channel-layers but its getting skipped and doesn't even show any exception...
0 votes
1 replies
DATABASES is improperly configured rds postgres django
I had deployed my django app on elasticbeanstalk but when I am connecting with rds is shows this error: ImproperlyConfigured("settings.DATABA...
0 votes
2 replies
how to Validate Expire date is bigger than start date in Django Model Form
I am using Django model form, I want to Validate Expire date is bigger than start date. this is my code but it is not working. i used clean() me...
asked 4 months ago
0 votes
1 replies
Problem with custom authentication backend
I am trying to make a custom authentication for my django project.I am using a custom user model by subclassing AbstractUser. Now after creating...
asked 4 months ago