First some notes about ways to call urls

Table of Contents

  1. HALLOWEEN RELEASE
  2. User
    1. user_homepage user_id :: user/user_homepage.html
    2. edit_profile user_id :: user/profile_edit.html
    3. profile user_id :: user/profile_display.html
    4. edit_portfolio user_id :: user/edit_portfolio.html
    5. portfolio user_id :: user/portfolio_display.html
    6. status user_id :: user/status.html
    7. impact user_id :: user/impact.html
    8. change_password user_id :: user/change_password.html
    9. change_password_done user_id :: user/change_password_done.html
  3. Account
    1. password_reset :: account/password_reset.html
    2. password_reset_sent :: account/password_reset_sent.html
    3. password_reset_confirm :: account/password_reset_confirm.html
    4. password_reset_complete :: account/password_reset_complete.html
    5. login ?redirect_to=SOME_PATH :: account/login.html
    6. logout :: account/logout.html
    7. register :: account/register.html
  4. Intro (Main Page)
    1. main :: intro/intro_page.html
    2. intro <part> :: intro/<part>.html
  5. Browse Listing
  6. browse :: browse/browse_list.html
  7. Admin
    1. admin :: admin/admin.html
    2. recent_activity :: admin/recent_activity.html
  8. Other
    1. coming_soon :: comming_soon.html
  9. FUTURE FEATURES
  10. Utilities
    1. crop :: util/crop.html
    2. community_frontpage :: community/frontpage.html
    3. new_forum :: community/new_forum.html
    4. reply <message_id> :: community/reply.html
    5. community_forum <forum_id> :: community/forum.html
    6. community_discussion <discussion_id> :: community/discussion.html
    7. inbox <user_id> :: user/inbox.html
    8. create_message <user_id> :: user/create_message.html
    9. message <message_id> :: user/view_message.html
    10. user_note <note_id> :: user/note.html
    11. quickrate/intro.html
    12. quickrate/issues_reported.html
    13. quickrate/issues.html
    14. quickrate/points_awarded.html
    15. quickrate/rate_review.html
    16. quickrate/save_progress.html
    17. quickrate/saved.html
    18. browse/browse_list_intro.html
    19. browse/browse_node_display_choice.html
    20. browse/browse_familial_listing.html
    21. browse/add_a_child.html
    22. browse/add_a_parent.html
    23. browse/keyword_search.html
    24. browse/node_table.html
    25. browse/wooo.html
    26. browse/node_and_review_listing.html
    27. browse/node_and_review_expanded.html
    28. browse/browse_projects.html
    29. browse/my_recent_searches.html
    30. browse/add_listings.html
    31. projects/action_center.html
    32. projects/action_center_details.html
    33. projects/surveys.html
    34. projects/missions.html

To get the url to a page use the url template tag:

{% url profile user_id %}

{% url edit_profile user_id %}

{% url login %}

eg,

<A HREF="{% url login %}">Login</A>

One must still include string quotes around the url.

Sometimes we'll want to call a url in order for it to perform its function and then redirect the user to another page. To do this we can add parameters to the end of a url call if permitted. Give it a second url call. This only works on login, logout, register, because those take forms and bring the user elsewhere. For example, the login URL can take a redirect_to parameter:

<A HREF="{% url login %}?redirect_to={{ request.path }}">Login</A>

The value of the redirect_to parameter should not be enclosed in quotes. The value can come from another use of the url template tag, or from the request.path variable, which is always the current URL path (no domain name).

See the database API for fields and methods on all db models.

  • Database objects also have access to the URLs used to display them.

node.absolute_url is a way to find the url of the homepage for several sections. Currently defined only for user (my_profile :: user/my_profile/), node (node :: /node/"node_id"/). For example, if the template has a variable called node that is a Node object, then the URL for that node's page can be found by

{{ node.absolute_url }}

Similarly, if one is iterating through review objects and wants to link to the review's creator one can do

{% for r in reviews %}
     <A HREF="{{ r.user.absolute_url }}">creator's page</A>
{% endfor %}

This is the same as doing

{% url node node.id %}

Current only Node and User objects have absolute urls.

