Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

So here's to you, Mr. URL-By-Hand-Constructor.

  • Loading branch information...
commit eb331126a039d35e47e55e39c93d3df9dd73d392 1 parent 82276c1
Jacob Kaplan-Moss jacobian authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django_website/docs/forms.py
3  django_website/docs/forms.py
View
@@ -14,12 +14,13 @@ def __init__(self, *args, **kwargs):
queryset = DocumentRelease.objects.all().order_by('version'),
initial = DocumentRelease.objects.default(),
empty_label = None,
+ required = False,
)
def search(self):
sqs = super(DocSearchForm, self).search()
if self.is_valid():
- rel = self.cleaned_data['release']
+ rel = self.cleaned_data['release'] or DocumentRelease.objects.default()
sqs = sqs.filter(lang=rel.lang, version=rel.version)
return sqs
Please sign in to comment.
Something went wrong with that request. Please try again.