Hi Friends,
    I'm a newbie to Django, i'm doing a registration form to be displayed in
Admin section. In my form i'm giving two fields namely latitude and
longitude and setting them as a DecimalField. My question how to set the
Decimal field into an Optional field (its not a Mandatory field) like
blank=True.

My code is as follows:

latitude = models.DecimalField(max_digits=11, decimal_places=6, null=True)
longitude = models.DecimalField(max_digits=11, decimal_places=6, null=True)

                      or

latitude = models.DecimalField(max_digits=11, decimal_places=6, blank=True)
longitude = models.DecimalField(max_digits=11, decimal_places=6, blank=True)

But its returning the following error:

IntegrityError at /admin/businesstypes/business/add/

businesstypes_business.latitude may not be NULL


Any help is highly Appreciated....

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to