Tell the newcomer what is being done wrong? I create an absolutely new django project on pycharm, call the manage.py console, and there is an error:

Error fetching command 'collectstatic': You are not using the STATIC_ROOT setting to a filesystem path. Command 'collectstatic' skipped

In the settings.py file from static only static_url , is this normal? Previously, if I'm not mistaken, something else was

    1 answer 1

     # https://docs.djangoproject.com/en/1.9/howto/static-files/ STATIC_URL = '/static/' MEDIA_URL = '/media/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') MEDIA_ROOT = os.path.join(BASE_DIR, 'media') 

    The static and media folders must exist. Now in the django settings the minimum necessary parameters are therefore needed to be added independently.

    The next question is likely to be static return. in 'context_processors': not enough

     'django.template.context_processors.static', 

    without this, some applications will not work normally, for example, the ckeditor (cked) widget

    Next, we give statics from the media folder, from static when developing itself will be given. In urls.py

     from django.conf import settings from django.conf.urls.static import static 

    and below urlpatterns add

     if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 

    The issue of placing on the server in a bunch of apache discussed here.

    The ready working apache config was delivered separately on github, you need to substitute only the path, the name of the project and the name of the domain. Simplified to the maximum due to Define (assigning a variable so as not to prescribe everything manually many times)

    You read the documentation, it is not clear how to do anything, although everything is very simple when there is a blank. The official documentation is not finalized.