Category "django"

Django channels rest framework don't return data of subscription in production environment (gunicorn/daphne/nginx)

Hi everyone I deployed django with channels via daphne for websocket and gunicorn for normal request http with reverse proxy nginx, I have a problem that has no

how to change folder location to save file - DJANGO FileSystemStorage

so i want when i upload a file, the file will go to media/mp3 not media/txt. how to change save file location? views.py: def homepage(request): if request.m

How render django-table when click on TamplateColumn delete button?

I try build user table with delete option I use django table2 to view the list and when I click on delete button and delete user I want to render only the tab

Django ckeditor upload image link expires after some hours

I am using Django-storages for storing static content in the cloud and CKEditor for a text editor and used a RichTextUploadingField field. The problem is when I

Can't retrieve data from POST in django view

I have issue with retrieving data from POST in my django view. I send React form values with axios to my django backend. I believe data gets put into POST but s

WARNING: Running pip as the 'root' user

I am making simple image of my python Django app in Docker. But at the end of the building container it throws next warning (I am building it on Ubuntu 20.04):

How can I display data from django model and save at the same time using class based views?

I am creating a quiz app using Django. The requirements are: I need to first display all the topics available for the quiz on the homepage. Clicking on a partic

Is there a way to integrate Django with Next.js?

I've integrated Reactjs with Django by having a function to access build/index.html. The below codes show how I do that. config/urls.py urlpatterns = [ ..

How to make a Django application send money to its users using PayPal

I have a Django app for online cockfights. Users can bet if their accounts on the site have balance. They do that by first buying a digital product "Online Sabo

While testing my Websocket Consumer a model object is not created (Django Channels)

I'm new in Django Channels and I'm trying to build a simple chat app. But when I'm trying to test my async Websocket Consumer I run into the following exception

Failing to install psycopg2-binary on new docker container

I have encountered a problem while trying to run my django project on a new Docker container. It is my first time using Docker and I can't seem to find a good w

How to disable "django login" hyperlink while accessing swagger ui in drf-yasg?

I'm using drf-yasg to add swagger auto schema to my endpoints. The swagger-ui is being visible at /api/v1/swagger/ At my local setup this link is working fine a

Django: one of the hex, bytes, bytes_le, fields, or int arguments must be given

I am trying to filter data on based of UUIDAutoField in an API using Django. I am using PostgreSQL but while sending data from mobile app I have a string and th

TypeError: 'BasePermissionMetaclass' object is not iterable in django rest framework

i looked at other questions regarding this issue and their problems were in the REST_FRAMEWORK = ... values in settings.py file . is there any error in mine ? I

Adding custom QuerySet to UserModel causes makemigrations exception

I would like to create a custom queryset for my User model. However, I cannot simply use objects = UserQuerySet.as_manager() since the standard Django User mode

trouble showing desired checkbox validation state w/ bootstrap5 for django model form w/ m2m field and checkboxselectmultiple widget

I have a checkboxselectmultiple on an m2m model field in an ModelForm that is required - meaning at least one of the choices must be selected. I am using the b

Django NoReverseMatch: Reverse for 'add_continue' with arguments '('',)'

Anyone know what could be causing this error I'm getting? Most of the other code, which works the exact same way, works perfectly. However, this button doesn't

How to display items in a row of 4 across using Django, HTML, and Python

This is my code. I want the items to be displayed horizontally. I've tried changing the col-md-3 and still no luck. <title>Document</title> <

how to make custom form without database - DJANGO

So i want to upload file but only sent to locals storage NOT DATABASE too. But i don't know how to make custom forms. suddenly, here's my models.py : from djang

How to use validator in Django depending on the database data?

I'm making a web app that keeps tracks of a small business. For that purpose I have two models designed in my app. One of which is all the storage information a