Tag: [:pt]pasta statica[:]

STATIC folder on django-rest is not on project.

If you are using django rest_framework and realize your page is not showing some UI content, like html, css and javascript. If Django rest_framwork is showing only text, mabe it’s because its missing static folder on django.

django rest_framwork sem formatação

Add on your settings.py file, “project folder\settings.py”, (at end of file), and put this configurations.

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

After add this configuration, save your file and then run the command.

python manage.py collectstatic

At do this steps you will realize your folder will be created.

Palavras Chave:

Django não exibe CSS; Django não exibe conteúdo HTML.