1
0
mirror of https://github.com/django/django.git synced 2025-10-27 23:56:08 +00:00

More attacking E302 violators

This commit is contained in:
Alex Gaynor
2013-11-02 13:12:09 -07:00
parent 65c4ac3b24
commit 7548aa8ffd
150 changed files with 433 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ from django.utils.encoding import force_text
from django.contrib.staticfiles import finders
class Command(LabelCommand):
help = "Finds the absolute paths for the given static file(s)."
args = "[file ...]"

View File

@@ -5,6 +5,7 @@ from django.core.management.commands.runserver import Command as RunserverComman
from django.contrib.staticfiles.handlers import StaticFilesHandler
class Command(RunserverCommand):
option_list = RunserverCommand.option_list + (
make_option('--nostatic', action="store_false", dest='use_static_handler', default=True,

View File

@@ -3,6 +3,7 @@ import fnmatch
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
def matches_patterns(path, patterns=None):
"""
Return True or False depending on whether the ``path`` should be
@@ -15,6 +16,7 @@ def matches_patterns(path, patterns=None):
return True
return False
def get_files(storage, ignore_patterns=None, location=''):
"""
Recursively walk the storage directories yielding the paths
@@ -37,6 +39,7 @@ def get_files(storage, ignore_patterns=None, location=''):
for fn in get_files(storage, ignore_patterns, dir):
yield fn
def check_settings(base_url=None):
"""
Checks if the staticfiles settings have sane values.

View File

@@ -13,6 +13,7 @@ from django.views import static
from django.contrib.staticfiles import finders
def serve(request, path, insecure=False, **kwargs):
"""
Serve static files below a given point in the directory structure or