Join us in building a kind, collaborative learning community via our updatedCode of Conduct.

Questions tagged [django-forms]

Specific questions related to forms with the Django web framework

0
votes
0answers
6 views

“ManagementForm data is missing or has been tampered with” error returned when trying to save a form on Admin

I have an ArrayModelField on my Document model but when I tried to save the values on the Admin, it returned with a ['ManagementForm data is missing or has been tampered with'] error. I've been ...
0
votes
0answers
27 views

Displaying foreign key related tables in Django Admin

I am trying to create properties list and link it to objects.Table : Propertiesclass Properties(models.Model):Property=models.CharField(primary_key=True, max_length=4......PropetyDesc=...
0
votes
1answer
23 views

Converting from a Model Type to string in python django

Following is a snapshot of one of my models in django application:class Request(models.Model):device_type=models.ForeignKey(DeviceType,to_field='device_type')...
0
votes
0answers
24 views

User Profile additional fields django

I am trying to register users with UserCreationForm fields (username, password, password) and I would like additional input fields on the register form such as location and gender.With the below ...
1
vote
2answers
24 views

How do I code my views.py such that the form data gets stored in my database(/admin)? Using Django (v2)

This is a project that user/employee requests for a leave and the admin can see it.models.pyfrom django.db import modelsfrom django.contrib.auth.models import UserCHOICES=(('1','Earned Leave')...
0
votes
1answer
35 views

unable to update the fields in model Django

I am trying to edit user details of a specific user when admin logins its going to edit page but when I press the update button it's not updating not showing any error message. (correct me please if I ...
0
votes
1answer
16 views

Removing help_text in Django admin from read only fields

So I have an admin like so:class BlahAdmin(admin.ModelAdmin):fields=('name', 'status', 'created_date')readonly_fields=('created_date')And each of these ...
0
votes
0answers
22 views

Why doesn't include show the fields of a form when reusing a template?

Good morning, I'm new to Django, I'm trying to include a template form, but it does not show the fields, just the save button.Use Django 2.1. I summarize the code, so please can you help me. since ...
0
votes
0answers
23 views

When ValidationError is raised, I have to reselect the file again in django

In my Django project, I have a form with FileField. Everything works great, but when ValidationError is raised, I have to reselect the file again.I am referring to below github link to achieve the ...
0
votes
0answers
18 views

How to save calculated fields in django model using forms?

I wanted to save a calculated field in model from my front-end. I have created the form for the same. My model looks similar to this..class Order(models.Model):order_no=models.IntegerField()...
0
votes
1answer
15 views

What is the most extensible way to manage Django UI choices that correspond to Python functions?

I am trying to create a static shared list of functions and their descriptions to display in a Django form MultipleChoiceField.I want this to be extensible in case I add more file options later on, ...
0
votes
0answers
24 views

How to validate a raw html form in django

I'm trying validate a custom made html form. I can save the form very easily, and i can also validate it, but through a very dumb way:class Signup(View):def post(self, request, *args, **kwargs)...
0
votes
0answers
15 views

Getting every object from a formset, even those not modified

I am working with an inline formset of products associated with a shipment. When modifying the products associated, I encounter a little problem. The shipment needs to have the total amount of ...
0
votes
1answer
25 views

Change the error message for a M2M relation

Change the error message for a M2M relation:I have 2 models, Item and Type:class Item(models.Model):types=models.ManyToManyField(Type, related_name='items')class ItemForm(ModelForm):...
0
votes
2answers
26 views

How to get values from Post Method

I have a form which as a input field (List). I would like to access that field individually. My code is below with output what i get. def alltestdata(request):if request.method=='POST':...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,