Category "django-views"

Django complete form as signed up user

After you sign up, you are prompted to a page that contains a form used for gathering additional information about the new user and after that it redirects you

Create view to save data in django m2m parent and intermediate (through) table using a form and formset

I want to replicate the admin functionality shown in the screenshot below on the client side. This is app is meant to cost a recipe based on the ingredients and

Django Framework : Problems with views settings

im learning Django framework and having some issues that i dont get it. Actually i have apps like Polls/ Blog/ and my homepage/ installed and working as i want

NameError! I am following Django tutorial in part 5 when try to run test, getting error

[enter image description here][1] [1]: https://i.stack.imgur.com/2wDSL.png NameError! I am following Django tutorial in part 5 when try to run test, getting e

filter API response based on URL parameters that both exactly matches and also the substring of the parameter matches in Django

I need to filter API response based on URL parameters that both exact match and also the substring of the parameter matches in Django. The API call would be : "

How to remove extra puncuation marks during saving forms data in django?

when ever i add data to the form i got extra puncuation marks in the value as shown in the image. for example - name = xyz while saving i get name = ('xyz',) Th

how to change form field from dropdown list to radio button in django if the options in dropdown are being inherited from another model?

i am working on an application where i can select item from drop-down list and buy them. i have a form field which is a drop-down list(items are connected to ot

Django: The QuerySet value for an exact lookup must be limited to one result using slicing

i am tring to access a page using a slug url, but i keep getting this error The QuerySet value for an exact lookup must be limited to one result using slicing.

Adding Flutterwave in to django template and view

I have created flutterwave developer account, as you can see down here i have setup everything except template and views.py file settings.py file FLUTTERWAVE_SE

How do I fix the error of my django form not having cleaned_data attribute?

I have this form: class RegisterForm(UserCreationForm): email = forms.EmailField() class Meta: model = User fields = ["username", "emai

How to filter a Django model to display only the logged-in user's data?

Trying to solve this for a week now. How do I filter my model to display only the data assigned to the specific logged-in user? My views.py code below is not wo

Why the html custom form is not working django

I have a contact page with a simple form. Here is views.py: def contact_view(request): if request.method == 'GET': form = ContactForm() else: form = Con

Django: How to return an inline formset with errors

I have created a form to sign up a user by having them create a User object and a UserProfile object as follows: class UserCreationForm(UserCreationForm): c

How to delete multiple records from different classes in django?

It seems that whenever I run it and delete records I get server error (500) but it deletes the the data of class Bscs1_1 but for the rest of the classes it does

How do I display a Django form correctly using ListView

I am writing a simple app to track sales leads based on the Django tutorial "Writing your first Django app" (https://docs.djangoproject.com/en/4.0/intro/tutoria

Django Authorization Checking in URL having wild card pattern

I am trying to implement permission checking mechanism in URLs for a request using wildcard techniques, rather than implement permission checking on each views.

download to csv the result of a search in Django

I am trying to download a CSV from the result of a search, as an option. Meaning that the user should be able to do a search and view the result in a template,

Django profile picture does not upload

This question was asked I don't know how much but it doesn't give my answers The app I was gonna make is a little blog webapp from a tutorial (for some training

Django: After updating a template, the changes are not reflected upon refreshing the page in the browser

I am testing a class based view in my Django application. I am currently in development, so I want to see changes in the browser as soon as I make any change in

Ho to create serializer for model having foreign keys to access that foreign keys tables data also?

I want to rewrite the following API in a more efficient way using the serializer. In the following API, the user and group are foreign keys. I want to return al