Category "django"

Endpoints sharing part of an URL

I'm currently building an API with Django Rest Framework and I want to have two viewsets. One related to my User model, and one single route to verify a User em

Connect Django with Azure PostgreSQL using managed identity in azure

How can I configure Azure PostgreSQL database in Django settings.py using Managed Identity in Azure?

Google Cloud Storage doesn't upload to the correct media and static directory in the bucket

I have created an app in Django and want to use Google Cloud Storage to keep my statics and media files. However, when running python manage.py collectstatic It

Is there a way to know if the user is on a particular heading, paragraph or a div etc

I was trying to find a way to start an animation only if the user is on it, at first I tried getting screen size, and its works, but its not an optimal solution

Celery's pytest fixtures (celery_worker and celery_app) does not work

I'm trying to write a Celery(v. 4.2.1) integration test for my Django(v. 2.2.3) application. There is a bunch of outdated articles about this around, but non o

auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'UserManage.groups'

In my Django project I have a user_manage app. I create a model named UserManage in my user_manage app's model.py: from django.db import models from django.co

How to remove user using Django Allauth API?

When a user in my Django app cancels their account, I set is_active=False in the auth_user table. However, if that use signs up again, Allauth complains that th

Multiple Token Authentication in Django Rest Framework

How can a user login in multiple devices because what we have is just a single Token Authentication on our django app. As an authenticated user when I login on

django set image src path

I want to set an image as a submit button form: <form action="/final" method="post">{% csrf_token %} <input type="hidden" name="title" value="nilo

Django form with two submit buttons . . . one requires fields and one doesn't

I think this should be a fairly straightforward question . . . I have ONE Django form with TWO different submit buttons. The first submit button is just for SAV

Django/Docker/Postgresql: app connected to the 'wrong' database

I have develop a project with Django/Docker/Postgresql and use docker-compose to deploy on a linux remote server. I want to deploy 2 apps based on the same code

AWS ECS leader commands (django migrate)

We are currently deploying our Django APP on AWS Elastic Beanstalk. There we execute the django db migrations using container commands, where we assure we only

Running django with ASGI?

I have a django app I using this [docker] (https://github.com/tiangolo/uvicorn-gunicorn-docker) for production deployment when I run the app using: gunicorn --l

How to upload multiple files in Django using Dropzone js?

Info: I want to upload multiple files using Dropzone js in Django project. I have two models. One for the Post and the other would be for the File. My files mod

Django media file not found

Media file is not getting. The fields related to User model are working(eg. object.username, object.email) but field with ProfileImage is not working. urls.py

Pycharm underlines absolute import, but it works fine

I have path server->api(folder), manage.py. Pycharm underlines my absolute import from api.views import create_user but it works! If i type like from server.

Why does Django raise "KeyError"?

I am currently trying to implement pagination to my Django web app. However, when I try to use template tags from the library, Django raises a key error. To be

Django+Vue:static file not found

When I use Django+Vue to build a web appliction, It occoured that the staic files always not found though I had placed all the files correctly. the logs from se

What's the point of Django's collectstatic?

In Django, the convention is to put all of your static files (i.e css, js) specific to your app into a folder called static. So the structure would look like th

Django - no such table exception

In Django, I've added some models into models.py. After manage.py makemigrations, manage.py migrate raised this exception: django.db.utils.OperationalError: no