# setting up static directory and files while running multiple projects concurrently

**URL:** <https://forum.djangoproject.com/t/setting-up-static-directory-and-files-while-running-multiple-projects-concurrently/28663>\
**Category:** Getting Started\
**Created:** [March 3, 2024, 6:09pm UTC](https://forum.djangoproject.com/t/setting-up-static-directory-and-files-while-running-multiple-projects-concurrently/28663 "2024-03-03T18:09:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coolmike890](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/coolmike890/32/19565_2.png) [@Coolmike890](https://forum.djangoproject.com/u/Coolmike890)\
**Post date:** [March 3, 2024, 6:09pm UTC](https://forum.djangoproject.com/t/setting-up-static-directory-and-files-while-running-multiple-projects-concurrently/28663/1 "2024-03-03T18:09:27Z")

</div>

Hi,

I’m trying to develop a couple of projects concurrently. Consequently, I’m running two instances of django: runserver x.x.x.x:8000 and runserver x.x.x.x:8010. That works fine, until I try to add static files. In the first instance, I have this line in the settings.py file:

STATIC\_ROOT = os.path.join(BASE\_DIR, ‘static’)

In the second project, if I put this line:  
STATICFILES\_DIRS = [  
os.path.join(BASE\_DIR, ‘static’),  
]

It breaks the second project, such that it can no longer find home.html. Even if I erase this last line from settings.py and reload the server, it’s still broken. The first project still works, however. I figure I’m confusing django with this second setting, but I don’t know how to get it right.  
Thanks.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [March 3, 2024, 6:20pm UTC](https://forum.djangoproject.com/t/setting-up-static-directory-and-files-while-running-multiple-projects-concurrently/28663/2 "2024-03-03T18:20:58Z")

</div>

These are two separate projects in two different directories, right?

These two projects should have **nothing** in common. (They should not share any directories.)

You should also be more specific as to what you mean by “broken” here.

---

<div class="post-metadata">

**Author:** ![Coolmike890](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/coolmike890/32/19565_2.png) [@Coolmike890](https://forum.djangoproject.com/u/Coolmike890)\
**Post date:** [March 4, 2024, 5:07am UTC](https://forum.djangoproject.com/t/setting-up-static-directory-and-files-while-running-multiple-projects-concurrently/28663/3 "2024-03-04T05:07:27Z")

</div>

Yes, they are in totally different directories. I have tried it twice though. As soon as I change the second settings.py file as indicated above, it completely breaks the second site.

I get:

| Exception Type: | TemplateDoesNotExist |
| --- | --- |
| Exception Value: | home.html |

And undoing the change to the settings.py file and reloading the server does not fix it. I have concluded that the trouble is because I’m running the two server instances, but maybe I’m wrong. It’s the only thing I can think of though.

---

<div class="post-metadata">

**Author:** ![Coolmike890](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/coolmike890/32/19565_2.png) [@Coolmike890](https://forum.djangoproject.com/u/Coolmike890)\
**Post date:** [March 4, 2024, 5:15am UTC](https://forum.djangoproject.com/t/setting-up-static-directory-and-files-while-running-multiple-projects-concurrently/28663/4 "2024-03-04T05:15:01Z")

</div>

I got it. I forgot to add the app in the settings.py file. Everything seems to work now. So sorry for the trouble. I really appreciate the help though.
