python3Packages.django-login-required-middleware: init at 0.9.0

This commit is contained in:
Jonas Heinrich 2023-01-20 16:01:45 +01:00 committed by Yt
parent 94ea920df9
commit 6405c52551
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, django
, djangorestframework
, fetchFromGitHub
, python
, setuptools-scm
}:
buildPythonPackage rec {
pname = "django-login-required-middleware";
version = "0.9.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "CleitonDeLima";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-WFQ/JvKh6gkUxPV27QBd2TzwFS8hfQGmcTInTnmh6iA=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
django
];
checkInputs = [
djangorestframework
];
pythonImportsCheck = [
"login_required"
];
checkPhase = ''
${python.interpreter} -m django test --settings tests.settings
'';
meta = with lib; {
description = "Requires login to all requests through middleware in Django";
homepage = "https://github.com/CleitonDeLima/django-login-required-middleware";
license = licenses.mit;
maintainers = with maintainers; [ onny ];
};
}

View File

@ -2580,6 +2580,8 @@ self: super: with self; {
django-logentry-admin = callPackage ../development/python-modules/django-logentry-admin { }; django-logentry-admin = callPackage ../development/python-modules/django-logentry-admin { };
django-login-required-middleware = callPackage ../development/python-modules/django-login-required-middleware { };
django-mailman3 = callPackage ../development/python-modules/django-mailman3 { }; django-mailman3 = callPackage ../development/python-modules/django-mailman3 { };
django-model-utils = callPackage ../development/python-modules/django-model-utils { }; django-model-utils = callPackage ../development/python-modules/django-model-utils { };