Translation of UI (german and english)
Bugfix for feeds
- removed categories related and up
- load new books now working
- category random now working
login page is free of non accessible elements
boolean custom column is vivible in UI
books with only with certain languages can be shown
book shelfs can be deleted from UI
Anonymous user view is more resticted
Added browse of series in sidebar
Dependencys in vendor folder are updated to newer versions (licencs files are now present)
Bugfix editing Authors names
Made upload on windows working
This commit is contained in:
Vendored
+26
-3
@@ -16,14 +16,21 @@
|
||||
|
||||
This is used by `flask.ext`.
|
||||
|
||||
:copyright: (c) 2011 by Armin Ronacher.
|
||||
:copyright: (c) 2015 by Armin Ronacher.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
import warnings
|
||||
from ._compat import reraise
|
||||
|
||||
|
||||
class ExtDeprecationWarning(DeprecationWarning):
|
||||
pass
|
||||
|
||||
warnings.simplefilter('always', ExtDeprecationWarning)
|
||||
|
||||
|
||||
class ExtensionImporter(object):
|
||||
"""This importer redirects imports from this submodule to other locations.
|
||||
This makes it possible to transition from the old flaskext.name to the
|
||||
@@ -49,13 +56,21 @@ class ExtensionImporter(object):
|
||||
sys.meta_path[:] = [x for x in sys.meta_path if self != x] + [self]
|
||||
|
||||
def find_module(self, fullname, path=None):
|
||||
if fullname.startswith(self.prefix):
|
||||
if fullname.startswith(self.prefix) and \
|
||||
fullname != 'flask.ext.ExtDeprecationWarning':
|
||||
return self
|
||||
|
||||
def load_module(self, fullname):
|
||||
if fullname in sys.modules:
|
||||
return sys.modules[fullname]
|
||||
|
||||
modname = fullname.split('.', self.prefix_cutoff)[self.prefix_cutoff]
|
||||
|
||||
warnings.warn(
|
||||
"Importing flask.ext.{x} is deprecated, use flask_{x} instead."
|
||||
.format(x=modname), ExtDeprecationWarning
|
||||
)
|
||||
|
||||
for path in self.module_choices:
|
||||
realname = path % modname
|
||||
try:
|
||||
@@ -83,6 +98,14 @@ class ExtensionImporter(object):
|
||||
module = sys.modules[fullname] = sys.modules[realname]
|
||||
if '.' not in modname:
|
||||
setattr(sys.modules[self.wrapper_module], modname, module)
|
||||
|
||||
if realname.startswith('flaskext.'):
|
||||
warnings.warn(
|
||||
"Detected extension named flaskext.{x}, please rename it "
|
||||
"to flask_{x}. The old form is deprecated."
|
||||
.format(x=modname), ExtDeprecationWarning
|
||||
)
|
||||
|
||||
return module
|
||||
raise ImportError('No module named %s' % fullname)
|
||||
|
||||
@@ -111,7 +134,7 @@ class ExtensionImporter(object):
|
||||
if module_name == important_module:
|
||||
return True
|
||||
|
||||
# Some python versions will will clean up modules so early that the
|
||||
# Some python versions will clean up modules so early that the
|
||||
# module name at that point is no longer set. Try guessing from
|
||||
# the filename then.
|
||||
filename = os.path.abspath(tb.tb_frame.f_code.co_filename)
|
||||
|
||||
Reference in New Issue
Block a user