312,866
questions
0
votes
0
answers
7
views
Cannot access Google Cloud Storage bucket from GitHub Actions Workflow
I have the Django test case test_retrieve_bucket to test access to a GCP storage bucket.
from django.test import SimpleTestCase, TestCase
from google.cloud import storage
class DemoTest(TestCase):
...
0
votes
0
answers
5
views
JQuery - use static file in getscript
In one of my script, I'm using
$.getScript("https://rawgit.com/indrimuska/jquery-editable-select/master/dist/jquery-editable-select.min.js").then(() => {...});
to get a script before ...
0
votes
0
answers
10
views
The request failed to reach my Django view
This is a web Django project, In my navbar I have a drop down that contains buttons to exploring products depending on their category, here is the code of the drop down list snippet in the main ...
0
votes
1
answer
8
views
Django performance issue on render after upgrade to Django 4.2
I'm upgrading an old Django project to Django 4.2. Everything seems to be working, except that performance on pages has degraded by factor of 100x.
I profiled the views and everything is still ...
1
vote
2
answers
24
views
TypeError: '<' not supported between instances of 'CombinedExpression' and 'int' when trying to implement the post_save signal with django-axes
I'm trying to create a signal which sents an email informing about an access attempt, when a user fails to provide correct credentials when logging in. Access attempts are traced by the django-axes ...
0
votes
0
answers
12
views
Generating an arabic pdf file using Django and xhtml2pdf
I want to generate an Arabic PDF file using Django and xhtml2pdf library.
My code is this:
In the views.py
class ViewPDF(View):
def get(self, request, *args, **kwargs):
name=أفراد.objects....
0
votes
0
answers
24
views
How to change Root User to Custom User in Dockerfile
I've been attempting to make all users in my Dockerfile to custom user as when running collectstatic in my Django app, I get a error message:
[Errno 13] Permission denied:
/code/static/admin/js/...
0
votes
1
answer
18
views
How to be logged in two different project in django
I have two Django applications, app1, and app2, both using the same database and running on different ports (localhost:8000 and localhost:8010). When I log in to app1, I want the user to be ...
-4
votes
0
answers
21
views
How to validate messages containing profane words in Django? [closed]
forms.py
offensive.py
utils.py
views.py
HTML file
I have a Django project where anonymous users send messages. Messages shouldn't include profane words. I have created an offensive.py file that ...
0
votes
0
answers
13
views
How do I instrument and configure a django app with OTel?
I created a sample django app that accepts to endpoint.
My goal is to instrument it with OTel so that it will report the following metrics for each endpoint:
Error rate
Latency
(And hopefully to do ...
-5
votes
0
answers
34
views
Javascript fetching code instead of name within Django [closed]
This is a javascript that I have found in github, this is the link for it.
The problem is that when I used the ph-address-selector.js, it works but instead of fetching the "display name", it ...
0
votes
0
answers
8
views
Celery + RabbitMQ random Connection reset by peer
I'm using celery in django with rabbitmq, it works fine but some times it gives ConnectionResetError
traceback:
[2024-09-18 07:08:31,427: ERROR/MainProcess] Error cleaning up after event loop: ...
-1
votes
0
answers
29
views
Django: using older version of postgresql
I want to develop a backend with Django and interact with a production database that runs PostgreSQL 12.X. Django 5, however, is only compatible with PostgreSQL 13+.
There are the options of
writing ...
1
vote
1
answer
27
views
Am I using return render(request, url) wrong in django? (CS50)
In Project 1 of Web Development with Python and Javascript with CS50, I made a form class that should create a new wiki page.
It's supposed to get the input before using its "action" to ...
0
votes
1
answer
24
views
How can I maintain a modified version of a Python library and ensure that my application installs this version automatically using requirements.txt? [duplicate]
I want to avoid manually editing the library code each time I install dependencies and is there a way to get future updates to the library while still preserving my changes?
I am currently clueless on ...