Skip to main content
0 votes
1 answer
66 views

django_filters.Filterset with context data from FilterView

I've a LearnerInstance model: class LearnerInstance(models.Model): learner = models.ForeignKey(Learner, on_delete=models.CASCADE) aim = models.ForeignKey(Aim, on_delete=models.CASCADE) ... ...
Lisa Higgins's user avatar
0 votes
1 answer
104 views

How to change the URL password reset domain in django?

Resetting the password in Django has four main step; Receive email from the user Send password reset link Get the link and change the password from the user side Register new password successfully I ...
cosmoscoder's user avatar
0 votes
1 answer
42 views

Problem with testing Messages in Django 5 CreateView

I am writing unit tests of ebook catalog applications in Django 5. The book creation page uses the built-in CreateView. The class code looks like this: class BookCreate(SuccessMessageMixin, ...
Eudemonix's user avatar
0 votes
2 answers
83 views

django modify FormView fields before form validation

Is there a proper way to modify the form fields before validating the data on a Class Based FormView. More specifically a CreateView. Is necessary to use Class Based views 'cause I'm throwing in a ...
42WaysToAnswerThat's user avatar
0 votes
1 answer
43 views

In django class base view whenever I logged in, my user log in successfully but get this error page:Page not found (404)

I tried class base view in my blog website authorlogin. Every time I log in though, my author gets logged, but get a page of error. I have just convert login into class-based view but my author ...
Abrar Rofique's user avatar
0 votes
0 answers
27 views

Keep input values on exception in django form

If the python function "is_valid" has an exception, how do I keep the input values that were entered on the django form? I did search, maybe I don't know a better way to search. If there is ...
Steve42's user avatar
0 votes
0 answers
32 views

Why is django class-based_view not seeing my uploads?

class MultipleFileInput(forms.ClearableFileInput): """ Work around for `widget=forms.ClearableFileInput(attrs={'multiple': True})` >> `widget=MultipleFileInput(attrs={'...
David L.E's user avatar
  • 115
3 votes
1 answer
1k views

How to effectively use PUT and DELETE HTTP methods in Django Class-Based Views?

I'm setting up a CRUD system with Django, using Class-Based Views. Currently I'm trying to figure out how to handle HTTP PUT and DELETE requests in my application. Despite searching the Django ...
user24265527's user avatar
-1 votes
1 answer
55 views

if user is already logged in do not show sign in form

I have used User Creation Form for user registration. class UserSignUpView(SuccessMessageMixin, FormView): form_class = UserCreationForm success_url = reverse_lazy('login') template_name = ...
Shreyash Maskar's user avatar
1 vote
1 answer
32 views

My Class Based View(Django) code cant recognize id from SQL database

I tried to make a training project with forms. I wanted to create a code for upgrading feedbacks in the form by Class Based Views. views.py class UpdateFeedbackView(View): def get(self, request, ...
odoacer22's user avatar
1 vote
2 answers
150 views

`UNIQUE constraint failed at: pharmcare_patient.id` in my pharmcare app

I have a Django app in my project I am currently working on called pharmcare, and I kind of getting into a unique constraint issue whenever I want to override the save() method to insert/save the ...
Blaisemart's user avatar
2 votes
2 answers
4k views

Problem with Django class-based LogoutView in Django 5.0 [duplicate]

I used Django class-based login and logout views by "django.contrib.auth.urls", login feature works correctly, but when logging out via the link "http://127.0.0.1:8000/accounts/logout&...
Saeed's user avatar
  • 89
0 votes
1 answer
137 views

Update view with django-formtools

I implemented django-formtools SessionWizardView with a navbar, so I can jump between steps if I want to update existing instances. My problem is, if I want to edit an instance I have to submit all ...
T_Torture's user avatar
  • 499
1 vote
1 answer
162 views

How to pass self.request data in django form?

I want to pass self.request data in the form class. I can access it in View, but unable to access it in form class. class AttendanceCreateView(LoginRequiredMixin, CreateView): model = Attendance ...
Vilashkumar Daate's user avatar
0 votes
1 answer
113 views

How to add permissions based on group membership on Django Rest Framework Class-Based Views?

Thank you for your time. The following code is a class-based with the method named get_permissions() which purpose is to allow only the authenticated users to make POST,PUT,DELETE and PATCH requests: #...
Enrique Dominguez's user avatar

15 30 50 per page
1
2 3 4 5
111