Hello I'm a newbie to Django and Python so sorry if this is a dumb mistake on my behalf.
I have a model (using an Oracle XE backend): class Survey(models.Model): company = models.ForeignKey(Company, null = False, blank = False) survey_name = models.CharField(max_length = 50, null = False, blank = False) location = models.CharField(max_length = 30, null = False, blank = False) start_date = models.DateField(null = False, blank = False) end_date = models.DateField(null = True, blank = True) and have a view def addEditSurvey(request, id=None): if id is None: SurveyForm = forms.models.form_for_model(Survey) else: survey = Survey.objects.get(id=id) SurveyForm = forms.models.form_for_instance(survey) if request.POST: f = SurveyForm(request.POST) if f.is_valid(): newItem = Survey(company_id=1, survey_name=f.cleaned_data['survey_name'], location=f.cleaned_data['location'],start_date=f.cleaned_data['start_date'], end_date=f.cleaned_data['end_date']) newItem.save() else: f = SurveyForm() return render_to_response('add_survey.html', {'form':f}) The problem is that I am getting "ORA-01722: invalid number" when trying to save the form. Any help would be greatfully appreciated. Catriona --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---