Category "django"

Is it possible to list files in a dir with Azure storages

I'm using Django and django-storages[azure] as backend. But i can't to find out to list dir the files instead I have to use snippets like this: block_blob_servi

Reverse for 'Profile' with no arguments not found

I'm trying to add user Profile in my django project. i was trying to access user post into the user Profile but its throws an error like this: Reverse for 'Pro

Django AuthenticationForm is not validating and not storing information in database

So basically I'm trying to do a simple login system using Django AuthenticationForm and LoginView. The form takes the user input and when the login button is pr

count item for monthly wise python DJANGO [duplicate]

I try to make a bar chart and I want value month wise for last 6 months my models.py class Btdetail(models.Model): id = models.IntegerFiel

Manifest: Line: 1, column: 1, Syntax error on Chrome browser

I have a react app that built through npm run build. GET and POST request from the front-end to back-end gives status 200 but I am getting a weird error that ma

Django when a data is entered, write the data in the other model depending on the condition

Hello There is a data(text) in data b on app1. I want to write the data here on d on app2. how can I do that? app.model; class Post(models.Model): a=models.

How to restrict a Django model to a single one-to-one relation?

I am currently building a Django app that requires two different user types and I know that storing authentication information across multiple models/tables is

Django Heroku : python: can't open file 'manage.py': [Errno 2] No such file or directory

I am deploying a Django website on Heroku. My project is called mysite-project wich contains at its root manage.py and Procfile I can visit the heroku website

Django override the error message that Django shows for UniqueConstraint error?

I want to customize Meta class constraints default message. Here is my model that I have been working out. class BusRoute(BaseModel): route = models.Foreign

Django automatic file-upload: [WinError 123] The filename, directory name, or volume label syntax is incorrect C:\\path\to\folder\C:

I'm pretty new to Django and I'm working on a project in which I have to automate PDF file uploads from a given folder to a model in Django and these files will

Syntax Error when deploying django on apache2

I am trying to host a django application on a server using apache2 and mod_wsgi. The project itself is located at the path /usr/share/django-projects/mysite The

Avoid dyanmic content's translation in msgstr

I am using Django translations for ja and de using makemessage. There is a translation in that I don't want to translate dynamic content in de. I am using the

Python Django Operational error, no such table

I'm trying to use a sqlite database from a different project in my django project. I've added the .db file to my project structure and added the following code

Django Lightsail - attempt to write a readonly database

I am trying to deploy my Djago app on AWS Lightsail. When I try to login/register, I am getting this error: Attempt to write a readonly database I have been g

django filter for NOT IN as lookup_expr

We can make the django filter with "in" expression sending comma separated string. Such as import django_filters class NumberInFilter(django_filters.BaseInFilt

Sendgrid API - Creating HTML Email Template via API

I am not able to figure out how I can create an HTML email template in Sendgrid using the v3 API. I need to add HTML templates on Sendgrid on the fly on the bas

ERROR:: --system is intended to be used for pre-existing Pipfile installation, not installation of specific packages. Aborting

I finished my django project.And ı want to deploy my project on aws.I pulled from github my project and then on virtual computer on aws(ubuntu) run pipenv

How to bind a function to an html button without a form in Django

I'm new to Django and I need to bind a function from python to a button using onclick from a file views.py. I saw a lot of discussions where they do this with f

using Django "include" template tag as nested - side effects?

Does anyone know or have any experience about bad side effects of using "nested include tags"? (I mean including a template file which itself includes another t

Simple internal server error because running uwsgi keeps on deleting the .sock file

I'm trying to deploy my first Django application by following these steps. The problem I have is that, for some reason, running uwsgi --emperor venv/vassals/ --