gremmie@1: """ gremmie@1: Various useful widgets for the GPP application. gremmie@1: """ gremmie@1: gremmie@1: from django import forms gremmie@1: from django.utils.safestring import mark_safe gremmie@1: from django.core.urlresolvers import reverse bgneal@6: from django.conf import settings gremmie@1: gremmie@1: gremmie@1: class AutoCompleteUserInput(forms.TextInput): gremmie@1: gremmie@1: def render(self, name, value, attrs=None): bgneal@149: url = reverse('core-ajax_users') gremmie@1: output = super(AutoCompleteUserInput, self).render(name, value, attrs) bgneal@186: return output + mark_safe(u"""\ gremmie@1: """ % (name, url)) gremmie@1: