Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122
  1. # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
  2. # MIT License. See license.txt
  3. from __future__ import unicode_literals
  4. import webnotes
  5. def get_context(context):
  6. bloggers = webnotes.conn.sql("""select * from `tabBlogger`
  7. where ifnull(posts,0) > 0 and ifnull(disabled,0)=0
  8. order by posts desc""", as_dict=1)
  9. writers_context = {
  10. "bloggers": bloggers,
  11. "texts": {
  12. "all_posts_by": "All posts by"
  13. },
  14. "categories": webnotes.conn.sql_list("select name from `tabBlog Category` order by name")
  15. }
  16. writers_context.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
  17. return writers_context