HALLOWEEN RELEASE

See the Halloween Release story in xplanner for a list of tasks.


The title of each section of this document describes two properties: For example, with the title: "profile user_id :: user/profile.html" the following information would be conveyed:

  1. The abstract name for a page (eg, profile) as well as variables (eg, user_id)
  2. The template rendered

Each section of this document contains a description, as well as lists of variables and form elements pushed from the python view to the template. For the exact variable structure use epydoc code API.

The --> symbol indicates a link. Thus, avatar --> crop page means that clicking on the avatar will load the crop page, and --> edit_profile means that something on the current page links to the edit profile page.


  • ND = Not Done (yet)
  • All variables that represent models, eg User, Node, have fields and methods that can be accessed by the template. For example, if the template has a variable called user that is a User object, then one has access to a ton of user information:
    • user.id
    • user.is_authorized
    • user.username
    • user.first_name
    • user.last_name
    • user.email
    • user.is_staff
    • user.is_superuser
    • user.profile :: this returns the UserExtended? object for this user
    • user.profile.id
    • user.profile.feathers
    • user.profile.status
    • user.profile.vote_weight
    • user.profile.email_isPublic
    • user.profile.portfolio_isPublic
    • user.profile.interests :: this returns a list of UserInterestPercent? objects for this user
      {% for interest_percent in user.profile.interests %}
        percent: {{ interest_percent.percent }} 
        interest: {{ interest_percent.dimension.label }}
      {% endfor %}
      

User

user_homepage user_id :: user/user_homepage.html

A page that includes limited portions of other user pages. Clicking on the summary sections will pull up the specific section's full page. Accessible by anyone.

Variables: (needs all the variables that all of the user pages have...)

edit_profile user_id :: user/profile_edit.html

Editor for user profile. User gets the option of showing which fields they wish to be public or private. Only accessible by user.

Variables:

  • (ND) avatar --> crop page
  • user_id :: id of user whose profile is being edited
  • user :: user whose profile is being edited ** username ** user.id ** etc.

Form Elements:

  • firstname
  • lastname
  • email
  • cellphone [optional]
  • country [optional]
  • zipcode [optional]
  • firstname_isPublic
  • lastname_isPublic
  • email_isPublic
  • cellphone_isPublic
  • zipcode_isPublic
  • country_isPublic
  • portfolio_isPublic
  • projects_isPublic (what is this?)
  • contributer_level_public (is this status?)

profile user_id :: user/profile_display.html

View profile. Accessible by anyone. However some fields are hidden if they are listed as private and if they are being viewed by a user that is different from the user prepresented by the profile being viewed (based on a mirror function.)

Variables:

  • avatar
  • user
  • user_id

edit_portfolio user_id :: user/edit_portfolio.html

Edit user interest weights. Only accessible by user. Should have sliders that change the user's percentage concern for each interest. Should also have summary listings of each group of interests. Users can modify only the summary listings if they prefer (and the percent that they choose for each summary listing is automatically applied to each included interest.) Or they can click on one and then modify the specific interests. However, once they modify the included interests they cannot then go back and modify the summary interest (a "sorry" explanation should appear when they try to do so.)

Form:

portfolio user_id :: user/portfolio_display.html

View user interest weights. Displays the user's summary listings and expands to display the individual interests if a summary listings is clicked. Only accessible by user unless portfolio_isPublic.

Variables:

status user_id :: user/status.html

User's current level/feathers/points. Viewable by anyone if status_isPublic is "true". Should also include a listing of where they have received status points from (ie reviews, ratings, evaluations, surveys, challenges, nodes created, relationships (edges) created, etc.).

Variables:

impact user_id :: user/impact.html

List of actions taken by user (reviews, ratings, evaluation). Accessible by anyone. The user impact page should be a listing of what people have done recently and counters of what they have done in total:

THings to keep count of totals of: # of reviews, # of ratings, # of evaluations of others, # of positive evaluations received, # of negative evaluations received, # of nodes created, # of nodes edited (including deleted), # of relationships (edges) created.

