Category "django"

Get_queryset() missing 1 required positional argument: 'request' when i'm trying to filter objects by logged in user

I'm trying to list all facilties owned by a user on a "facility list page" using the django rest framework and react. I tried the following to make this happen

'Product' matching query does not exist

this is the views code, the item is in the database but it still brings DoesNotExist, i have also tried get_object_or_404 im trying this url http://127.0.0.1:80

Problems with Django URL routing

I'm building a website, to be used in dental practices, however I'm having trouble with the URL routing. I'm wanting af URL pattern like: Denthelp/kartotek/#nam

HTTP retrieval failure when creating drop-in audio chat using Twilio

I am leveraging the Twilio Programmable Voice API to create a drop in audio chat room when a user completes a signup form. I am using ngrok to listen to both my

POST HTML FORM verificaton doesn't work with Django

I am currently learning Django,I connected my register FORM with my views.py, and wrote a little backend code, the problem, is that it links successfully with m

django if user.is_authenticated not working but login user

my problem is that the login operation is done correctly and the session is set up correctly, but user.is_authenticated does not work. The point is that it work

How to get data from Django Rest Framework to GoogleMaps in JS

I am trying to build a web app which should get data from Django Rest Framework (using Serializer) and pass it to JavaScript and generate markers of GoogleMaps.

How to Override get_absolute_url in Django for different Fields?

I want to make the method get_absolute_url to be dynamic with different class based views. So if in a template where it displays a list of all the articles in t

how can i get rid of these errors when trying to start a Django project?

I am trying to start a django project using the django-admin startproject but it keeps bringing this error: Traceback (most recent call last): File "C:\Users\

Django Admin OSMWidget not displaying map

We use the Django Admin to set easily a Point. It is easier to navigate through a map rather than write latitude and longitude manually. At the beginning of the

TemplateDoesNotExist at /home/

I'm following a video tutorial but Im getting an error. The only differance is that author uses Subline Text, while i use VSCode what is causing the error? ente

Serving file asyncronously with Django and uvicorn

I have a Django view that serves the content of a file. The Django application was running with WSGI until recently. This worked fine. Then I adapted my applica

URL Variable Subdirectory Error in Django

A view in my Django app takes a URL variable/argument which in my case is a URL like: https://google.com so it would look something like this: localhost:8000/a

Django - Form not saving when submitted

Good afternoon all, One of my form does not seem to save when submitted. I cannot see why, in particular as I have a similar form working just fine using the sa

Django query annotate after filter doesn't work correctly

I have two models that are related using a m2m relationship through an intermediate model: class Chat(models.Model): participants = models.ManyToManyField(s

Real time chat application with Django Channels

My real time chat application refuses to send message. no errors at all. I have tried tracing the errors by logging to the console at every stage passed and als

Django: Removing duplicated data in model

I am getting a data directly from an API and store it in list in dictionary format and then loads the data into the database , but whenever i open that page the

How does "alternates" in the Django sitemap framework work?

I am struggling to get the "alternates" attribute to work in the Django sitemap framework. class StaticViewSitemap(sitemaps.Sitemap): priority = 0.5 cha

Submit form post from another view with input field

I am relatively new to Django and I'm making a small "social" project. It basically consists of user profiles, and on those profiles you can post "comments". I

Django notification

How to display notification before two days from start date and display notfication on end date using django? from django.shortcuts import render from app.model