├── __init__.py ├── autocomplete ├── __init__.py ├── static │ ├── css │ │ ├── jquery.autocomplete.css │ │ └── django-autocomplete.css │ └── js │ │ ├── jquery.bgiframe.min.js │ │ ├── jquery.ajaxQueue.js │ │ ├── jquery.autocomplete.js │ │ └── jquery.js ├── templates │ └── admin │ │ └── autocomplete │ │ ├── fk_widget.html │ │ ├── nolookups_fk_widget.html │ │ └── inline_widget.html ├── admin.py └── geoadmin.py ├── .gitignore ├── setup.py └── README.md /__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autocomplete/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.pyo 3 | *local_settings.py 4 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from distutils.core import setup 3 | 4 | setup(name='autocomplete', 5 | version='0.2', 6 | description='The Washington Post\'s app for creating admin foreign key autocompletion fields.', 7 | author='Jeremy Bowers', 8 | author_email='jeremyjbowers@gmail.com', 9 | url='https://github.com/jeremyjbowers/django-autocomplete', 10 | packages = ['autocomplete',], 11 | license = 'MIT', 12 | package_data = {'': [ 13 | 'static/autocomplete/js/*.js', 14 | 'static/autocomplete/css/*.css', 15 | 'templates/admin/autocomplete/*.html', 16 | ]}, 17 | classifiers=[ 18 | 'Environment :: Web Environment', 19 | 'Framework :: Django', 20 | 'Intended Audience :: Developers', 21 | 'Operating System :: OS Independent', 22 | 'Programming Language :: Python', 23 | 'Topic :: Utilities' 24 | ], 25 | ) 26 | -------------------------------------------------------------------------------- /autocomplete/static/css/jquery.autocomplete.css: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * jQuery autocomplete 3 | ****************************************************************************/ 4 | .ac_results { 5 | padding: 0px; 6 | border: 1px solid #ccc; 7 | background-color: #fff; 8 | overflow: hidden; 9 | z-index: 99999; 10 | text-align: left; 11 | } 12 | 13 | .ac_results ul { 14 | width: 100%; 15 | list-style-position: outside; 16 | list-style: none; 17 | padding: 0; 18 | margin: 0; 19 | } 20 | 21 | .ac_results li { 22 | margin: 0px; 23 | padding: 3px 5px; 24 | cursor: default; 25 | display: block; 26 | font: menu; 27 | font-size: 12px; 28 | line-height: 14px; 29 | overflow: hidden; 30 | } 31 | 32 | .ac_loading { 33 | background: white url('../img/indicator.gif') right center no-repeat; 34 | } 35 | 36 | .ac_odd { 37 | background-color: #eee; 38 | } 39 | 40 | .ac_over { 41 | background-color: #999; 42 | color: white; 43 | } 44 | -------------------------------------------------------------------------------- /autocomplete/static/css/django-autocomplete.css: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * jQuery autocomplete 3 | ****************************************************************************/ 4 | .vForeignKeyRawIdHiddenAdminField {display:none;} 5 | .ac_results { 6 | padding: 0px; 7 | border: 1px solid #ccc; 8 | background-color: #fff!important; 9 | overflow: hidden; 10 | z-index: 99999; 11 | text-align: left; 12 | } 13 | 14 | .ac_results ul { 15 | width: 100%; 16 | list-style-position: outside; 17 | list-style: none; 18 | padding: 0; 19 | margin: 0; 20 | } 21 | 22 | .ac_results li { 23 | margin: 0px; 24 | padding: 3px 5px; 25 | cursor: default; 26 | display: block; 27 | font: menu; 28 | font-size: 12px; 29 | line-height: 14px; 30 | overflow: hidden; 31 | } 32 | 33 | .ac_loading { 34 | background: white url('../img/indicator.gif') right center no-repeat; 35 | } 36 | 37 | .ac_odd { 38 | background-color: #eee; 39 | } 40 | 41 | .ac_over { 42 | background-color: #999; 43 | color: white; 44 | } 45 | -------------------------------------------------------------------------------- /autocomplete/static/js/jquery.bgiframe.min.js: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) 2 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 | * 5 | * $LastChangedDate: 2007-07-22 01:45:56 +0200 (Son, 22 Jul 2007) $ 6 | * $Rev: 2447 $ 7 | * 8 | * Version 2.1.1 9 | */ 10 | (function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='