Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

show how django forms are broken

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 main
Octocat-spinner-32 .project
Octocat-spinner-32 .pydevproject
Octocat-spinner-32 README
Octocat-spinner-32 __init__.py
Octocat-spinner-32 __init__.pyc
Octocat-spinner-32 formapp
Octocat-spinner-32 manage.py
Octocat-spinner-32 settings.py
Octocat-spinner-32 settings.pyc
Octocat-spinner-32 urls.py
Octocat-spinner-32 urls.pyc
README
The problem is that when using model forms, all fields are set to false, even though defaults are all 'True' in the models

I tested the view with

curl --data "foo=bar" http://127.0.0.1:8080/ > error.html

then, going into the shell:

from main.models import *
TestModel.objects.all()[0].__dict__
Out[6]: 
{'_state': <django.db.models.base.ModelState object at 0x1cd3850>,
 'field_1': False,
 'field_2': False,
 'field_3': False,
 'id': 1}

 heres what the model looks like:
 
 from django.db import models

# Create your models here.
class TestModel(models.Model):
    field_1 = models.BooleanField(default=True)
    field_2 = models.BooleanField(default=True)
    field_3 = models.BooleanField(default=True)
Something went wrong with that request. Please try again.