Giter Site home page Giter Site logo

Comments (4)

natkaida avatar natkaida commented on June 20, 2024

Настройки для разработки (не для продакшена) в config/settings.py :

STATIC_URL = '/static/'

STATICFILES_DIRS = [
    BASE_DIR / 'static'
]

MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'

from blogit.

SergeyMi37 avatar SergeyMi37 commented on June 20, 2024

Не помогло
(venv) student@st:~/App/blogit$ python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/student/App/blogit/venv/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/home/student/App/blogit/venv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 134, in inner_run
self.check(display_num_errors=True)
File "/home/student/App/blogit/venv/lib/python3.8/site-packages/django/core/management/base.py", line 546, in check
raise SystemCheckError(msg)
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting.

System check identified 1 issue (0 silenced).

from blogit.

SergeyMi37 avatar SergeyMi37 commented on June 20, 2024

Помогло так.
STATIC_ROOT = BASE_DIR / "staticfiles"

from blogit.

XJIeb avatar XJIeb commented on June 20, 2024

#STATIC_ROOT = os.path.join(BASE_DIR, 'collected_static/')

STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]

не знаю стоит ли писать но вдруг, я python manage.py collectstatic писал еще

А так проект стоящий, понравилась реализация. Красиво сделано

from blogit.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.