I have been trying to create a way that my Django database will store data for 7 consecutive days because I want to use it to plot a weekly graph but the problem now is that Django doesn't have a …
I have this piece of code that works complete fine on a single python script. When I try to test it out on local server it returns a html page saying link is not vaild. (I am expecting a PDF …
I’m working on enabling real-time notifications from LinkedIn. I can successfully retrieve access tokens, but when I try to create a real-time notification subscription, the API returns the following error. Could someone please help me understand what might be causing …
I have been recently working on a trading project. Now client has a requirement for in-project Postgresql Database. Have anyone worked across this or maybe something similar???
I have a Django application, which is using TailwindCSS for styling (using the django-tailwind package). I am developing locally with docker compose and plan to deploy using the same. So I have the following requirements For development: I need …
Context: I'm setting DRF + dj-rest-auth + allauth + simple-jwt for user authentication. Desired behaviour: Register with no username, only email. Authorize login only if email is verified with a link sent to email. Social login to be added. Problem: …
I’m running Celery with Django and Celery Beat. Celery Beat triggers an outer task every 30 minutes, and inside that task I enqueue another task per item. Both tasks are decorated to use the same custom queue, but the inner …
I’m building a Vue 3 frontend (deployed on Vercel at example.com) with a Django REST Framework backend (deployed on Railway at api.example.com). Authentication uses JWT access/refresh tokens stored in HttpOnly cookies (access, refresh). Access token lifetime = 30 minutes Refresh …
PS C:\Users\ltaye\ecommerce> python manage.py runserver Watching for file changes with StatReloader Performing system checks... Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\ltaye\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 1043, in _bootstrap_inner self.run() ~~~~~~~~^^ File "C:\Users\ltaye\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 994, in run self._target(*self._args, **self._kwargs) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ …
How do you write documentation for your projects? How to improve readability of documentation? Do you have any tips for writing documentation? Thanks! Im trying to write my first documenation for django API project and I need a help
I built a web app and bought a thermal printer, I geenrate recipt from the web app, but don't know how to send it to the printer to print, also the connection is not stable. which printer is cost …
Friends, tell me 🙌 I want to clearly understand what a Junior developer in Django should be able to do. And also: what skills are required besides Django to feel confident at the start in Python backend? I would be …
If I run this source /var/www/django/env/bin/activate && cd /var/www/django/ && python manage.py cron in the cockpit gui terminal (ubuntu-server 22.04) an email is sent. But if I run it as a cronjob, in crontab: * * * * * …
I created signup/login with 'UserCreationForm'. How can I make update possible by using 'UserChangeForm'? models.py from django.contrib.auth.models import AbstractUser # Create your models here. class CustomUser(AbstractUser): pass def __str__(self): return self.username forms.py from django.contrib.auth.forms import UserCreationForm, UserChangeForm from.models import …
I have a django app. I use the ORM to run some queries. It appears I have some duplicates in my result. While I can simply add a distinct() I would like to understand what is going on. Here are …
I’m currently developing a research portal locally on my Mac using Django REST Framework (DRF) for the backend and Next.js for the frontend. We’re now preparing to move the project to a Test server environment. Our university’s IT Services team …
I do add a cron job and it is shown when using crontab show but the function in python doesn't get executed and I tried to run the function in the python interpreter and it works , so I guess …
We recently upgraded to django-allauth[mfa, socialaccount]==65.11.0 where we are using an OIDC-provider that extends OAuth2Client and we discovered that one of our SocialApplication configs that is connected with an Azure app registration stopped working after the bump. Before the version …
Enter image description here I have installed Docker & AWS CLI on EC2 instance, pull docker image from ECR to EC2, then have run the Django container on EC2 machine. As of now trying to deploy with …
Всем привет, я начинающий full-stack разработчик. Я хочу стать Junior разработчиком, но пока знаю только django и самый простой front-end на html и css. Кто самостоятельно обучался, расскажите пожалуйста, что учить, на каких ресурсах и как можно относительно быстро (1 …
I'm trying to create some pdf bar charts in my Django project using xhtml2pdf (which I find easier to use than ReportLab and better than Weasyprint). I can use the example given in the xhtml2pdf docs using …
I had a blog_user table in my DB, but accidentally restored a wrong backup.sql file so it disappeared. I don't have blog_user table in DB right now, but I have a migration creating user model. I tried to re-run the …
This is my class based view function Whenever the use finishes to enter the required data and click the submit button. I want the page to reload so user can see the data they have submitted. I don't want to …
В моем приложении реализованы регистрация/вход с помощью наследования UserCreationForm. Как осуществить изменение пользователя, задействовав UserChangeForm? #models.py from django.contrib.auth.models import AbstractUser Create your models here. class CustomUser(AbstractUser): pass def str(self): return self.username #forms.py from django.contrib.auth.forms import UserCreationForm, UserChangeForm …
In my React + Django project, I’m currently sending the refresh token as an HttpOnly cookie. The problem with HttpOnly cookies is that they are automatically sent by the browser, which makes them vulnerable to CSRF attacks. To address this, …
I have the following models where a deck have a many to many relationship with problems and problems can have tags from django.utils import timezone from django.db import models from taggit.models import TaggedItemBase from taggit.managers import TaggableManager # Create your …
I have a Model class with a series of constraints that I am attempting to test, and I am unable to get these constraints to return an IntegrityError in testing. The class is as follows: from django.db import models from …
I have created cluster using free tier in Mongodb Atlas and also it connected with my current IP address. When I am running python manage.py runserver it gives me error-ServerSelectionTimeoutError at /. However if I change the IP address to …
Такая проблема. Я пишу сайт, который, грубо говоря, по клику кнопки будет запускать бота для Discord. И если я пытаюсь запустить его из браузера, то выскакивает ошибка "OSError: [WinError 10106] Не …
Hey folks 👋 I came across this package that helps with Django security, and honestly, I think it’s one of the best ones out there. It feels really comprehensive while still being easy to use — not too complicated, which …
I've read some tutorials about docker and django : some guys "containerize" an existing app already installed locally. and others install Django in a docker-compose and a Dockerfile (using pip for example), with volumes indeed. So "nothing" is installed …
I’m working on a Django project with GeoDjango models that store user location data (e.g., PointField, LineStringField). Because location data is highly sensitive, I want to ensure it’s secured (?encrypted) at rest in the database. The challenge is that most …
What should a junior know in django? what topics, etc., and what should a Strong Junior know? please write more details if you can give a full list
For context, I am trying to test a WebSocket connection made through Django, so I need to set up some async tests with database support. To do so, I have set up pytest-django and I have some trouble understanding …
I am making an ecommerce website using Django, and for displaying categories as buttons in the navbar, I tried using a forloop, but its not working. {% for category in categorys %} <li class="nav-item"><a class="nav-link" href="#">{{ category.name }}</a></li> {% …
I'm trying to persuade containerized django to send emails using the postfix installation on my host, and I'm told Bad destination mailbox address: Address not recognized by gateway. (For more detail, the django application I'm running is <a href="https://github.com/zulip/docker-zulip" rel="nofollow …
Sorry if this question was asked before but I tried the suggestions in there and still cannot resolved it. I’m running Django project behind Nginx on my VPS. Main project is at https://myproject.com (port 443) and works …
I'm working through the "Django 5 by Example" textbook, and am nearly finished with chapter 12, however at the very end when the text asks you to runserver and checkout http://127.0.0.1:8000/accounts/login, I get the following error: …
What is the best practice in Django to achieve this? Should I use a management command + cron job, django-crontab, or Celery beat for scheduling the deletion? Is there a way to make this automatic without having to call the …
Настраиваю celery для Django. Поставил Docker, поставил Redis, как сделать так, чтобы при старте системы поднимался Redis из Docker, чтобы в виртуальном окружении его не поднимать? Или же Docker надо ставить в самом окружении проекта? ОС Centos 10.