Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
  3. fn(*args, **kwargs)
  4. File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run
  5. self.check(display_num_errors=True)
  6. File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 426, in check
  7. include_deployment_checks=include_deployment_checks,
  8. File "/Library/Python/2.7/site-packages/django/core/checks/registry.py", line 75, in run_checks
  9. new_errors = check(app_configs=app_configs)
  10. File "/Library/Python/2.7/site-packages/django/core/checks/model_checks.py", line 28, in check_all_models
  11. errors.extend(model.check(**kwargs))
  12. File "/Library/Python/2.7/site-packages/django/db/models/base.py", line 1172, in check
  13. errors.extend(cls._check_long_column_names())
  14. File "/Library/Python/2.7/site-packages/django/db/models/base.py", line 1587, in _check_long_column_names
  15. connection = connections[db]
  16. File "/Library/Python/2.7/site-packages/django/db/utils.py", line 212, in
  17. __getitem__
  18. backend = load_backend(db['ENGINE'])
  19. File "/Library/Python/2.7/site-packages/django/db/utils.py", line 135, in load_backend
  20. raise ImproperlyConfigured(error_msg) django.core.exceptions.ImproperlyConfigured: 'sql_server.pyodbc' isn't an available database backend. Try using 'django.db.backends.XXX', where XXX is one of:
  21.  
  22. 'mysql', 'oracle', 'postgresql', 'sqlite3'
  23. Error was: No module named sql_server.pyodbc.base
  24.  
  25. mysql> SHOW DATABASES;
  26. +--------------------+
  27. | Database |
  28. +--------------------+
  29. | information_schema |
  30. | mysql |
  31. | performance_schema |
  32. | mydb |
  33. | sys |
  34. +--------------------+
  35. 5 rows in set (0.00 sec)
  36.  
  37. DATABASES = {
  38.  
  39. 'default': {
  40. 'ENGINE': 'django.db.backends.mysql',
  41. 'NAME': 'mydb',
  42. 'USER': 'dbuser',
  43. 'PASSWORD': 'dbpassword',
  44. 'HOST': '127.0.0.1',
  45. 'PORT': '3306',
  46. 'OPTIONS' : {
  47. 'sql_mode': 'ANSI',
  48. "init_command": "SET foreign_key_checks = 0;"},
  49.  
  50. },
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement