This document covers various components of pinax.apps.basic_profiles.
The named urls in this app should enable the use of of the {% url %} template tag as well as reverse lookups in your project code without having to know the implementation details of this app.
Provides a call back url that uses the pinax.apps.autocomplete_app views to provide data back to the jQuery autocomplete plugin.
Upon GET request, this url will render a template named basic_profiles/profiles.html by default with a list of users in context ordered by either date_joined descending or by username ascending. This is further optionally limited with case-insensitive search against the username field if the query parameter search_terms is provided. Likewise, the ordering defaults to date_joined descending which can be overridden by supplying the query parameter order with the value of name.
Examples:
<a href="{% url profile_list %}?search_terms=beth&order=name">Show "beth" Users</a>
This would result in the users context variable limited to users such as Beth, Bethany, Marybeth and would be ordered alphabetically by their username.
The value of order and search_terms are also passed to the template as context variables.
This url will render a template named basic_profiles/profile.html by default with is_me and other_user as context variables where is_me is a boolean that indicates whether or not other_user is the same as the authenticated user making the request.
keyword arguments: | |
---|---|
The username for the profile to view that matches (?P<username>[\w\._-]+) |
This url, when POSTed to will process the variables through a pinax.apps.basic_profiles.forms.ProfileForm instance, otherwise it will process a GET request by rendering basic_profiles/profile_edit.html by default for regular requests and basic_profiles/profile_edit_facebox.html for ajax calls. It renders both of these templates with an instance of the pinax.apps.basic_profiles.ProfileForm as profile_form and an instance of pinax.apps.basic_profiles.models.Profile as profile.
Templates should be placed in an basic_profiles/ folder at the root of one of your template search paths.
context: | users, order, search_terms |
---|
context: | is_me, other_user |
---|
context: | profile, profile_form |
---|
context: | profile, profile_form |
---|
Profile(id, user_id, name, about, location, website)