Skip to content

a tutorial on writing web applications with the Pinax framework

Notifications You must be signed in to change notification settings

chrisdev/pinaxtutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Pinax Tutorial, by Paolo Corti, 2009

Tutorial: writing Pinax's applications

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License

Tutorial chapters still to be written

5) Adding comments

  • comments framework is a django magic: http://docs.djangoproject.com/en/dev/ref/contrib/comments/
  • many Pinax modules use the threadedcomments module, and here we go
  • in book templates insert {% load comments_tag %} and then {% comments post %}
  • in books template add {% load threadedcommentstags %} and then the comment section

6) Using the tagging application (django_tagging)

  • insert the tags field in the model and get_tags method
  • syncdb to update the database with the tags field
  • add tags field in the form
  • try to add some tags: note that both "Tagged Items" and "Tags" tables of Tagging app are updated
  • call the get_tags method in the html pages
  • insert booktags in the tag method in trunk/apps/tag_app/views
  • insert booktags section in the html of trunk/templates/tags/index.html

7) Using the feeds application

8) Using the voting application (django_voting)

  • tags to use: {% load voting_tags %}, {% load extra_voting_tags %}
  • add a vote section in urls.py
  • add the vote section in the html page
  • add the javascript in the html page

9) Flagging contents

  • we will use the django-flags application, that lets users flag content as inappropriate or spam
  • add {% load flagtags %} in the html template (book.html)
  • add the flag section in book.html
  • add the {% block extra_body %} with the javascript code (like in photos app) in book.html
  • note the message in the message bar
  • look in FlaggedConten table (http://localhost:8000/admin/flag/flaggedcontent/2/), your flagged book will be there

10) Notifications

About

a tutorial on writing web applications with the Pinax framework

Resources

Stars

Watchers

Forks

Packages

No packages published