使用管道......我订购
python photogram/manage.py collectstatic
和
You have requested to collect static files at the destination
location as specified in your settings:
/Users/hanminsoo/Documents/photogram/photogram/photogram/photogram/photogram/dist/static
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel:
我点“是”
Traceback (most recent call last):
File "photogram/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/django/core/management/__init__.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/raven/contrib/django/management/__init__.py", line 41, in new_execute
return original_func(self, *args, **kwargs)
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 176, in handle
collected = self.collect()
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 98, in collect
for path, storage in finder.list(self.ignore_patterns):
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/django/contrib/staticfiles/finders.py", line 112, in list
for path in utils.get_files(storage, ignore_patterns):
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/django/contrib/staticfiles/utils.py", line 28, in get_files
directories, files = storage.listdir(location)
File "/Users/hanminsoo/.pyenv/versions/photogram/lib/python3.5/site-packages/django/core/files/storage.py", line 299, in listdir
for entry in os.listdir(path):
FileNotFoundError: [Errno 2] No such file or directory: '/Users/hanminsoo/Documents/photogram/photogram/photogram/photogram/photogram/settings/static'
Sentry is attempting to send 2 pending error messages
Waiting up to 10 seconds
Press Ctrl-C to quit
我不知道我的问题是什么...
这是我的代码...(photogram/settings/static.py)
import os
from django.contrib.staticfiles.storage import CachedFilesMixin, ManifestFilesMixin
from .base import PROJECT_ROOT_DIR
from .base import BASE_DIR
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(PROJECT_ROOT_DIR, "dist", "static")
MEDIA_ROOT = os.path.join(PROJECT_ROOT_DIR, "dist", "media")
STATICFILES_DIRS = [
os.path.join(os.path.join(BASE_DIR, "static")),
]
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'pipeline.finders.PipelineFinder',
)
PIPELINE = {
'STYLESHEETS': {
'application': {
'source_filenames': (
'css/*.css',
),
'output_filename': 'css/photogram.css',
},
},
'JAVASCRIPT': {
}
}
settings.BASE_DIR
'/Users/hanminsoo/Documents/photogram/photogram/photogram/photogram/photogram/settings'settings.STATIC_ROOT '/Users/hanminsoo/Documents/photogram/photogram/photogram/photogram/photogram/static'
settings.PROJECT_ROOT_DIR '/Users/hanminsoo/Documents/photogram/photogram/photogram/photogram/photogram'
settings.STATICFILES_DIRS ['/Users/hanminsoo/Documents/photogram/photogram/photogram/photogram/photogram/settings/static']
请帮我。