setup.py imports cas_server/__init__.py. Django might not be installed

This commit is contained in:
Valentin Samir 2022-10-17 19:46:54 +02:00
parent 0f2281f2ea
commit 2b767f3db5

View file

@ -9,11 +9,14 @@
#
# (c) 2015-2016 Valentin Samir
"""A django CAS server application"""
try:
import django
except ModuleNotFoundError:
django = None
#: version of the application
VERSION = '1.3.1'
VERSION = '2.0.0'
if django.VERSION < (3, 2):
if django is None or django.VERSION < (3, 2):
#: path the the application configuration class
default_app_config = 'cas_server.apps.CasAppConfig'