{% raw %}include:
  - nginx

# Create the Python Virtual environment
{{ pillar['django']['virtualenv'] }}:
  virtualenv.managed:
    - no_site_packages: True
    - distribute: True
    - user: {{ pillar['django']['user'] }}
    - requirements: {{ pillar['django']['requirements'] }}
    - require:
      - pkg: python-virtualenv
      - pkg: python-dev
      - pkg: postgresql-server-dev-9.1
      - pkg: libxml2-dev
      - pkg: libxslt1-dev
      - pkg: libjpeg62-dev
      - pkg: git

sync-db:
  cmd.wait:
    - name: {{ pillar['django']['virtualenv'] }}/bin/python {{ pillar['django']['path'] }}/manage.py syncdb --noinput && {{ pillar['django']['virtualenv'] }}/bin/python {{ pillar['django']['path'] }}/manage.py migrate
    - require:
      - virtualenv: {{ pillar['django']['virtualenv'] }}
{% endraw %}
{% raw %}include:
  - nginx

# Create the Python Virtual environment
{{ pillar['django']['virtualenv'] }}:
  virtualenv.managed:
    - no_site_packages: True
    - distribute: True
    - user: {{ pillar['django']['user'] }}
    - requirements: {{ pillar['django']['requirements'] }}
    - require:
      - pkg: python-virtualenv
      - pkg: python-dev
      - pkg: postgresql-server-dev-9.1
      - pkg: libxml2-dev
      - pkg: libxslt1-dev
      - pkg: libjpeg62-dev
      - pkg: git

# django.syncdb:
#   module.run:
#     - settings_module: {{ pillar['django']['settings'] }}
#     - bin_env: {{ pillar['django']['virtualenv'] }}
#     - pythonpath: {{ pillar['django']['path'] }}
#     - migrate: True
#     - require:
#       - virtualenv: {{ pillar['django']['virtualenv'] }}
{% endraw %}
Disable syncdb and migrate due to issue with using django-configurations
Disable syncdb and migrate due to issue with using django-configurations

usmanma/cc-django-salted,usmanma/cc-django-salted,usmanma/cc-django-salted,usmanma/cc-django-salted