forked from keokilee/makahiki
-
Notifications
You must be signed in to change notification settings - Fork 5
Activity Page Design
yongwen edited this page Mar 28, 2011
·
8 revisions
Activity Page Code Walkthrough
- data model
- admin
- data flow
- index.html
- [View] (https://github.com/keokilee/makahiki/blob/master/apps/pages/view_activities/views.py)
- header
- scoreboard
- Smart grid game
- source
- data
- 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