# Install a Django application into AWX

**URL:** <https://forum.ansible.com/t/install-a-django-application-into-awx/31350>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [September 24, 2019, 12:43pm UTC](https://forum.ansible.com/t/install-a-django-application-into-awx/31350 "2019-09-24T12:43:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JG1](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@JG1](https://forum.ansible.com/u/JG1)\
**Post date:** [September 24, 2019, 12:43pm UTC](https://forum.ansible.com/t/install-a-django-application-into-awx/31350/1 "2019-09-24T12:43:48Z")

</div>

The question: Is it possible to add a custom Django application to the AWX web application ?

Theoretically this should be the case since the AWX web application also is a Django application. If I am not mistaken of course. Usually it’s just a matter of settings things in settings.py and urls.py.

The main reasons being performance and implementation simplicity; compared to a separate remote web application that is.

Is it possible ? If so, how best to proceed ?

thx !

---

<div class="post-metadata">

**Author:** ![Fran\_Fitzpatrick](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@Fran\_Fitzpatrick](https://forum.ansible.com/u/Fran_Fitzpatrick)\
**Post date:** [September 24, 2019, 1:46pm UTC](https://forum.ansible.com/t/install-a-django-application-into-awx/31350/2 "2019-09-24T13:46:57Z")

</div>

It's certainly possible, but not officially supported.

Essentially you would just need to make sure your Django application  
gets pip installed into the web container, and then modify the  
settings.py INSTALLED\_APPS such that the application is enabled.

---

<div class="post-metadata">

**Author:** ![JG1](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@JG1](https://forum.ansible.com/u/JG1)\
**Post date:** [September 24, 2019, 2:31pm UTC](https://forum.ansible.com/t/install-a-django-application-into-awx/31350/3 "2019-09-24T14:31:11Z")

</div>

There is hope then ! 🙂 But I’d like to keep the hacking to a strict minimum.

Do you know which settings.py this is ?

The only settings.py file I could find with INSTALLED\_APPS is …/solo/tests/settings.py in the venv installed packages.

There is /etc/tower/settings.py. It kinda looks like a Django project settings file except there is no INSTALLED\_APPS in there.

I think the prime candidate is /var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/settings/defaults.py. But that’s in venv too.

…

---

<div class="post-metadata">

**Author:** ![Fran\_Fitzpatrick](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@Fran\_Fitzpatrick](https://forum.ansible.com/u/Fran_Fitzpatrick)\
**Post date:** [September 24, 2019, 4:47pm UTC](https://forum.ansible.com/t/install-a-django-application-into-awx/31350/4 "2019-09-24T16:47:58Z")

</div>

It would be /etc/tower/settings.py.

---

<div class="post-metadata">

**Author:** ![Fran\_Fitzpatrick](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@Fran\_Fitzpatrick](https://forum.ansible.com/u/Fran_Fitzpatrick)\
**Post date:** [September 24, 2019, 4:49pm UTC](https://forum.ansible.com/t/install-a-django-application-into-awx/31350/5 "2019-09-24T16:49:58Z")

</div>

The reason why you're not seeing INSTALLED\_APPS there is because AWX  
also has a defaults file:  
[https://github.com/ansible/awx/blob/eaf3a28d57710127585f5cf0e2ec3a7b686f96fd/awx/settings/defaults.py#L258-L279](https://github.com/ansible/awx/blob/eaf3a28d57710127585f5cf0e2ec3a7b686f96fd/awx/settings/defaults.py#L258-L279)

---

<div class="post-metadata">

**Author:** ![JG1](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@JG1](https://forum.ansible.com/u/JG1)\
**Post date:** [September 25, 2019, 8:08am UTC](https://forum.ansible.com/t/install-a-django-application-into-awx/31350/6 "2019-09-25T08:08:41Z")

</div>

So far I _think_ it works:

- Install my package into the virtual environment /var/lib/awx/venv/awx.
- Append **INSTALLED\_APPS = [“myapp”] + INSTALLED\_APPS** to /etc/tower/settings.py.  
The container seems to start properly. Only thing left now is a url pattern pointing to myapp. And kick off the migrations. Etc…

However, this is looking like hacking my way into the application. So I think it’s better not to consider this any longer and deal with a remote Django application instead over http/rest.

Anyway, I thank you all for feedback !
