'Returns an instance of the form to be used in this view.'

def get_form(self, form_class=None):

    if (form_class is None):
        form_class = self.get_form_class()
    kwargs = self.get_form_kwargs()
    initial = kwargs.get(u'initial', {})
    initial[u'slug'] = self.request.GET.get(u'slug', None)
    kwargs[u'initial'] = initial
    form = form_class(self.request, self.urlpath, **kwargs)
    form.fields[u'slug'].widget = forms.TextInputPrepend(prepend=(u'/' + self.urlpath.path), attrs={u'pattern': (u'[a-z0-9_-]+' if (not settings.URL_CASE_SENSITIVE) else u'[a-zA-Z0-9_-]+'), u'title': (u'Lowercase    letters,    numbers,    hyphens    and    underscores' if (not settings.URL_CASE_SENSITIVE) else u'Letters,    numbers,    hyphens    and    underscores')})
    return form
