do not rely on pkg_resources (#46549)
gitea/authentic2-cut/pipeline/head This commit looks good
Details
gitea/authentic2-cut/pipeline/head This commit looks good
Details
This commit is contained in:
parent
fe54bd6692
commit
87585964f5
6
README
6
README
|
@ -33,7 +33,11 @@ the git hook.)
|
||||||
Settings
|
Settings
|
||||||
========
|
========
|
||||||
|
|
||||||
Nothing to say here.
|
Register the plugin in your settings file.
|
||||||
|
|
||||||
|
INSTALLED_APPS += ('sorl.thumbnail', 'authentic2_cut',)
|
||||||
|
TENANT_APPS += ('sorl.thumbnail', 'authentic2_cut',)
|
||||||
|
MIDDLEWARE += ('authentic2_cut.middlewares.CUTMiddleware',)
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -12,6 +12,8 @@ DATABASES = {
|
||||||
'ENGINE': 'django.db.backends.dummy',
|
'ENGINE': 'django.db.backends.dummy',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
INSTALLED_APPS += ('authentic2_cut',)
|
||||||
|
MIDDLEWARE += ('authentic2_cut.middlewares.CUTMiddleware',)
|
||||||
EOF
|
EOF
|
||||||
TEMPFILE=`mktemp`
|
TEMPFILE=`mktemp`
|
||||||
trap "rm -f ${TEMPFILE} ${CHECK_MIGRATIONS_SETTINGS}" EXIT
|
trap "rm -f ${TEMPFILE} ${CHECK_MIGRATIONS_SETTINGS}" EXIT
|
||||||
|
|
5
setup.py
5
setup.py
|
@ -110,11 +110,6 @@ setup(
|
||||||
'Pillow',
|
'Pillow',
|
||||||
'sorl-thumbnail',
|
'sorl-thumbnail',
|
||||||
],
|
],
|
||||||
entry_points={
|
|
||||||
'authentic2.plugin': [
|
|
||||||
'authentic2-cut = authentic2_cut:Plugin',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
cmdclass={
|
cmdclass={
|
||||||
'build': build,
|
'build': build,
|
||||||
'install_lib': install_lib,
|
'install_lib': install_lib,
|
||||||
|
|
|
@ -16,22 +16,3 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
default_app_config = 'authentic2_cut.apps.AppConfig'
|
default_app_config = 'authentic2_cut.apps.AppConfig'
|
||||||
|
|
||||||
|
|
||||||
class Plugin:
|
|
||||||
def get_before_urls(self):
|
|
||||||
from . import urls
|
|
||||||
|
|
||||||
return urls.urlpatterns
|
|
||||||
|
|
||||||
def get_apps(self):
|
|
||||||
return ['sorl.thumbnail', __name__]
|
|
||||||
|
|
||||||
def get_authentication_backends(self):
|
|
||||||
return []
|
|
||||||
|
|
||||||
def get_auth_frontends(self):
|
|
||||||
return []
|
|
||||||
|
|
||||||
def get_after_middleware(self):
|
|
||||||
return ['authentic2_cut.middlewares.CUTMiddleware']
|
|
||||||
|
|
|
@ -790,3 +790,13 @@ class AppConfig(django.apps.AppConfig):
|
||||||
'href': reverse_lazy('cut-manager-user-validation'),
|
'href': reverse_lazy('cut-manager-user-validation'),
|
||||||
'class': 'icon-management',
|
'class': 'icon-management',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def get_a2_plugin(self):
|
||||||
|
return Plugin()
|
||||||
|
|
||||||
|
|
||||||
|
class Plugin:
|
||||||
|
def get_before_urls(self):
|
||||||
|
from . import urls
|
||||||
|
|
||||||
|
return urls.urlpatterns
|
||||||
|
|
|
@ -20,3 +20,9 @@ A2_FC_CLIENT_SECRET = ''
|
||||||
|
|
||||||
# test hook handlers
|
# test hook handlers
|
||||||
A2_HOOKS_PROPAGATE_EXCEPTIONS = True
|
A2_HOOKS_PROPAGATE_EXCEPTIONS = True
|
||||||
|
|
||||||
|
INSTALLED_APPS += (
|
||||||
|
'sorl.thumbnail',
|
||||||
|
'authentic2_cut',
|
||||||
|
)
|
||||||
|
MIDDLEWARE += ('authentic2_cut.middlewares.CUTMiddleware',)
|
||||||
|
|
Loading…
Reference in New Issue