I try to run "celery -A myproj worker -l info" and it gives me the error ModuleNotFoundError: No module named 'django_celery_results'. All dependencies are installed (django, celery, django-celery-results, redis). I tried to run it with admin rights, but it didn't …
I'm using Django with drf_social_oauth2 and oauth2_provider for Google OAuth2 authentication. I’ve successfully implemented the PKCE authorization flow. Step 1: Frontend redirects to: GET /api/v1/o/authorize/?client_id=<client_id>&response_type=code&redirect_uri=http://127.0.0.1:5173/callback&code_challenge=<challenge>&code_challenge_method=S256 Step 2: Frontend exchanges code at: POST /api/v1/o/token/. Backend responds with: { "access_token": …
I have a celery workflow, as presented in the above image. I am facing a scenario where the parent_task_callback is executed before all the sub_parent_task callbacks are executed. …
Short version I'm using django-formset to create a contact form that includes a file upload field. When an incorrect file is selected, no error message is shown. When uploading the form with an incorrect file, the field is cleared and …
I'm trying to connect to a local PostgreSQL database using psycopg2 in Python. Here's the code I'm using: import psycopg2 params = { 'dbname': 'database_name', 'user': 'user_name', 'password': 'mypassword', 'host': 'localhost', } for k, v in params.items(): print(f"{k}: {v} (type={type(v)}, …
Seeking a Clear Roadmap for Learning Python and PHP as a Junior Developer (with Remote Work Goals) Body: Hello everyone, I’m a junior developer currently learning both Python and PHP, and I find myself a bit confused about which …
How can I create a set of elements to place in views? GROUPED_CHOICES I have a list of elements. zzz = [m1-x, m2-x] - the number of repetitions of each group name - the number of elements to group xxx …
How do I get mutual followers (friends of friends) with request.user to be displayed for each users posts, I was able to display the count for mutual followers for each users posts on newsfeed. How can I get it done? …
How can I move the iterable value (radio) from the outer loop to the inner one, bypassing the inner loop iteration? How can I get the value (radio) of the outer loop. I have a nested loop that generates additional …
I'm a self-taught full-stack web developer. I've been learning and building projects for about a year now using technologies like Python (Django) and React.js. Now that I feel somewhat confident with my skills, I think it's time to start looking …
I have a rather simple backend and API with two user types, User and Admin. I have created groups and permissions in Django. The Admin should CRUD everything and the User should only view and edit itself. I've used DjangoModelPermissions …
Why my django pwa offline template is not showing i checked everthing is in its position and also there is to typo mistakes my offline.html is in write path templates/patients/offline.html and i also added PWA_APP_OFFLINE_TEMPLATE = 'patients/offline.html' in my settings.py …
How can I move the iterable value (radio) from the outer loop to the inner one, bypassing the inner loop iteration? How can I get the value (radio) of the outer loop. I have a nested loop that generates additional …
I'm refactoring a legacy Django Job to use annotate with filtered Count aggregations instead of querying each record individually (avoiding the N+1 problem). I want to count the number of related EventReport objects per Store, excluding those where status="C". So …
How to use CustomUser with dj_rest_auth to register with email and password. I have the source code below, but the username information is required during the sign-up process. I would like to know how to sign up with only the …
I have a problem creating a slug based on the title and pk, due to the use of parler. I'm using Parler for multilinguality in my API, and when I try to create a slug like title-pk I'm getting various …
Why does it take a long time I load the Django library using PyCharm? steps: I had created a New Project import django, but prompt error Install django Package in Interpreter it doesnt take long …
How can I pass the values of list elements by index to the template - as the number of iterations of the loop? I have a loop in the template and I would like to pass the number of iterations …
Created a database in aws.amazon.com, edited the setting.py file in my django project, tried to migrate in the virtual environment and got error message which include as stated below: port 5432 failed: Connection timed out (0x0000274C/10060) Is the server running …
Good day! I have data to display in a row. I use such an element as a choice in a drop-down list. I have a very large long line of about 100 characters and I would like to have line …
I'm looking for help since I'm stuck with the deploy (for testing) of my django website. First deploy ever, so expect inaccuracies. I cannot view my site: when I click on the link I get a 'Something went wrong. There …
I have a django app with a page that displays OSM through Openlayers, I dynamically add some markers to it and now I also want to display raster overlays from .tif files. I am struggeling to implement Openlayers GeoTIFF. This …
I made a task for celery and tested it with as a unit with this test: @pytest.mark.django_db def test_document_expiry_alert_unit(settings): settings.CELERY_TASK_ALWAYS_EAGER = True manager = UserFactory( email="manager@mail.com", role=Role.MANAGER, organization__check_docs=True ) doc = EmployeeDocumentFactory(user__organization=manager.organization) mail.outbox = [] document_expiry_alert.delay() assert len(mail.outbox) …
I was able to get the mutual friends from each users and display each mutual friends image on my template as seen in the attached image to this question. The problem now is that I was not able to get …
Problem Summary: I’ve deployed a Django backend in ECS using EC2 launch type (not Fargate), behind an Application Load Balancer (ALB). The service runs a containerized Gunicorn server on port 8000, and the health check endpoint is /health/. While ECS …
I am using Django 5.2.3 and I am trying to use the built-in login system, for that I have defined the path inside my app users/urls.py: from django.urls import path, include from . import views urlpatterns = [ path("accounts/", include("django.contrib.auth.urls")), …
Here is my github - https://github.com/HemantRaj-2005/online-judge I am making backend in django and frontend in vite react with typescript It is a online judge, but on submitting code, it only shows pending.., getting nothing neither on console …
This is the reports app for a business management website. One of its features is to identify the top selling product on the platform.Another is that it process low stock alerts,identify stock which has no sales. Also, it should display …
I'm using self hosted Saleor and trying to integrate self hosted stripe app, however I'm getting "Couldn’t Install Stripe The auth data given during registration request could not be used to fetch app ID. This usually means that App could …
I have been able to get the list of all users and also implement sent friend request (following/follower). Now, how do I get mutual friends(following/followers)? For example; if both user have an existing friend in common. Below code is what …
Я написал простой сайт на Django по покупке билетов, Celery когда пользователь начинает процесс оплаты места, оно бронируется. если через n секунд он все еще не оплатил - то оно освобождается с помощью Celery. когда я запускал сайт локально (поднимая …
Suggest me the technologies and the architecture that I can follow for 1 millions users
Я написал простой сайт на Django по покупке билетов, Celery когда пользователь начинает процесс оплаты места, оно бронируется. если через n секунд он все еще не оплатил - то оно освобождается с помощью Celery. когда я запускал сайт локально (поднимая …
I'm writing tests. When trying to run it, it returns the error "django.db.utils.ProgrammingError: relation "auth_user" does not exist". I'm running the project locally using a virtual environment. There is a similar error in the logs in pgadmin. This error also …
I have a Django website running in a Docker container (Debian), which I deploy with the following command: gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 33 --worker-class gevent --timeout 1200 I created a simple view with an outgoing …
I am setting up a new, local version of a Django Wagtail project (which I have had running locally before). I am able to see Pages in my browser, but when I try to login (on FF, Chrome, Safari-with-no-plugins) at …
I'm deploying my Django project with DEBUG=False, and media files like images are not loading. Nginx Configuration server { listen 80; listen [::]:80; server_name <my_server_ip>; location /media/ { alias /home/ubuntu_server02/cdo_portal/media/; autoindex on; } location / { proxy_pass http://127.0.0.1:8000; …
I am trying to use get_root() on individual TreeQuerySet elements in a for loop. This seems to work in the Django Python shell as shown below. Upon pressing [Enter] twice to indicate the end of the for loop, the result …
I'm exploring the use of ArrayAgg and I don't understand why 'histidine-[13C6,15N3]' doesn't occur before 'isoleucine-[13C6,15N1]' in this example: In [25]: for i in Infusate.objects.annotate(tns=ArrayAgg("tracer_links__tracer__name", order_by="tracer_links__tracer__name")).order_by("tns").distinct(): ...: print(i.tns) ...: ['inosine-[15N4]'] ['isoleucine-[13C6,15N1]', 'leucine-[13C6,15N1]', 'valine-[13C5,15N1]'] ['isoleucine-[13C6,15N1]', 'lysine-[13C6,15N2]', 'phenylalanine-[13C9,15N1]', 'threonine-[13C4,15N1]', 'tryptophan-[13C11]', 'histidine-[13C6,15N3]'] …
I am working in a django project where I have installed and configured whitenoise to serve static files in railways. But railways is not serving or collecting my new js files. In my browser I get a 404 in settings …