This document covers various components of pinax.apps.photos.
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.
Renders the photos/latest.html template with a list of recent photos in context.
Renders the photos/details.html template with the photo object in context along with some other relevant context variables.
| keyword arguments: | |
|---|---|
| The id of the photo matching (?P<id>\d+) | |
For a GET request, this URL will render the photos/upload.html template with an instance of the pinax.apps.photos.forms.PhotoUploadForm in context as a variable named photo_form.
For a POST request to this URL, the photo_form will be processed – the upload handled and the database record created before redirecting to photo_details.
Renders the photos/yourphotos.html template with a collection of photos that belong to the logged in user as the photos context variable.
Renders the photos/memberphotos.html template with a collection of photos for a particular user that are flagged as public = True.
| keyword arguments: | |
|---|---|
| The username of the member matching (?P<username>[\w]+) | |
A GET request to this URL will simply redirect the user to photos_yours.
A POST request to this URL will delete the photo if the user is the owner of the image. Then it will redirect the user to photos_yours.
| keyword arguments: | |
|---|---|
| The id of the photo matching (?P<id>\d+) | |
A GET request to this URL will render the photos/edit.html with an instance of the pinax.apps.photos.forms.PhotoEditForm in context as the photo_form context variable along with photo and photo_url.
A POST request to this URL will process the data submitted in the form, only saving the data if the user requesting the update is the owner of the photo. It will then redirect the user to photo_details.
| keyword arguments: | |
|---|---|
| The id of the photo matching (?P<id>\d+) | |
Templates should be placed in an photos/ folder at the root of one of your template search paths.
| context: | group, group_base, photo_form |
|---|
| context: | group, group_base, photos |
|---|
| context: | group, group_base, photos |
|---|
| context: | group, group_base, photo, host, photo_url, is_me |
|---|
| context: | group, group_base, photos |
|---|
| context: | group, group_base, photo, photo_form, photo_url |
|---|