A Python content management system designed for kirsle.net featuring a blog, comments and photo albums. https://rophako.kirsle.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
4.6KB

  1. # Sample config file for Rophako.
  2. #
  3. # Edit this file and save the copy as "config.py".
  4. import os
  5. _basedir = os.path.abspath(os.path.dirname(__file__))
  6. import datetime
  7. DEBUG = True
  8. # Unique name of your site, e.g. "kirsle.net"
  9. SITE_NAME = "example.com"
  10. # Path to your site's HTML root. Whenever Rophako tries to render a template,
  11. # it will check in your site's root for the template first before defaulting to
  12. # the default fallback pages in the rophako/www folder. All of the core
  13. # Rophako pages, e.g. for account, blog, photo albums and so on, have templates
  14. # in the default site. You can override those templates by creating files with
  15. # the same paths in your site's HTML folder.
  16. #SITE_ROOT = os.path.join(_basedir, "site", "www")
  17. SITE_ROOT = "/home/noah/git/kirsle.net/www"
  18. # E-mail addresses for site notifications (i.e. new comments).
  19. NOTIFY_ADDRESS = ["root@localhost"]
  20. # Secret key used for session cookie signing. Make this long and hard to guess.
  21. #
  22. # Tips for creating a strong secret key:
  23. # $ python
  24. # >>> import os
  25. # >>> os.urandom(24)
  26. # '\xfd{H\xe5<\x95\xf9\xe3\x96.5\xd1\x01O<!\xd5\xa2\xa0\x9fR"\xa1\xa8'
  27. #
  28. # Then take that whole quoted string and paste it right in as the secret key!
  29. # Do NOT use that one. It was just an example! Make your own.
  30. SECRET_KEY = 'for the love of Arceus, change this key!'
  31. # Password strength: number of iterations for bcrypt to hash passwords.
  32. BCRYPT_ITERATIONS = 12
  33. # Where to save temp files for photo uploads, etc.
  34. TEMPDIR = "/tmp"
  35. # Rophako uses a flat file JSON database system, and the Redis caching server
  36. # sits between Ropahko and the filesystem.
  37. DB_ROOT = "db"
  38. REDIS_HOST = "localhost"
  39. REDIS_PORT = 6379
  40. REDIS_DB = 0
  41. REDIS_PREFIX = "rophako:"
  42. # Mail settings
  43. MAIL_METHOD = "smtp" # or "sendmail", not yet implemented
  44. MAIL_SERVER = "localhost"
  45. MAIL_PORT = 25
  46. MAIL_SENDER = "Rophako CMS <no-reply@rophako.kirsle.net>"
  47. # Emoticon theme used for blog posts and comments. Should exist at the URL
  48. # "/static/smileys" from your document root, and have a file named
  49. # "emoticons.json" inside. If you add a custom theme to your private site
  50. # folder, then also change EMOTICON_ROOT_PRIVATE to look there instead.
  51. EMOTICON_THEME = "tango"
  52. EMOTICON_ROOT_PRIVATE = os.path.join(_basedir, "rophako", "www", "static", "smileys")
  53. ################################################################################
  54. ## Blog Settings ##
  55. ################################################################################
  56. BLOG_ENTRIES_PER_PAGE = 5 # Number of entries to show per page
  57. BLOG_ENTRIES_PER_RSS = 5 # The same, but for the RSS feed
  58. BLOG_DEFAULT_CATEGORY = "Uncategorized"
  59. BLOG_DEFAULT_PRIVACY = "public"
  60. BLOG_TIME_FORMAT = "%A, %B %d %Y @ %I:%M:%S %p" # "Weekday, Month dd yyyy @ hh:mm:ss AM"
  61. BLOG_ALLOW_COMMENTS = True
  62. # RSS feed settings.
  63. RSS_TITLE = "Kirsle.net"
  64. RSS_LINK = "http://www.kirsle.net/"
  65. RSS_LANGUAGE = "en"
  66. RSS_DESCRIPTION = "The web blog of Kirsle"
  67. RSS_COPYRIGHT = "Copyright {}, Kirsle.net".format(str(datetime.datetime.now().strftime("%Y")))
  68. RSS_WEBMASTER = NOTIFY_ADDRESS[0]
  69. RSS_IMAGE_TITLE = RSS_TITLE
  70. RSS_IMAGE_URL = "http://www.kirsle.net/static/avatars/casey.png"
  71. RSS_IMAGE_WIDTH = 96
  72. RSS_IMAGE_HEIGHT = 96
  73. RSS_IMAGE_DESCRIPTION = "Kirsle's Avatar"
  74. ################################################################################
  75. ## Photo Settings ##
  76. ################################################################################
  77. # The path to where uploaded photos will be stored.
  78. # The PRIVATE path is from the perspective of the server file system.
  79. # The PUBLIC path is from the perspective of the web browser via HTTP.
  80. PHOTO_ROOT_PRIVATE = os.path.join(_basedir, "site", "www", "static", "photos")
  81. PHOTO_ROOT_PUBLIC = "/static/photos"
  82. PHOTO_DEFAULT_ALBUM = "My Photos" # Default/fallback album name.
  83. PHOTO_TIME_FORMAT = BLOG_TIME_FORMAT
  84. # Photo sizes.
  85. PHOTO_WIDTH_LARGE = 800 # Max width of full size photos.
  86. PHOTO_WIDTH_THUMB = 256 # Max square width of photo thumbnails.
  87. PHOTO_WIDTH_AVATAR = 96 # Square width of photo avatars.
  88. ################################################################################
  89. ## Comment Settings ##
  90. ################################################################################
  91. COMMENT_TIME_FORMAT = "%A, %B %d %Y @ %I:%M %p"
  92. # We use Gravatar for comments if the user provides an e-mail address. Specify
  93. # the URL to a fallback image to use in case they don't have a gravatar.
  94. COMMENT_DEFAULT_AVATAR = ""