Guest User

Untitled

a guest
Aug 26th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. get the version of django for application
  2. from django.conf.urls.defaults import *
  3. from django.contrib import admin
  4.  
  5. (r'^admin/', include(admin.site.urls)),
  6.  
  7. DATABASES = {
  8. 'default': {
  9. 'NAME': 'app_data',
  10. 'ENGINE': 'django.db.backends.postgresql_psycopg2',
  11. 'USER': 'postgres_user',
  12. 'PASSWORD': 's3krit'
  13. },
  14. 'users': {
  15. 'NAME': 'user_data',
  16. 'ENGINE': 'django.db.backends.mysql',
  17. 'USER': 'mysql_user',
  18. 'PASSWORD': 'priv4te'
  19. }
  20. }
  21.  
  22. DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  23. DATABASE_NAME = os.path.join(BASE_DIR, 'db') # Or path to database file if using sqlite3.
  24. #DATABASE_USER = '' # Not used with sqlite3.
  25. #DATABASE_PASSWORD = '' # Not used with sqlite3.
  26. #DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
  27. #DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
  28.  
  29. DATABASES = {
  30. 'default': {
  31. 'ENGINE': 'django.db.backends.sqlite3',
  32. 'NAME': os.path.join(PROJECT_DIR, 'mycms.db'),
  33. }
  34. }
  35.  
  36. $ python
  37. >>> import django
  38. >>> print django.get_version()
  39. 0.97-pre-SVN-7668
Add Comment
Please, Sign In to add comment