Программа предназначена для ведения кабельного (кроссового) журнала в телефонной сети
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.5KB

  1. #!/usr/bin/env python
  2. # This file is part of Cregister - cross register management software
  3. # Copyright (C) 2017 Golikov Ivan <ivnglkv@eml.cc>
  4. #
  5. # Cregister is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # Cregister is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with Cregister. If not, see <http://www.gnu.org/licenses/>.
  17. import os
  18. import sys
  19. if __name__ == "__main__":
  20. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cross_journals.settings")
  21. try:
  22. from django.core.management import execute_from_command_line
  23. except ImportError:
  24. # The above import may fail for some other reason. Ensure that the
  25. # issue is really that Django is missing to avoid masking other
  26. # exceptions on Python 2.
  27. try:
  28. import django
  29. except ImportError:
  30. raise ImportError(
  31. "Couldn't import Django. Are you sure it's installed and "
  32. "available on your PYTHONPATH environment variable? Did you "
  33. "forget to activate a virtual environment?"
  34. )
  35. raise
  36. execute_from_command_line(sys.argv)