# Static how to use with another app

**URL:** <https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671>\
**Category:** Mystery Errors\
**Created:** [April 30, 2024, 8:49am UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671 "2024-04-30T08:49:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gae58](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/gae58/32/18215_2.png) [@Gae58](https://forum.djangoproject.com/u/Gae58)\
**Post date:** [April 30, 2024, 8:49am UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/1 "2024-04-30T08:49:02Z")

</div>

static  
Hi, I have the principlae app folder called Pale  
in settings section TEMPLATE I have inserted this

```auto
'DIRS': [BASE_DIR / "templates"],

```

and the css file I load them quietly like this

```auto
<link rel="stylesheet" href="{% static 'Pale/css/MenuMainFO.css' %}">

```

I created another app called Users and in the folder Users/static/Users/css  
I have the file Users.css  
which I load with this code

```auto
<link rel="stylesheet" href="{% static 'Users/css/Users.css' %}">

```

It can’t find it, though.  
Should I update the settings file ?

---

<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:** [April 30, 2024, 11:07am UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/2 "2024-04-30T11:07:58Z")

</div>

What operating system are you using?

What versions of Django and Python?

Is this happening in your development environment, or in your production environment?

How are you running your project?

Please verify the contents of this static directory. (Show the output of an `ls` or `dir` command for `Users/static/Users/css`.)

---

<div class="post-metadata">

**Author:** ![Gae58](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/gae58/32/18215_2.png) [@Gae58](https://forum.djangoproject.com/u/Gae58)\
**Post date:** [April 30, 2024, 2:07pm UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/3 "2024-04-30T14:07:33Z")

</div>

What operating system are you using?  
windows i am trying locally

What versions of Django and Python?  
Python 3.12.0  
Django 5.01

Is this happening in your development environment, or in your production environment?  
development

How are you running your project?  
Using pycharm and launching runserver with firefox

Please verify the contents of this static directory. (Show the output of an `ls` or `dir` command for `Users/static/Users/css`.)  
(venv) PS C:\ProgettiPython\PalestraGes\Utenti\static\Utenti\css\> ls

```
Directory: C:\ProgettiPython\PalestraGes\Utenti\static\Utenti\css

```

Mode LastWriteTime Length Name

* * *

-a---- 29/04/2024 13:12 1291 Utenti.css

---

<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:** [April 30, 2024, 2:13pm UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/4 "2024-04-30T14:13:23Z")

</div>

And what is the actual content of the template you’re rendering?

(I’m guessing that even though you referenced “Users” in your explanation that your template is actually referencing “Utenti”?)

---

<div class="post-metadata">

**Author:** ![Gae58](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/gae58/32/18215_2.png) [@Gae58](https://forum.djangoproject.com/u/Gae58)\
**Post date:** [April 30, 2024, 2:58pm UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/5 "2024-04-30T14:58:27Z")

</div>

content of Utenti.css

```auto
/*
=============================================================================================
--- Definizione design UTENTI
============================================================================================= */
.utenteConte {
  display: flex;
  align-items: center;
  justify-content: center;
  /*height: 100vh;*/ /* Preferisco non averlo a pagina piena */
}
.utenteForm {
  background-color: var(--header-info-bg);
  border: 1px solid var(--bianco);
  border-radius: 5%;
  padding: 2rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  /*max-width: fit-content;*/ /* Allarga il contenitore alla scritta + larga */
  width: 300px;
  margin: 0 auto;
}
.utenteForm input, select, textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  padding: 1em;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  border: none;
  /*color: white;*/
}
.utenteForm .btn-conferma {
  display: block;
  width: 100%;
  /*padding: 15px;*/
  padding: 16px 34px 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--btn-conferma-fg);
  color: var(--bianco);
  background: transparent;
  background-color: var(--btn-conferma-bg);
  border-radius: 5%;
  cursor: pointer;
  transition: background-color 0.3s ease-in;
}
.utenteForm .btn-conferma:hover {
  color: var(--nero-body);
  /*background-color: rgb(85, 85, 240);*/
  background-color: var(--bianco);
}
.utenteForm .errorlist li {
  list-style-type: none;
  color: rgb(216, 6, 114);
}

@media screen and (max-width: 600px) {
  .utenteForm {
    width: 90%;
  }
}

```

In the html when I call it up

```auto
<link rel=“stylesheet” href=“{% static ‘Users/css/Users.css’ %}”>

```

I get the message back that it can’t find the file Users.css  
But the file is present

---

<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:** [April 30, 2024, 5:58pm UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/6 "2024-04-30T17:58:50Z")

</div>

Because according to what you’ve posted here, you don’t have a file named `Users.css`. You have a file named `Utenti.css`, which is a different name.

---

<div class="post-metadata">

**Author:** ![Gae58](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/gae58/32/18215_2.png) [@Gae58](https://forum.djangoproject.com/u/Gae58)\
**Post date:** [May 1, 2024, 10:31am UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/7 "2024-05-01T10:31:10Z")

</div>

Sorry, you are right but in the first step I translated Utenti.css to User.css  
In the second answer no

---

<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:** [May 1, 2024, 11:37am UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/8 "2024-05-01T11:37:29Z")

</div>

Please clarify. You have posted twice:

> [@Gae58](#):
>
> `<link rel="stylesheet" href="{% static 'Users/css/Users.css' %}">`

And then posted:

> [@Gae58](#):
>
> (venv) PS C:\ProgettiPython\PalestraGes\Utenti\static\Utenti\css\> ls
> 
> ```auto
> Directory: C:\ProgettiPython\PalestraGes\Utenti\static\Utenti\css
> 
> ```
> 
> Mode LastWriteTime Length Name
> 
> * * *
> 
> -a---- 29/04/2024 13:12 1291 Utenti.css

---

<div class="post-metadata">

**Author:** ![Gae58](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/gae58/32/18215_2.png) [@Gae58](https://forum.djangoproject.com/u/Gae58)\
**Post date:** [May 1, 2024, 1:42pm UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/9 "2024-05-01T13:42:59Z")

</div>

> [@Gae58](#):
>
> ss/Users.css’ %}"\>

The first post refers to loading the css into the html file  
The second is what is displayed to me in the terminal

---

<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:** [May 1, 2024, 1:50pm UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/10 "2024-05-01T13:50:12Z")

</div>

Yes, and they don’t match.

You’re trying to reference a file name that doesn’t appears to exist.

You have not shown that you have a `Users/css` directory with a file named `Users.css`.

---

<div class="post-metadata">

**Author:** ![Gae58](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/gae58/32/18215_2.png) [@Gae58](https://forum.djangoproject.com/u/Gae58)\
**Post date:** [May 1, 2024, 3:01pm UTC](https://forum.djangoproject.com/t/static-how-to-use-with-another-app/30671/11 "2024-05-01T15:01:36Z")

</div>

Excuse me in Italian I have Users.css which corresponds to Users.css in English

I don’t know why but it works now  
Thanks for supporting me
