Running collectstatic is modifying my static files

I created a django project. I created a project directory called setup and included another directory with all the static files I use. However, when it collects using python manage.py collectstatic, it creates the general directory but it changes the order and organization of the files and even some are not collected and are missing. The setup/static folder from where I collect it is organized like this: insert the image description here:

Setup
- Static
     -> Assets
         ->css
         ->img
         ->vendor
         ->js

and after collection the directory looks like this:

Static
     -> Admin
         ->css
         ->img
         ->fonts
         ->js

Even changing the reference in the html pages it does not find the files. Is it correct for this to happen? If not, what is going wrong? How to fix?

Below is the configuration in settings.py:

STATIC_URL = "static/"  

STATICFILES_DIR = [     os.path.join(BASE_DIR, 'setup/static') ]  

STATIC_ROOT = os.path.join(BASE_DIR, 'static') 

STATICFILES_FINDERS = [     'django.contrib.staticfiles.finders.FileSystemFinder',     'django.contrib.staticfiles.finders.AppDirectoriesFinder', ]

Your STATIC_ROOT should be separate from, and external to, your project directory.

The purpose of collectstatic is to copy all the static files from your project, Django, and the third-party libraries into one directory structure to be served by your web server.

Thanks for the answer. In this case, the STATIC_ROOT folder is already separated from an external part. Should any other points be changed? Why were only some static file folders migrated?

I’m sorry. Then I don’t understand the directory layout you presented earlier.

Please show the full directory names here for your project and your static directory assets.

Also, that admin directory and the directories within it are from the Django admin app and not your project. Also, that directory name would be “admin”, not “Admin”.