Ticket #15094: staticfiles_dirs_to_tuple.diff
File staticfiles_dirs_to_tuple.diff, 839 bytes (added by , 14 years ago) |
---|
-
django/contrib/staticfiles/finders.py
47 47 self.storages = SortedDict() 48 48 # Set of locations with static files 49 49 self.locations = set() 50 for root in settings.STATICFILES_DIRS: 50 51 # staticfiles_dirs should be converted into tuple if mistakenly 52 # entered as string (i.e. user forgot the comma) 53 staticfiles_dirs = (settings.STATICFILES_DIRS,) if type( 54 settings.STATICFILES_DIRS) == str else settings.STATICFILES_DIRS 55 56 for root in staticfiles_dirs: 51 57 if isinstance(root, (list, tuple)): 52 58 prefix, root = root 53 59 else: