Exemple #1
0
 def clean_asns(self):
     try:
         v = asnset(self.cleaned_data.get('asns'))
         return ','.join(str(x) for x in sorted(v))
     except ValueError:
         raise forms.ValidationError, \
                 'Must be a list of integers separated by commas.'
     return self.cleaned_data['asns']
Exemple #2
0
 def clean_asns(self):
     try:
         v = asnset(self.cleaned_data.get('asns'))
         return ','.join(str(x) for x in sorted(v))
     except ValueError:
         raise forms.ValidationError, \
                 'Must be a list of integers separated by commas.'
     return self.cleaned_data['asns']
Exemple #3
0
 def form_valid(self):
     asns = asnset(self.form.cleaned_data['asns'])
     add_roa_requests(self.handle, self.obj, asns, self.form.cleaned_data['max_length'])
     glue.configure_resources(self.request.META['wsgi.errors'], self.handle)
     return http.HttpResponseRedirect(self.obj.get_absolute_url())
Exemple #4
0
 def form_valid(self):
     asns = asnset(self.form.cleaned_data['asns'])
     add_roa_requests(self.handle, self.obj, asns,
                      self.form.cleaned_data['max_length'])
     glue.configure_resources(self.request.META['wsgi.errors'], self.handle)
     return http.HttpResponseRedirect(self.obj.get_absolute_url())