First time here? Check out the FAQ!
0

Displaying the number of people
 

The front page of askbot shows the number of total questions. Similarly, I think it is a good idea to show the number of people on the people page at http://askbot.org/en/users/

  • Please add this feature.

  • Also, please let me know how to add this feature. What table stores the people information ?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
kintali's avatar
141
kintali
asked 12 years ago

Comments

see more comments

1 Answer

1

The view function askbot.views.users.show_users (see in git repository) already contains variable called users.

If you add user count to the request context:

data = {
    ...
    'user_count': users.count(),
    ...
}

Then the number can be shown in the template that's rendered by the view.

Please consider forking askbot at github, making this fix and then give a pull request.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 12 years ago
link

Comments

see more comments