i recently installed this on a django project i'm working on to do cleanups of my unused media files. I ran the cleanup_unused_media command with my virtualenv enabled and i got the following result. I tried it with
python manage.py cleanup_unused_media
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/dev/.virtualenvs/TestProject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/dev/.virtualenvs/TestProject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/dev/.virtualenvs/TestProject/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/dev/.virtualenvs/TestProject/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/home/dev/.virtualenvs/TestProject/local/lib/python2.7/site-packages/django_unused_media/management/commands/cleanup_unused_media.py", line 32, in handle
unused_media = get_unused_media(options.get('exclude') or [])
File "/home/dev/.virtualenvs/TestProject/local/lib/python2.7/site-packages/django_unused_media/cleanup.py", line 91, in get_unused_media
used_media = get_used_media()
File "/home/dev/.virtualenvs/TestProject/local/lib/python2.7/site-packages/django_unused_media/cleanup.py", line 43, in get_used_media
for f in _get_file_fields():
File "/home/dev/.virtualenvs/TestProject/local/lib/python2.7/site-packages/django_unused_media/cleanup.py", line 29, in _get_file_fields
for f in m._meta.get_fields():
AttributeError: 'Options' object has no attribute 'get_fields'
i tried running it with the option --noinput enabled but i got the following error
python manage.py cleanup_unused_media --noinput
Usage: manage.py cleanup_unused_media [options]
Clean unused media files which have no reference in models
manage.py: error: no such option: --noinput
Is there a missing option for this which is why it's not running? I've installed django_unused_media in my INSTALLED_APPS as well. Thanks.
hi
i recently installed this on a django project i'm working on to do cleanups of my unused media files. I ran the cleanup_unused_media command with my virtualenv enabled and i got the following result. I tried it with
i tried running it with the option --noinput enabled but i got the following error
Is there a missing option for this which is why it's not running? I've installed django_unused_media in my INSTALLED_APPS as well. Thanks.
Edit: Forgot to note that i'm using Django 1.7.