Skip to content

Commit

Permalink
PEP8 (except line length)
Browse files Browse the repository at this point in the history
  • Loading branch information
vdboor committed Feb 6, 2018
1 parent 495791c commit 670b595
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
7 changes: 5 additions & 2 deletions makemessages.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,26 @@
from django.conf import settings
from django.core.management import call_command


def main():
if not settings.configured:
module_root = path.dirname(path.realpath(__file__))

settings.configure(
DEBUG = False,
INSTALLED_APPS = (
DEBUG=False,
INSTALLED_APPS=(
'private_storage',
),
)

django.setup()
makemessages()


def makemessages():
os.chdir('private_storage')
call_command('makemessages', locale=('en', 'nl'), verbosity=1)


if __name__ == '__main__':
main()
1 change: 0 additions & 1 deletion private_storage/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
logger = logging.getLogger(__name__)



class PrivateFileField(models.FileField):
"""
Filefield with private storage, custom filename and size checks.
Expand Down
1 change: 1 addition & 0 deletions private_storage/storage/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class PrivateFileSystemStorage(FileSystemStorage):
Interface to the Django storage system,
storing the files in a private folder.
"""

def __init__(self, location=None, base_url=None, **kwargs):
if location is None:
location = appconfig.PRIVATE_STORAGE_ROOT
Expand Down
11 changes: 6 additions & 5 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
sys.path.insert(0, path.join(module_root, 'example'))

settings.configure(
DEBUG = False, # will be False anyway by DjangoTestRunner.
DATABASES = {
DEBUG=False, # will be False anyway by DjangoTestRunner.
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:'
}
},
INSTALLED_APPS = (
INSTALLED_APPS=(
'private_storage',
),
TEST_RUNNER = 'django.test.runner.DiscoverRunner',
TEMPLATES = [
TEST_RUNNER='django.test.runner.DiscoverRunner',
TEMPLATES=[
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': (),
Expand Down Expand Up @@ -49,5 +49,6 @@ def runtests():
argv = sys.argv[:1] + ['test', 'private_storage'] + sys.argv[1:]
execute_from_command_line(argv)


if __name__ == '__main__':
runtests()

0 comments on commit 670b595

Please sign in to comment.