Variables:

  • menu: list of (name, url) pairs for filtering recent activity
  • model: current filter on recent activity, eg 'Behavior', 'Node'. 'All' means showing all recent activity.
  • objects: list of recent activity Actions
  • title: title of list...kinda like model but more human readable
  • template: template to use to display each object in objects (for now always uses 'models/action.html' since only show actions recent activity...unlike admin which also shows aggregate ratings and user registration

change_password user_id :: user/change_password.html

Form for changing the user's password.

change_password_done user_id :: user/change_password_done.html

Tells message password was a success.

Todo(?): User automatically returns to user_homepage and sees a message there about success.

Account

password_reset :: account/password_reset.html

Form for entering username or email.

Sends email to user. See account/password_reset_email.txt for email contents. The email contains a special URL that must be pasted into the browser to reach the password_reset_confirm page.

Note that if settings.DJANGO_SERVER is True, no email is sent. Instead, the email contents are printed to the console running the django server. Note also that the domain used in the email is based on settings.DOMAIN.

password_reset_sent :: account/password_reset_sent.html

Tells user that email was sent.

password_reset_confirm :: account/password_reset_confirm.html

The email links to this page, which checks the hash in a password reset link. If validlink, the page presents a form for entering a new password. Otherwise, it encourages the user to try again (since the link probably timed out....or else h4ckd).

password_reset_complete :: account/password_reset_complete.html

Tells user that password setting worked. Links to user page or browse reviews?

login ?redirect_to=SOME_PATH :: account/login.html

Note the GET parameter that may optionally be tacked onto this url.

eg,

<A HREF="{% url login %}">Login</A>

One must still include string quotes around the url.

One can add parameters to the end of urls if permitted. For example, the login URL can take a redirect_to parameter:

<A HREF="{% url login %}?redirect_to={{ request.path }}">Login</A>

The value of the redirect_to parameter should not be enclosed in quotes. The value can come from another use of the url template tag, or from the request.path variable, which is always the current URL path (no domain name).

logout :: account/logout.html

register :: account/register.html

Intro (Main Page)

main :: intro/intro_page.html

The front page

intro <part> :: intro/<part>.html

A page in the introductory sequence

Browse Listing

browse :: browse/browse_list.html

GET PARAMETERS:

  • ?filter_by_type=<node type id>
  • ?filter_by_tag=<node tag id>
  • ?filter_by_interest=<interest id> eg
  • ?filter_by_letter=<letter> eg A, B, C, ...

Admin

admin :: admin/admin.html

Admin control panel

recent_activity :: admin/recent_activity.html

GET PARAMETERS: ?type=<model name>

Requires user.is_authenticated (aka, logged in) and user.is_staff.

Shows all actions, filterable by the GET parameter, model name. A menu on the page lists all available model filters.

Variables:

  • menu: list of (name, url) pairs for filtering recent activity
  • model: current filter on recent activity, eg 'Behavior', 'Node'. 'All' means showing all recent activity.
  • objects: list of recent activity Actions
  • title: title of list...kinda like model but more human readable
  • template: template to use to display each object in objects

Super users can edit and delete entries.

Other

coming_soon :: comming_soon.html

No variables, just sends a template to be rendered. Let me know if we want different coming soon pages. I thought maybe there would be a single one that would list all upcoming features and release schedule.

FUTURE FEATURES

Utilities

crop :: util/crop.html

Page for uploading and cropping images.

Variables:

  • current avatar
  • current uploaded image

Form:

  • crop widget?
  • OR
    • preview of cropping
    • width
    • height
    • x_offset
  • y_offset
  • buttons:
  • browse-->refresh crop page: (input widget so that user can upload image to server) set image as preview
  • update-->refresh crop page: updates preview (eventually use javascript to update automatically from fields)
  • submit-->load ?next=url: save image to ?save=user.avatar or ?save=review.image(?)
  • cancel-->load ?next=url: nothing save

Community

The whole forum thing could use a third-party forum engine. Might even be a django plugin for this.

We could also use our own engine. Reviews form discussions. Nodes are forums. The community_frontpage could introduce this gently; the browse filters could still find these nodes. The 'community' menu link would yield the node_detail page that is the parent of all forums. People could then make sub-forums for specific interests!!!

community_frontpage :: community/frontpage.html

List forums (eg, Announcements, Site Help, Research Help, Challenges, Social). Might list most recent entry in each forum.

Each forum is list of discussions (or threads), and each discussion is a tree of messages.

new_forum :: community/new_forum.html

=== new_discussion <forum_id> :: community/new_discussion.html

reply <message_id> :: community/reply.html

community_forum <forum_id> :: community/forum.html

Lists discussions for a particular forum

community_discussion <discussion_id> :: community/discussion.html

Lists messages for a discussion

Variables:

  • messages

inbox <user_id> :: user/inbox.html

Messages sent directly to user. Only accessible by user.

Variables:

  • messages : iterable
    • is_unread
    • date
    • body

create_message <user_id> :: user/create_message.html

(This could go in util. Eventually could create messages from anywhere at spur of the moment to give feedback. Not that it matters if it lives in the user folder.)

Form:

  • Recipient username

message <message_id> :: user/view_message.html

Only accessible by user.

Variables:

user_note <note_id> :: user/note.html

Note written by user. For now, users only have single note(pad). Eventually, a user may have numerous notes. We would need to add a notes page to help users select which note to view.

Form:

Quckrate

The point of quickrate is to present a simple step by step form for users. They will not be given any options in the right hand sidebar as they will be constantly prompted with what to do next. Any options will appear inline as they click through pages.

quickrate/intro.html

Description:

Variables Needed:

quickrate/issues_reported.html

Description:

Variables Needed:

quickrate/issues.html

Description:

Variables Needed:

quickrate/points_awarded.html

Description:

Variables Needed:

quickrate/rate_review.html

Description:

Variables Needed:

quickrate/save_progress.html

Description:

Variables Needed:

quickrate/saved.html

Description:

Variables Needed:

=== quickrate/select_interest.html

Browse Folder

browse/browse_list_intro.html

Description: This is where people search, A - Z, through our listings. They should see first ten entries in A, have the option to see more of A, but also have the option of switching to a different letter.

Variables Needed:

browse/browse_node_display_choice.html

Description: This is the result of a browse_list search or a keyword_search. It gives the user two options: see how this review relates to other companies, products, and entities OR see this node's reviews.

Variables Needed:

browse/browse_familial_listing.html

Description: It's a node listed at the top along with its description. It also includes a list of its parents and a list of their children. Each item diplays the type of relationship (ownership, shipper for, etc.) It only displays the top 10 entries, and none of their children. But it also gives using the option of expanding any one of their children. At the top of the page are controls (like back, forward, new keyword_search, etc.) The listing is at the bottom of the page.

Options: edit if author/admin, mark as a abusive (this editing function would change a relationship between a node and another. add a child, add a parent.

Variables Needed:

browse/add_a_child.html

Description:

Variables Needed: relationship, node name

browse/add_a_parent.html

Description:

Variables Needed: relationship, node name

browse/keyword_search.html

Description:

Variables Needed:

browse/node_table.html

Description:

Variables Needed:

browse/wooo.html

Description:

Variables Needed:

browse/node_and_review_listing.html

Description: This page lists the reviews associated with a node. Each review is a one line summary, indented according to its place in a discussion thread, and can be expanded.

Options: Rate, reply (arg), eval, (edit if author/admin), mark as outdated, mark as abusive, add review, list parent reviews or just reviews, parent reviews are labeled as such with colors or something.

Variables Needed:

browse/node_and_review_expanded.html

Description:

Variables Needed:

browse/browse_projects.html

Description:

Variables Needed:

browse/my_recent_searches.html

Description:

Variables Needed:

browse/add_listings.html

Description:

Variables Needed:

Projects

projects/action_center.html

Description:

Variables Needed:

projects/action_center_details.html

Description:

Variables Needed:

projects/surveys.html

Description:

Variables Needed:

projects/missions.html

Description:

Variables Needed:

===projects/challenges.html ===

Description:

Variables Needed:

===projects/invitations.html ===

Description:

Variables Needed:

===projects/projects_intro.html ===

Description:

Variables Needed: