Add a -v0 option to findstatic to allow simple output #691

Closed
wants to merge 2 commits into from

3 participants

@mattrobenolt

I've also updated documentation to better reflect the output, and make the commands end in a newline character to be more friendly.

@jezdez
Django member

LGTM, please open a Trac ticket though in case you haven't yet.

@claudep claudep and 1 other commented on an outdated diff Feb 1, 2013
django/core/management/base.py
@@ -355,7 +355,7 @@ def handle(self, *labels, **options):
label_output = self.handle_label(label, **options)
if label_output:
output.append(label_output)
- return '\n'.join(output)
+ return '\n'.join(output) + '\n'
def handle_label(self, label, **options):
"""
@claudep
Django member
claudep added a note Feb 1, 2013

The '\n' endings should not be necessary, as the OutputWrapper class automatically adds it (added in 1.5). Or did I miss the point?

Oh, if they were added in 1.5, I'll remove them. I applied this patch into my 1.4 when I tested on a project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@claudep claudep commented on an outdated diff Feb 1, 2013
docs/ref/contrib/staticfiles.txt
This is a debugging aid; it'll show you exactly which static file will be
collected for a given path.
+By passing ``-v0``, we can suppress the extra output and just get the path names.
+
+ $ python manage.py findstatic css/base.css -v0
+ /home/special.polls.com/core/static/css/base.css
+ /home/polls.com/core/static/css/base.css
+
@claudep
Django member
claudep added a note Feb 1, 2013

I'd rather use the long option names in the documentation (--verbosity).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mattrobenolt

@claudep How does this look?

@claudep
Django member

Thanks, committed in 393c268

@claudep claudep closed this Feb 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment