ebook img

django-ajax-selects Documentation PDF

40 Pages·2015·0.2 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview django-ajax-selects Documentation

django-ajax-selects Documentation Release 1.4.0 Chris Sattinger November06,2015 Contents 1 QuickUsage 3 2 Fullycustomizable 5 3 Assetsincludedbydefault 7 4 Compatibility 9 5 Index 11 5.1 Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5.2 LookupChannels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.3 Admin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.4 Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.5 Adminaddpopup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.6 MediaAssets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.7 CustomizingTemplates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.8 jQueryPluginOptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.9 jQueryevents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.10 OrderedManyToManyfields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.11 OutsideoftheAdmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.12 ExampleApp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.13 Upgradingfrompreviousversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.14 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.15 ajax_select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 PythonModuleIndex 33 i ii django-ajax-selectsDocumentation,Release1.4.0 EditForeignKey,ManyToManyFieldandCharFieldinDjangoAdminusingjQueryUIAutoComplete. Contents 1 django-ajax-selectsDocumentation,Release1.4.0 2 Contents 1 CHAPTER Quick Usage Definealookupchannel: # yourapp/lookups.py from ajax_select import register, LookupChannel from .models import Tag @register('tags') class TagsLookup(LookupChannel): model = Tag def get_query(self, q, request): return self.model.objects.filter(name__icontains=q).order_by('name')[:50] def format_item_display(self, item): return u"<span class='tag'>%s</span>" % item.name Addfieldtoaform: # yourapp/forms.py class DocumentForm(ModelForm): class Meta: model = Document tags = AutoCompleteSelectMultipleField('tags') 3 django-ajax-selectsDocumentation,Release1.4.0 4 Chapter1. QuickUsage 2 CHAPTER Fully customizable • searchquery • queryotherresourcesbesidesDjangoORM • formatresultswithHTML • customstyling • customizesecuritypolicy • customizeUI • integratewithotherUIelementsonpageusingthejavascriptAPI 5 django-ajax-selectsDocumentation,Release1.4.0 6 Chapter2. Fullycustomizable

Description:
customize UI. • integrate with other UI elements on page using the javascript API. 5 ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.