Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [django-views]

Django views are MVC views; they control rendering (typically through templates), and the data displayed.

django-views
0 votes
0 answers
14 views

Django: Error sending email: (530, b'5.7.0 Authentication Required

I am working on a Django project and get the problem with sending email. This is my code in views.py class ForgotPasswordView(APIView): def get(self, request): return render(request, '...
Lâm Đồng's user avatar
0 votes
1 answer
37 views

KeyError at /verify/ 'order_id'

I have a problem on my store site, when I want to confirm my order, when I click on confirmation on the payment page, it gives this error instead. the error Internal Server Error: /verify/ Traceback (...
Arsham's user avatar
  • 11
0 votes
0 answers
11 views

Deleting items from database an IntegrityError is found

i have a table name Items. every items is deletable but one item when i try to delete is throw error "IntegrityError at /admin/myeSite/items/ FOREIGN KEY constraint failed" why ? i am a ...
Bikram Gurung's user avatar
0 votes
1 answer
23 views

Incorrect redirection to login page from profile and logout links after user login

Context I'm working on a Django project where I have implemented user authentication with profile and logout functionality. The issue I'm encountering is that when I try to access the profile or ...
being tatti's user avatar
0 votes
1 answer
51 views

Django Postgresql ORM optimisation

I have a PostgreSQL view called view_sales_dashboard - this consists of several millions rows of daily sales data. In the Django view I want to present a table grouped by the products, with the ...
Andy's user avatar
  • 1,066
0 votes
0 answers
35 views

How to get form file data rendered in form invalid cases in django

i have defined a form in django as : forms.py @parsleyfy class CreationForm(forms.Form): sample_name=forms.CharField(label="Agent Name",max_length=40, widget=forms.TextInput(attrs={'...
padmaja cherukuri's user avatar
0 votes
1 answer
23 views

How can I have a different method instead of user.is_authenticated? [duplicate]

I have an academy website , which has 3 different kinds of users. The first one is the staff that I handle with the admin panel. The second one is parents or people who are going to get some ...
amirali mirzaei zadeh's user avatar
0 votes
1 answer
15 views

PUT metod make the password field are required and when i put the value in fields its save it as a text in th database with no hash

views.py from .serializers import CreateUser,ShowUser,MeSerializer,ChangePasswordSerializer from rest_framework import viewsets from django.contrib.auth.models import User from rest_framework....
Adham Ayman's user avatar
-1 votes
0 answers
67 views

Django for loop not working in HTML in Django 4.2

HELP: There is some issue with for loop in my code. I cannot find the problem. This problem is not displaying data from backend. Can you help me with it? Whole code and process is given below. Models: ...
Shrez Ean's user avatar
0 votes
0 answers
14 views

PDF not generated from Django template

I am working on a form where I need to pass the user inputs into a context which is then passed to Django template which should be converted to a PDF file. However, instead of getting a PDF attachemnt ...
DevolamiTech's user avatar
0 votes
1 answer
20 views

Entries not showing on page

Cant seem to figure out why my entries from my database are not appearing on my page but my topics name on the entry page is I'm trying to show show entries from my database on a page, the link to the ...
Dokkaebi's user avatar
0 votes
1 answer
36 views

TemplateDoesNotExist at / (Django)

Trying to my create a home page, with django. I keep running into a TemplateDoesNotExist at error. Im pretty sure it has something to do with my paths set up. I havent worked with django enough to ...
Dokkaebi's user avatar
0 votes
0 answers
16 views

how to send content from celery task to websucket

please i am trying to process some data in a celery task and pass it to websucket connection to the clientside but the bellow code deosnt seam to be doing what i intend to achieve . Consumers.py file ...
nkdtech's user avatar
  • 53
0 votes
0 answers
29 views

Manager isn't available; 'auth.User' has been swapped for 'main.User'

I had to recreate User model. I have added custom phone and zip_code fields to the model. But I am encountering Manager isn't available; 'auth.User' has been swapped for 'main.User' error. This is my ...
Shomalik Davlatov's user avatar
-1 votes
0 answers
30 views

My django form keeps giving me the error message even though i still get the data i'm trying to send in the database, what could be wrong? th

I'm trying to add a staff with django everything seems to be working fine i even see the entry in the database but once i click the submit button instead message.success i get message.error i cant ...
Okereke Chima Emmanuel's user avatar

15 30 50 per page
1
2 3 4 5
1626