| | 50 | |
| | 51 | Could also be part of a larger problem -- that collectstatic cannot (easily) be used without the {{{ManagementUtility}}} command. For example: |
| | 52 | |
| | 53 | {{{ |
| | 54 | from django.conf import settings |
| | 55 | from django.core.management import ManagementUtility |
| | 56 | |
| | 57 | m = ManagementUtility(['', 'collectstatic']) |
| | 58 | collectstatic = m.fetch_command('collectstatic') |
| | 59 | }}} |
| | 60 | |
| | 61 | returns an error: |
| | 62 | |
| | 63 | {{{ |
| | 64 | In [70]: collectstatic.collect() |
| | 65 | --------------------------------------------------------------------------- |
| | 66 | AttributeError 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 | |
| | 77 | AttributeError: 'Command' object has no attribute 'symlink' |
| | 78 | }}} |