manage.py 596 B

1234567891011121314151617181920212223242526272829303132
  1. import os
  2. import sys
  3. import django
  4. from django.conf import settings
  5. BASE_DIR = os.path.dirname(os.path.abspath(__file__))
  6. INSTALLED_APPS = [
  7. 'redditbot',
  8. ]
  9. # Database
  10. # https://docs.djangoproject.com/en/4.1/ref/settings/#databases
  11. DATABASES = {
  12. 'default': {
  13. 'ENGINE': 'django.db.backends.sqlite3',
  14. 'NAME': 'db.sqlite3',
  15. }
  16. }
  17. settings.configure(
  18. INSTALLED_APPS = INSTALLED_APPS,
  19. DATABASES = DATABASES,
  20. )
  21. django.setup()
  22. if __name__ == "__main__":
  23. from django.core.management import execute_from_command_line
  24. execute_from_command_line(sys.argv)