forked from pinax/pinax
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added documentation for autocomplete_app
- Loading branch information
Showing
5 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.. _ref-autocomplete_app-gettingstarted: | ||
|
||
=============== | ||
Getting started | ||
=============== | ||
|
||
This document is designed to get you up and running with the | ||
``pinax.apps.autocomplete_app``... | ||
|
||
Prerequisites | ||
============= | ||
|
||
These are the requirements to run ``pinax.apps.autocomplete_app``: | ||
|
||
* Python **2.4+** (Python 3.x is **not** supported yet) | ||
* Django **1.2+** | ||
* ``pinax.apps.basic_profiles`` | ||
* ``pinax.apps.profiles`` | ||
* django-avatar (http://github.com/ericflo/django-avatar) | ||
* django-friends (http://github.com/jtauber/django-friends/) | ||
|
||
These dependencies should be added to your ``requirements/project.txt`` file | ||
and installed using pip_. For example:: | ||
|
||
pip install -r requirements/project.txt | ||
|
||
Installation | ||
============ | ||
|
||
Add ``pinax.apps.autocomplete_app`` to your ``INSTALLED_APPS``: | ||
|
||
.. code-block:: python | ||
|
||
INSTALLED_APPS = [ | ||
# ... | ||
"pinax.apps.autocomplete_app", | ||
] | ||
|
||
Usage | ||
===== | ||
|
||
After installing this app in your Django project, you now have access to easily | ||
provide autocomplete lookups via client side javascript. | ||
|
||
First, you'll want to wire up the appropriate urls for you app: | ||
|
||
.. code-block:: python | ||
|
||
urlpatterns = patterns("", | ||
url(r"^username_autocomplete_friends/$", "pinax.apps.autocomplete_app.views.username_autocomplete_friends", name="profile_username_autocomplete_friends"), | ||
url(r"^username_autocomplete/$", "pinax.apps.autocomplete_app.views.username_autocomplete_all", name="profile_username_autocomplete"), | ||
) | ||
|
||
The above url mapping will give you two different lookups, one using the | ||
``django-friends`` app to look through just the logged in user's friends, and | ||
the other looking through all users in the system. | ||
|
||
|
||
.. _pip: http://pip.openplans.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. _ref-pinax.apps.autocomplete_app-index: | ||
|
||
================ | ||
autocomplete_app | ||
================ | ||
|
||
A utility app that provides autocomplete functionality to various other apps. | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
|
||
gettingstarted | ||
reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. _ref-autocomplete_app-reference: | ||
|
||
========= | ||
Reference | ||
========= | ||
|
||
This document covers various components of ``pinax.apps.autocomplete_app``. | ||
|
||
|
||
Modules | ||
======= | ||
|
||
``pinax.apps.autocomplete_app.views`` | ||
------------------------------------- | ||
|
||
.. automodule:: pinax.apps.autocomplete_app.views | ||
:members: | ||
:undoc-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ Pinax Apps | |
|
||
account/index | ||
analytics/index | ||
authsub/index | ||
authsub/index | ||
autocomplete_app/index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters