Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
show how django forms are broken
Python
branch: master

readme

latest commit 24fbcafd0b
@joelsemar authored
Failed to load latest commit information.
main initial
.project initial
.pydevproject
README readme
__init__.py initial
__init__.pyc
formapp
manage.py initial
settings.py initial
settings.pyc initial
urls.py initial
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.