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

All Questions

Tagged with
-1 votes
0 answers
24 views

Template Rendering Issue [closed]

I have done Url shortner using django in Python. I am unable to render the template and getting the error as shown: ) I have tried some methods and tried ChatGPT, somehow I didn't meet with the answer ...
Havish's user avatar
  • 1
0 votes
2 answers
33 views

Django - dropdown (select widget) in form is not saving data to db

I'm using this form to get a dropdown menu in my html form : forms.py class forms_bdc(forms.ModelForm): [...] bdc_description_1 = forms.ModelChoiceField(required=False,queryset=...
Nico44044's user avatar
  • 353
0 votes
1 answer
25 views

Django - get value of a form textinput on onchange event

I am using this to get the ID and the value of a select item in a form in django with the onchange event: class forms_bdc(forms.ModelForm): [...] bdc_description_1 = forms.ModelChoiceField( widget=...
Nico44044's user avatar
  • 353
0 votes
0 answers
15 views

Django Admin updating tabularinline forms

I have a django modeladmin like so: Class PlanInline(admin.TabularInLine): model = Plan form = PlanForm Class SettingsInline(admin.TabularInLine): model = Settings form = ...
ShivR's user avatar
  • 33
0 votes
0 answers
21 views

I am not able to upload MEDIA Files in Django Vercel server

I get this error: ClientError at /dashboard/add-profile-details An error occurred (400) when calling the HeadObject operation: Bad Request Request Method: POST Request URL: https://www.karlowebsytz....
Isaac Agyei Annor's user avatar
0 votes
0 answers
40 views

How to send authentication session id to django backend using fetch api?

saveBtn.addEventListener('click', function() { const csrftoken = getCookie('csrftoken'); fetch('http://localhost:8000/card/{{ auction.slug }}/add/', { method: 'GET', ...
Minecraft PC's user avatar
1 vote
1 answer
55 views

Only first placeholder displayed in Django's UserCreationForm

I'm trying to make a sign-up page with a customized user creation form - add placeholders to the fields. I'm trying to do it this way: forms.py class SignUpForm(UserCreationForm): email = ...
Potion's user avatar
  • 13
0 votes
0 answers
16 views

Problem when trying to include Allauth form in django template

I have this custom form templates/account/signup.html {% load i18n %} <h2> custom {% trans "Sign Up" %}</h2> <form class="max-w-[500px]" method="post" ...
Michal Šanda's user avatar
0 votes
1 answer
48 views

How can I implement few checkboxes in a Django Form?

I was given a task to create a recipe website. A user can add a recipe. They have to choose a category (categories). One recipe can belong to one category or to several. I am inheriting my Form from ...
dasEgo's user avatar
  • 23
2 votes
2 answers
50 views

How to add a ForeignKey field to be saved in ModelForm Django?

While creating my website, I face the following problem: a user can add an article, and so the article model has a ForeignKey field - author. I created a form for adding it, inheriting from ModelForm, ...
dasEgo's user avatar
  • 23
0 votes
0 answers
38 views

Issue with creating new pigeon and his parent records in a Django form

I am new to programming and currently learning Django. I am working on a web application where users can register new pigeons into a database. The registration form includes fields for the pigeon's ...
Rafael Maura's user avatar
0 votes
0 answers
14 views

Django form to save m2m additional fields (using custom through\assosiation table)

I have a "Recipe" model, which contains multiple "Product" models and the relationship between Recipe and Product holds the quantity of the products. Thus, I need a custom ...
Paddy's user avatar
  • 1
0 votes
2 answers
64 views

I cannot create a pre-filled form in python django

I am doing a simple project to practice CRUD in Django and I am working on a simple "To Do" project and these area my codes. models.py from django.db import models # Create your models here....
Shadhul Haneef's user avatar
-1 votes
2 answers
44 views

Cannot get Django ModelForm to display neither connect custom HTML form to database

I am currently creating a Django app that is a rental apartments homepage. It is supposed to have a booking form connected to a database. However I can't get the form from forms.py to be displayed on ...
Rafaela's user avatar
  • 21
0 votes
1 answer
47 views

Django route cannot be accessed during fetch POST method but can be accessed during manual GET method

When I attempt to delete a faction from my application using the route saga/delete/2 after clicking the deleteSubmit button, the program returns the following error: "POST /saga/delete/2/ HTTP/1....
Scott Field's user avatar

15 30 50 per page
1
2 3 4 5
381