Changes between Version 1 and Version 2 of Ticket #24150


Ignore:
Timestamp:
Jan 13, 2015, 5:09:50 PM (9 years ago)
Author:
Aryeh Hillman
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24150 – Description

    v1 v2  
    4848
    4949The command instead uses the settings specified at the shell variable {{{DJANGO_SETTINGS_MODULE}}} instead of the dynamic settings. Kind of pesky to have to create a separate settings file to get control of this sort of thing.
     50
     51Could also be part of a larger problem -- that collectstatic cannot (easily) be used without the {{{ManagementUtility}}} command. For example:
     52
     53{{{
     54from django.conf import settings
     55from django.core.management import ManagementUtility
     56
     57m = ManagementUtility(['', 'collectstatic'])
     58collectstatic = m.fetch_command('collectstatic')
     59}}}
     60
     61returns an error:
     62
     63{{{
     64In [70]: collectstatic.collect()
     65---------------------------------------------------------------------------
     66AttributeError                            Traceback (most recent call last)
     67<ipython-input-70-d17fba11a87b> in <module>()
     68----> 1 collectstatic.collect()
     69
     70/.../python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.pyc in collect(self)
     71     83         Split off from handle_noargs() to facilitate testing.
     72     84         """
     73---> 85         if self.symlink and not self.local:
     74     86             raise CommandError("Can't symlink to a remote destination.")
     75     87
     76
     77AttributeError: 'Command' object has no attribute 'symlink'
     78}}}
Back to Top