Skip to content

Activity Page Design

yongwen edited this page Mar 28, 2011 · 8 revisions

Activity Page Code Walkthrough

Django framework

  • data model
  • admin
  • data flow

main page

Common components

  • header
  • scoreboard

Page Components

  • Smart grid game
    • source
    • data
      1. categories : category list code:
    ## return the category list with the tasks info
    def __get_categories(user):
      categories = Category.objects.all() 
      for cat in categories:
        task_list = []
        for task in cat.activitybase_set.all():   
          task.is_unlock = is_unlock(user, task)
          task.is_pau = is_pau(user, task)
          task_list.append(task)
        cat.task_list = task_list
    return categories
Clone this wiki locally