Category "django"

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

Templates do not show image. Django

Here is what i tried to do: in my settings.py: TEMPLATES = [ ... 'OPTIONS': { 'context_processors': [ ...

Getting bytes written to SQL database for integer column, want integer to be written

I am writing data from a dash app to a SQL database setup by Django and then reading back the table in a callback. I have a column that the value should either

Field value not persisted after import

Model.py class Order(models.Model): customerID = models.CharField(max_length=300, blank=True, null=True) osm_bol = models.CharField(max_length=300, bla

Django template language how to fix

Hi I'm trying to build a simple django app but I can't get index.html file to recognise the variables created in views.py. Nothing I do seems to work. Does it h

Handle many models using graphene in django

In my django project i have many different models which i want to query using GraphQL. For instance: class Country(): name = CharField(max_length=255) clas

SMTPConnectError (421, b'Server busy, too many connections')SMTPConnectError (421, b'Server busy, too many connections') [duplicate]

I have checked every single solution on other questions but they are of zero help,using bulk email services also require having a domain name

How to get notification when new Article is added to Website?

I have multiple blogging websites made in WordPress. I want to make a website, by which when I add some article on any of these websites, I have to get a notifi

Can I write posts for a personal Django blog website in static html files?

I'm pretty new to Django and have been experimenting making my own personal blog. General question I get that I can specify my blog post structure in models.py