-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from caktus/django_subdir
Support django project in subdir, and a few other things
- Loading branch information
Showing
10 changed files
with
67 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
--- | ||
# Use manage.sh so we use the same env vars from .env that we use on | ||
# other invocations of django manage.py. Unfortunately that means we cannot | ||
# use the ansible django_manage module. | ||
# TODO: see if we could use an ansible lookup plugin to read the .env file | ||
# and pass the values to the environment configuration item? | ||
- name: collectstatic | ||
django_manage: | ||
command: collectstatic | ||
app_path: "{{ source_dir }}" | ||
virtualenv: "{{ venv_dir }}" | ||
shell: "{{ root_dir }}/manage.sh collectstatic --noinput" | ||
args: | ||
chdir: "{{ django_dir }}" | ||
become_user: "{{ project_user }}" | ||
vars: | ||
ansible_ssh_pipelining: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Shell script to run a management command | ||
cd {{ source_dir }} | ||
{{ venv_dir }}/bin/python {{ source_dir }}/manage.py $@ | ||
cd {{ django_dir }} | ||
./dotenv.sh {{ venv_dir }}/bin/python {{ django_dir }}/manage.py $@ |