Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324
  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. from webnotes.webutils import render_blocks
  6. def get_context(context):
  7. bloggers = webnotes.conn.sql("""select * from `tabBlogger`
  8. where ifnull(posts,0) > 0 and ifnull(disabled,0)=0
  9. order by posts desc""", as_dict=1)
  10. writers_context = {
  11. "bloggers": bloggers,
  12. "texts": {
  13. "all_posts_by": "All posts by"
  14. },
  15. "categories": webnotes.conn.sql_list("select name from `tabBlog Category` order by name")
  16. }
  17. writers_context.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
  18. writers_context.update(context)
  19. return render_blocks(writers_context)