Commits

George Notaras  committed 38478de

Minor fixes of the widget.

  • Participants
  • Parent commits f757ea2

Comments (0)

Files changed (1)

File src/taggit_autocomplete_modified/widgets.py

 from django.core.urlresolvers import reverse
 from django.utils.safestring import mark_safe
 
-from tagging_autocomplete_modified import settings
+from taggit_autocomplete_modified import settings
 
 
 class TagAutocomplete(Input):
     input_type = 'text'
     
     def render(self, name, value, attrs=None):
-        json_view = reverse('tagging_autocomplete-list')
+        json_view = reverse('taggit_autocomplete-list')
         html = super(TagAutocomplete, self).render(name, value, attrs)
         js = u'<script type="text/javascript">jQuery().ready(function() { jQuery("#%s").autocomplete("%s", { multiple: true }); });</script>' % (attrs['id'], json_view)
         return mark_safe("\n".join([html, js]))
     
     class Media:
         css = {
-            'all': ('%s/jquery.autocomplete.css' % settings.TAGGING_AUTOCOMPLETE_CSS_BASE_URL,)
+            'all': ('%s/jquery.autocomplete.css' % settings.TAGGIT_AUTOCOMPLETE_CSS_BASE_URL,)
         }
         js = (
-            '%s/jquery.js' % settings.TAGGING_AUTOCOMPLETE_JS_BASE_URL,
-            '%s/jquery.autocomplete.js' % settings.TAGGING_AUTOCOMPLETE_JS_BASE_URL,
+            # The jquery library should be added by your project
+            '%s/jquery.autocomplete.js' % settings.TAGGIT_AUTOCOMPLETE_JS_BASE_URL,
         )