old_contents: from django import forms
  from django.utils.translation import ugettext_lazy as _
  
  from robots.models import Rule
  
  
  class RuleAdminForm(forms.ModelForm):
      class Meta:
          model = Rule
          exclude = []
  
      def clean(self):
          if (not self.cleaned_data.get("disallowed", False) and
                  not self.cleaned_data.get("allowed", False)):
              raise forms.ValidationError(
                  _('Please specify at least one allowed or dissallowed URL.'))
          return self.cleaned_data
  
new_contents: from django import forms
  from django.utils.translation import ugettext_lazy as _
  
  from robots.models import Rule
  
  
  class RuleAdminForm(forms.ModelForm):
      class Meta:
          model = Rule
          gfields = ['robot', 'allowed', 'disallowed', 'sites', 'crawl_delay']
  
  
      def clean(self):
          if (not self.cleaned_data.get("disallowed", False) and
                  not self.cleaned_data.get("allowed", False)):
              raise forms.ValidationError(
                  _('Please specify at least one allowed or dissallowed URL.'))
          return self.cleaned_data
  
subject: Update forms.py