Skip to content
Snippets Groups Projects
Unverified Commit d085b1e9 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Run autopep8.

parent 2a23688a
No related branches found
No related tags found
No related merge requests found
...@@ -12,5 +12,6 @@ def teacher_required(function=None): ...@@ -12,5 +12,6 @@ def teacher_required(function=None):
def admin_required(function=None): def admin_required(function=None):
actual_decorator = user_passes_test(lambda u: u.is_active and u.is_superuser) actual_decorator = user_passes_test(
lambda u: u.is_active and u.is_superuser)
return actual_decorator(function) return actual_decorator(function)
...@@ -125,7 +125,8 @@ LOGOUT_REDIRECT_URL = 'index' ...@@ -125,7 +125,8 @@ LOGOUT_REDIRECT_URL = 'index'
STATIC_ROOT = LocalSetting() STATIC_ROOT = LocalSetting()
MEDIA_ROOT = LocalSetting() MEDIA_ROOT = LocalSetting()
FONT_AWESOME = {'url': LocalSetting(default="/javascript/font-awesome/css/font-awesome.min.css")} FONT_AWESOME = {'url': LocalSetting(
default="/javascript/font-awesome/css/font-awesome.min.css")}
BOOTSTRAP4 = { BOOTSTRAP4 = {
"css_url": LocalSetting(default="/javascript/bootstrap4/css/bootstrap.min.css"), "css_url": LocalSetting(default="/javascript/bootstrap4/css/bootstrap.min.css"),
...@@ -136,10 +137,10 @@ BOOTSTRAP4 = { ...@@ -136,10 +137,10 @@ BOOTSTRAP4 = {
} }
ANY_JS = { ANY_JS = {
'DataTables': { 'DataTables': {
'css_url': LocalSetting(default="/javascript/jquery-datatables/css/dataTables.bootstrap4.min.css"), 'css_url': LocalSetting(default="/javascript/jquery-datatables/css/dataTables.bootstrap4.min.css"),
'js_url': LocalSetting("/javascript/jquery-datatables/dataTables.bootstrap4.min.js") 'js_url': LocalSetting("/javascript/jquery-datatables/dataTables.bootstrap4.min.js")
} }
} }
......
...@@ -14,11 +14,13 @@ urlpatterns = [ ...@@ -14,11 +14,13 @@ urlpatterns = [
# Serve javascript-common if in development # Serve javascript-common if in development
if settings.DEBUG: if settings.DEBUG:
urlpatterns += static('/javascript/', document_root='/usr/share/javascript/') urlpatterns += static('/javascript/',
document_root='/usr/share/javascript/')
# Automatically mount URLs from all installed BiscuIT apps # Automatically mount URLs from all installed BiscuIT apps
for app_config in apps.app_configs.values(): for app_config in apps.app_configs.values():
if not app_config.name.startswith('biscuit.apps.'): if not app_config.name.startswith('biscuit.apps.'):
continue continue
urlpatterns.append(path('app/%s/' % app_config.label, include('%s.urls' % app_config.name))) urlpatterns.append(path('app/%s/' % app_config.label,
include('%s.urls' % app_config.name)))
import pkgutil import pkgutil
from typing import Sequence from typing import Sequence
def get_app_packages() -> Sequence: def get_app_packages() -> Sequence:
""" Find all packages within the biscuit.apps namespace. """ """ Find all packages within the biscuit.apps namespace. """
...@@ -10,6 +11,7 @@ def get_app_packages() -> Sequence: ...@@ -10,6 +11,7 @@ def get_app_packages() -> Sequence:
except ImportError: except ImportError:
return [] return []
pkgs = ['biscuit.apps.%s' % i[1] for i in pkgutil.iter_modules(biscuit.apps.__path__)] pkgs = ['biscuit.apps.%s' % i[1]
for i in pkgutil.iter_modules(biscuit.apps.__path__)]
return pkgs return pkgs
...@@ -9,27 +9,27 @@ setup( ...@@ -9,27 +9,27 @@ setup(
author="Teckids e.V.", author="Teckids e.V.",
author_email="verein@teckids.org", author_email="verein@teckids.org",
packages=[ packages=[
'biscuit.core' 'biscuit.core'
], ],
namespace_packages=[ namespace_packages=[
'biscuit', 'biscuit',
], ],
include_package_data=True, include_package_data=True,
install_requires=[ install_requires=[
'Django >= 2.0', 'Django >= 2.0',
'django-any-js', 'django-any-js',
'django-bootstrap4', 'django-bootstrap4',
'django-fa', 'django-fa',
'django-easy-audit', 'django-easy-audit',
'django-local-settings', 'django-local-settings',
'django-simple-menu', 'django-simple-menu',
], ],
classifiers=[ classifiers=[
"Development Status :: 3 - Alpha", "Development Status :: 3 - Alpha",
"Environment :: Web Environment", "Environment :: Web Environment",
"Intended Audience :: Education", "Intended Audience :: Education",
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Topic :: Education", "Topic :: Education",
], ],
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment