o0Julia0o

D:\System\PyPlanet\Project1\settings\base.py

Jul 14th, 2020
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. """
  2. This file contains the basic settings and overrides the default ones that are defined in the core.
  3. Documentation: http://pypla.net/
  4.  
  5. If you want to use other configuration methods like YAML or JSON files, take a look at http://pypla.net/ and head to the
  6. configuration pages.
  7. """
  8. import os
  9.  
  10. # Set the root_path to the root of our project.
  11. ROOT_PATH = os.path.dirname(os.path.dirname(__file__))
  12.  
  13. # Set the temporary location for the project.
  14. TMP_PATH = os.path.join(ROOT_PATH, 'tmp')
  15.  
  16. # Create temporary folder if not exists.
  17. if not os.path.exists(TMP_PATH):
  18. os.mkdir(TMP_PATH)
  19.  
  20. # Enable debug mode to get verbose output, not report any errors and dynamically use the DEBUG in your code
  21. # for extra verbosity of logging/output.
  22. DEBUG = bool(os.environ.get('PYPLANET_DEBUG', False))
  23.  
  24. # Add your pools (the controller instances per dedicated here) or leave as it is to use a single instance only.
  25. POOLS = [
  26. 'default'
  27. ]
  28.  
  29. # Owners are logins of the server owners, the owners always get *ALL* the permissions in the system.
  30. OWNERS = {
  31. 'default': [
  32. 'NAME'
  33. ]
  34. }
  35.  
  36. # Allow self-upgrading the installation. Disable on shared servers with one installation (hosting environment)!
  37. SELF_UPGRADE = True
  38.  
  39. # Databases configuration holds an dictionary with information of the database backend.
  40. # Please refer to the documentation for all examples. http://pypla.net/
  41. DATABASES = {
  42. 'default': {
  43. 'ENGINE': 'peewee_async.MySQLDatabase',
  44. 'NAME': 'pyplanet',
  45. 'OPTIONS': {
  46. 'host': 'localhost',
  47. 'user': 'pyplanet',
  48. 'password': 'pyplanet',
  49. 'charset': 'utf8mb4',
  50. }
  51. }
  52. }
  53.  
  54. # Dedicated configuration holds the different dedicated servers that the instances will run on including the names of
  55. # the instances.
  56. DEDICATED = {
  57. 'default': {
  58. 'HOST': '127.0.0.1',
  59. 'PORT': '5004',
  60. 'USER': 'SuperAdmin',
  61. 'PASSWORD': 'SuperAdmin',
  62. }
  63. }
  64.  
  65. # Map configuration is a set of configuration options related to match settings etc.
  66. # Matchsettings filename.
  67. MAP_MATCHSETTINGS = {
  68. 'default': 'autosave.txt',
  69. }
  70.  
  71. # Blacklist file is managed by the dedicated server and will be loaded and writen to by PyPlanet once a
  72. # player gets blacklisted. The default will be the filename Maniaplanet always uses and is generic.
  73. BLACKLIST_FILE = {
  74. 'default': 'blacklist.txt'
  75. }
  76.  
  77. # The storage configuration contains the same instance mapping of the dedicated servers and is used
  78. # to access the filesystem on the dedicated server location.
  79. # Please refer to the documentation for more information. http://pypla.net/
  80. STORAGE = {
  81. 'default': {
  82. 'DRIVER': 'pyplanet.core.storage.drivers.local.LocalDriver',
  83. 'OPTIONS': {},
  84. }
  85. }
  86.  
  87. # Define any cache backends that can be used by the core and the plugins to cache data.
  88. # This is not yet implemented. As soon as it's implemented you can activate it with the documentation, available on
  89. # http://pypla.net/
  90. # CACHE = {
  91. # 'default': {
  92. #
  93. # }
  94. # }
  95.  
  96. # Songs is a list of URLs to .ogg files of songs to be played by the music server.
  97. SONGS = {
  98. 'default': []
  99. }
Add Comment
Please, Sign In to add comment