You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running manage.py admin_views_install_templates, template_dirs is a set which cannot be indexed by [].
$ ./manage.py admin_views_install_templates
Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "..../python2.7/site-packages/django/core/management/init.py", line 399, in execute_from_command_line
utility.execute()
File "..../python2.7/site-packages/django/core/management/init.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "..../python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(_args, *_options.dict)
File "..../python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(_args, *_options)
File "..../python2.7/site-packages/admin_views/management/commands/admin_views_install_templates.py", line 23, in handle
dest_dir = os.path.join(template_dirs[0], 'admin/')
TypeError: 'set' object does not support indexing
Since this line is invoked in case when there is only one template directory, you can safely call:
When running manage.py admin_views_install_templates, template_dirs is a set which cannot be indexed by [].
$ ./manage.py admin_views_install_templates
Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "..../python2.7/site-packages/django/core/management/init.py", line 399, in execute_from_command_line
utility.execute()
File "..../python2.7/site-packages/django/core/management/init.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "..../python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(_args, *_options.dict)
File "..../python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(_args, *_options)
File "..../python2.7/site-packages/admin_views/management/commands/admin_views_install_templates.py", line 23, in handle
dest_dir = os.path.join(template_dirs[0], 'admin/')
TypeError: 'set' object does not support indexing
Since this line is invoked in case when there is only one template directory, you can safely call:
dest_dir = os.path.join(template_dirs.pop(), 'admin/')
instead.
The text was updated successfully, but these errors were encountered: