Class: PoiseApplicationPython::Resources::Django::Resource
- Inherits:
-
Chef::Resource
- Object
- Chef::Resource
- PoiseApplicationPython::Resources::Django::Resource
- Includes:
- AppMixin
- Defined in:
- lib/poise_application_python/resources/django.rb
Overview
An application_django
resource to configure Django applications.
Instance Attribute Summary collapse
-
#allowed_hosts ⇒ String+
Value for
ALLOWED_HOSTS
in the Django settings. -
#collectstatic ⇒ Boolean
Set to false to disable running manage.py collectstatic during deployment.
-
#database ⇒ Hash
Option collector attribute for Django database configuration.
-
#debug ⇒ Boolean
Enable debug mode for Django.
-
#group ⇒ String
Owner for the Django application, defaults to application group.
-
#local_settings ⇒ Poise::Helpers::TemplateContent
Template content attribute for the contents of local_settings.py.
-
#local_settings_path ⇒ String, nil false
Path to write local settings to.
-
#manage_path ⇒ String
Path to manage.py.
-
#migrate ⇒ Boolean
Run database migrations.
-
#owner ⇒ String
Owner for the Django application, defaults to application owner.
-
#secret_key ⇒ String, false
Value for
SECRET_KEY
in the Django settings. -
#settings_module ⇒ Boolean
Django settings module in dotted notation.
-
#syncdb ⇒ Boolean
Run database sync.
-
#wsgi_module ⇒ Boolean
WSGI application module in dotted notation.
Instance Attribute Details
#allowed_hosts ⇒ String+
Value for ALLOWED_HOSTS
in the Django settings.
73 |
# File 'lib/poise_application_python/resources/django.rb', line 73 attribute(:allowed_hosts, kind_of: [String, Array], default: lazy { [] }) |
#collectstatic ⇒ Boolean
This could auto-detect based on config vars in settings?
Set to false to disable running manage.py collectstatic during deployment.
79 |
# File 'lib/poise_application_python/resources/django.rb', line 79 attribute(:collectstatic, equal_to: [true, false], default: true) |
#database ⇒ Hash
Option collector attribute for Django database configuration.
90 |
# File 'lib/poise_application_python/resources/django.rb', line 90 attribute(:database, option_collector: true, parser: :parse_database_url, forced_keys: %i{name}) |
#debug ⇒ Boolean
If you use this in production you will get everything you deserve.
Enable debug mode for Django.
96 |
# File 'lib/poise_application_python/resources/django.rb', line 96 attribute(:debug, equal_to: [true, false], default: false) |
#group ⇒ String
Owner for the Django application, defaults to application group.
100 |
# File 'lib/poise_application_python/resources/django.rb', line 100 attribute(:group, kind_of: String, default: lazy { parent && parent.group }) |
#local_settings ⇒ Poise::Helpers::TemplateContent
Redo this doc to cover the actual attributes created.
Template content attribute for the contents of local_settings.py.
105 |
# File 'lib/poise_application_python/resources/django.rb', line 105 attribute(:local_settings, template: true, default_source: 'settings.py.erb', default_options: lazy { }) |
#local_settings_path ⇒ String, nil false
Path to write local settings to. If given as a relative path, will be expanded against #path. Set to false to disable writing local settings. Defaults to local_settings.py next to #setting_module.
112 |
# File 'lib/poise_application_python/resources/django.rb', line 112 attribute(:local_settings_path, kind_of: [String, NilClass, FalseClass], default: lazy { default_local_settings_path }) |
#manage_path ⇒ String
Path to manage.py. Defaults to scanning for the nearest manage.py to #path.
122 |
# File 'lib/poise_application_python/resources/django.rb', line 122 attribute(:manage_path, kind_of: String, default: lazy { default_manage_path }) |
#migrate ⇒ Boolean
Run database migrations. This is a bad idea for real apps. Please do not use it.
117 |
# File 'lib/poise_application_python/resources/django.rb', line 117 attribute(:migrate, equal_to: [true, false], default: false) |
#owner ⇒ String
Owner for the Django application, defaults to application owner.
126 |
# File 'lib/poise_application_python/resources/django.rb', line 126 attribute(:owner, kind_of: String, default: lazy { parent && parent.owner }) |
#secret_key ⇒ String, false
Value for SECRET_KEY
in the Django settings. If unset, no key is
added to the local settings.
131 |
# File 'lib/poise_application_python/resources/django.rb', line 131 attribute(:secret_key, kind_of: [String, FalseClass]) |
#settings_module ⇒ Boolean
Django settings module in dotted notation. Set to false to disable anything related to settings. Defaults to scanning for the nearest settings.py to #path.
137 |
# File 'lib/poise_application_python/resources/django.rb', line 137 attribute(:settings_module, kind_of: [String, NilClass, FalseClass], default: lazy { default_settings_module }) |
#syncdb ⇒ Boolean
Run database sync. This is a bad idea for real apps. Please do not use it.
142 |
# File 'lib/poise_application_python/resources/django.rb', line 142 attribute(:syncdb, equal_to: [true, false], default: false) |
#wsgi_module ⇒ Boolean
WSGI application module in dotted notation. Set to false to disable anything related to WSGI. Defaults to scanning for the nearest wsgi.py to #path.
148 |
# File 'lib/poise_application_python/resources/django.rb', line 148 attribute(:wsgi_module, kind_of: [String, NilClass, FalseClass], default: lazy { default_wsgi_module }) |