You can't not validate forms. The role of form validation is to make sure that, for example, a value that should contain a number contains a number. The fact that you believe the post to be in "draft" mode does not excuse the necessity of a date field to contain a date rather than a string of meaningless text.
I imagine what you want is to allow certain fields to be required in normal mode, but optional in draft mode.
In which case, this is done on the model level. You can use a custom admin form to enforce this behavior:
# models.py
...
class Post(models.Model):
title = models.CharField(..., null=True, blank=True)
fliddle = models.IntegerField(..., null=True, blank=True)
published = models.BooleanField() # if false, then in draft mode
# admin.py
...
class BlogForm(forms.ModelForm):
class Meta:
model = Post
title = forms.CharField(..., required=False)
fliddle = forms.IntegerField(..., required=False)
def __init__(self, *args, **kwargs):
self.instance = kwargs.get('instance', None)
super(BlogForm, self).__init__(*args, **kwargs)
def clean_title(self):
data = self.cleaned_data.get('title',None)
if self.instance and self.instance.published == True and not data:
raise forms.ValidationError("Title is required.")
return data
def clean_fliddle(self):
data = self.cleaned_data.get('fliddle',None)
if self.instance and self.instance.published == True and not data:
raise forms.ValidationError("Fliddle is required.")
return data
class BlogAdmin(admin.ModelAdmin):
class Meta:
model=Blog
form = BlogForm
admin.site.register(Blog, BlogAdmin)