Hi Ana, > > [views.py] > level=Level() > level.level_name=form.clean_data.get('level_Name') > level.instrument_name=form.clean_data.get('instrument_Name') > level.available=form.clean_data.get('available') > level.tablename=form.clean_data.get('tabelname') > > level.save() > > #when I do this instruction to test if anything was inserted > num=Level.objects.filter(Q(level_name__exact=level.level_name) & > Q(instrument_name__exact=level.instrument_name)).count() #returns 0L
Try that without the Q object like this: num=Level.objects.filter(level_name__exact=level.level_name, instrument_name__exact=level.instrument_name).count() -Rajesh --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---