diff --git a/pyproject.toml b/pyproject.toml index 5d7bf33..5bcb6d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,54 @@ -[tool.isort] -profile = "black" +[build-system] +requires = ["setuptools >= 80.9.0", "setuptools_scm >= 8.3.1"] +build-backend = "setuptools.build_meta" + +[project] +name = "timetable-fri" +description = "UL FRI Timetable API" +authors = [{ name = "Gregor Jerše", email = "gregor@jerse.info" }, { name = "Gašper Fele-Žorž", email = "polz@not.si" }] +dynamic = ["version"] +readme = "README.md" +license = "GPL-3.0-or-later" +requires-python = ">=3.13, <3.14" +keywords = ["timetabling", "FRI", "university", "timetable", "api", "django", "rest-framework"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Framework :: Django :: 5.2", + "Environment :: Console", + "Environment :: Web Environment", + "Intended Audience :: Education", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Topic :: Software Development :: Libraries :: Python Modules", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.13", +] +dependencies = [ + "Django ~= 5.2.7", + "djangorestframework ~= 3.16.1", + "django-filter ~= 25.2", + "dj-rest-auth ~= 7.0.1", + "django-cors-headers ~= 4.9.0", + "python-ldap ~= 3.4.5", + "requests ~= 2.32.5", + "django-auth-ldap ~= 5.2.0", + "django-impersonate ~= 1.9.5", + "django-import-export ~= 4.3.12", + "pytz ~= 2025.2", + "icalendar ~= 6.3.1", + "palettable ~= 3.3.3", +] +[project.optional-dependencies] +postgres = ["psycopg[binary] ~= 3.2.12"] +docs = ["sphinx", "sphinx-pyproject"] +package = ["twine", "check-manifest", "build"] +test = ["ruff~=0.14.2", "pytest-cov"] +devel = ["ipython", "types-tqdm"] +[project.urls] +repository = "https://github.com/ul-fri/urnik" +documentation = "https://github.com/ul-fri/urnik" + +[tool.setuptools_scm] + diff --git a/exchange/__init__.py b/src/exchange/__init__.py similarity index 100% rename from exchange/__init__.py rename to src/exchange/__init__.py diff --git a/exchange/admin.py b/src/exchange/admin.py similarity index 100% rename from exchange/admin.py rename to src/exchange/admin.py diff --git a/exchange/apps.py b/src/exchange/apps.py similarity index 100% rename from exchange/apps.py rename to src/exchange/apps.py diff --git a/exchange/controllers.py b/src/exchange/controllers.py similarity index 100% rename from exchange/controllers.py rename to src/exchange/controllers.py diff --git a/exchange/forms.py b/src/exchange/forms.py similarity index 100% rename from exchange/forms.py rename to src/exchange/forms.py diff --git a/exchange/management/__init__.py b/src/exchange/management/__init__.py similarity index 100% rename from exchange/management/__init__.py rename to src/exchange/management/__init__.py diff --git a/exchange/management/commands/__init__.py b/src/exchange/management/commands/__init__.py similarity index 100% rename from exchange/management/commands/__init__.py rename to src/exchange/management/commands/__init__.py diff --git a/exchange/migrations/0001_initial.py b/src/exchange/migrations/0001_initial.py similarity index 100% rename from exchange/migrations/0001_initial.py rename to src/exchange/migrations/0001_initial.py diff --git a/exchange/migrations/__init__.py b/src/exchange/migrations/__init__.py similarity index 100% rename from exchange/migrations/__init__.py rename to src/exchange/migrations/__init__.py diff --git a/exchange/models.py b/src/exchange/models.py similarity index 100% rename from exchange/models.py rename to src/exchange/models.py diff --git a/exchange/static/css/exchange.css b/src/exchange/static/css/exchange.css similarity index 100% rename from exchange/static/css/exchange.css rename to src/exchange/static/css/exchange.css diff --git a/exchange/templates/exchange/exchange_create.html b/src/exchange/templates/exchange/exchange_create.html similarity index 100% rename from exchange/templates/exchange/exchange_create.html rename to src/exchange/templates/exchange/exchange_create.html diff --git a/exchange/templates/exchange/exchange_create_help.html b/src/exchange/templates/exchange/exchange_create_help.html similarity index 100% rename from exchange/templates/exchange/exchange_create_help.html rename to src/exchange/templates/exchange/exchange_create_help.html diff --git a/exchange/templates/exchange/exchange_create_result.html b/src/exchange/templates/exchange/exchange_create_result.html similarity index 100% rename from exchange/templates/exchange/exchange_create_result.html rename to src/exchange/templates/exchange/exchange_create_result.html diff --git a/exchange/templates/exchange/exchange_main.html b/src/exchange/templates/exchange/exchange_main.html similarity index 100% rename from exchange/templates/exchange/exchange_main.html rename to src/exchange/templates/exchange/exchange_main.html diff --git a/exchange/templates/exchange/student_main.html b/src/exchange/templates/exchange/student_main.html similarity index 100% rename from exchange/templates/exchange/student_main.html rename to src/exchange/templates/exchange/student_main.html diff --git a/exchange/templates/exchange/teacher_main.html b/src/exchange/templates/exchange/teacher_main.html similarity index 100% rename from exchange/templates/exchange/teacher_main.html rename to src/exchange/templates/exchange/teacher_main.html diff --git a/exchange/templates/exchange/teacher_subject_management.html b/src/exchange/templates/exchange/teacher_subject_management.html similarity index 100% rename from exchange/templates/exchange/teacher_subject_management.html rename to src/exchange/templates/exchange/teacher_subject_management.html diff --git a/exchange/templates/exchange/template_exchange_list.html b/src/exchange/templates/exchange/template_exchange_list.html similarity index 100% rename from exchange/templates/exchange/template_exchange_list.html rename to src/exchange/templates/exchange/template_exchange_list.html diff --git a/exchange/templatetags/__init__.py b/src/exchange/templatetags/__init__.py similarity index 100% rename from exchange/templatetags/__init__.py rename to src/exchange/templatetags/__init__.py diff --git a/exchange/templatetags/exchange_helpers.py b/src/exchange/templatetags/exchange_helpers.py similarity index 100% rename from exchange/templatetags/exchange_helpers.py rename to src/exchange/templatetags/exchange_helpers.py diff --git a/exchange/tests.py b/src/exchange/tests.py similarity index 100% rename from exchange/tests.py rename to src/exchange/tests.py diff --git a/exchange/urls.py b/src/exchange/urls.py similarity index 100% rename from exchange/urls.py rename to src/exchange/urls.py diff --git a/exchange/views.py b/src/exchange/views.py similarity index 100% rename from exchange/views.py rename to src/exchange/views.py diff --git a/frinajave/__init__.py b/src/frinajave/__init__.py similarity index 100% rename from frinajave/__init__.py rename to src/frinajave/__init__.py diff --git a/frinajave/admin.py b/src/frinajave/admin.py similarity index 100% rename from frinajave/admin.py rename to src/frinajave/admin.py diff --git a/frinajave/management/__init__.py b/src/frinajave/management/__init__.py similarity index 100% rename from frinajave/management/__init__.py rename to src/frinajave/management/__init__.py diff --git a/frinajave/management/commands/__init__.py b/src/frinajave/management/commands/__init__.py similarity index 100% rename from frinajave/management/commands/__init__.py rename to src/frinajave/management/commands/__init__.py diff --git a/frinajave/migrations/0001_initial.py b/src/frinajave/migrations/0001_initial.py similarity index 100% rename from frinajave/migrations/0001_initial.py rename to src/frinajave/migrations/0001_initial.py diff --git a/frinajave/migrations/__init__.py b/src/frinajave/migrations/__init__.py similarity index 100% rename from frinajave/migrations/__init__.py rename to src/frinajave/migrations/__init__.py diff --git a/frinajave/models.py b/src/frinajave/models.py similarity index 100% rename from frinajave/models.py rename to src/frinajave/models.py diff --git a/friprosveta/__init__.py b/src/friprosveta/__init__.py similarity index 100% rename from friprosveta/__init__.py rename to src/friprosveta/__init__.py diff --git a/friprosveta/admin.py b/src/friprosveta/admin.py similarity index 100% rename from friprosveta/admin.py rename to src/friprosveta/admin.py diff --git a/friprosveta/forms.py b/src/friprosveta/forms.py similarity index 100% rename from friprosveta/forms.py rename to src/friprosveta/forms.py diff --git a/friprosveta/locale/sl/LC_MESSAGES/django.mo b/src/friprosveta/locale/sl/LC_MESSAGES/django.mo similarity index 100% rename from friprosveta/locale/sl/LC_MESSAGES/django.mo rename to src/friprosveta/locale/sl/LC_MESSAGES/django.mo diff --git a/friprosveta/locale/sl/LC_MESSAGES/django.po b/src/friprosveta/locale/sl/LC_MESSAGES/django.po similarity index 100% rename from friprosveta/locale/sl/LC_MESSAGES/django.po rename to src/friprosveta/locale/sl/LC_MESSAGES/django.po diff --git a/friprosveta/management/__init__.py b/src/friprosveta/management/__init__.py similarity index 100% rename from friprosveta/management/__init__.py rename to src/friprosveta/management/__init__.py diff --git a/friprosveta/management/commands/__init__.py b/src/friprosveta/management/commands/__init__.py similarity index 100% rename from friprosveta/management/commands/__init__.py rename to src/friprosveta/management/commands/__init__.py diff --git a/friprosveta/management/commands/add_activity_tags.py b/src/friprosveta/management/commands/add_activity_tags.py similarity index 100% rename from friprosveta/management/commands/add_activity_tags.py rename to src/friprosveta/management/commands/add_activity_tags.py diff --git a/friprosveta/management/commands/add_default_subject_managers.py b/src/friprosveta/management/commands/add_default_subject_managers.py similarity index 100% rename from friprosveta/management/commands/add_default_subject_managers.py rename to src/friprosveta/management/commands/add_default_subject_managers.py diff --git a/friprosveta/management/commands/add_teacher_tags.py b/src/friprosveta/management/commands/add_teacher_tags.py similarity index 100% rename from friprosveta/management/commands/add_teacher_tags.py rename to src/friprosveta/management/commands/add_teacher_tags.py diff --git a/friprosveta/management/commands/add_user.py b/src/friprosveta/management/commands/add_user.py similarity index 100% rename from friprosveta/management/commands/add_user.py rename to src/friprosveta/management/commands/add_user.py diff --git a/friprosveta/management/commands/calculate_group_size_hints.py b/src/friprosveta/management/commands/calculate_group_size_hints.py similarity index 100% rename from friprosveta/management/commands/calculate_group_size_hints.py rename to src/friprosveta/management/commands/calculate_group_size_hints.py diff --git a/friprosveta/management/commands/change_teacher_code.py b/src/friprosveta/management/commands/change_teacher_code.py similarity index 100% rename from friprosveta/management/commands/change_teacher_code.py rename to src/friprosveta/management/commands/change_teacher_code.py diff --git a/friprosveta/management/commands/create_activities.py b/src/friprosveta/management/commands/create_activities.py similarity index 100% rename from friprosveta/management/commands/create_activities.py rename to src/friprosveta/management/commands/create_activities.py diff --git a/friprosveta/management/commands/create_realizations.py b/src/friprosveta/management/commands/create_realizations.py similarity index 100% rename from friprosveta/management/commands/create_realizations.py rename to src/friprosveta/management/commands/create_realizations.py diff --git a/friprosveta/management/commands/create_top_level_groups.py b/src/friprosveta/management/commands/create_top_level_groups.py similarity index 100% rename from friprosveta/management/commands/create_top_level_groups.py rename to src/friprosveta/management/commands/create_top_level_groups.py diff --git a/friprosveta/management/commands/crossections.py b/src/friprosveta/management/commands/crossections.py similarity index 100% rename from friprosveta/management/commands/crossections.py rename to src/friprosveta/management/commands/crossections.py diff --git a/friprosveta/management/commands/django2fet.py b/src/friprosveta/management/commands/django2fet.py similarity index 100% rename from friprosveta/management/commands/django2fet.py rename to src/friprosveta/management/commands/django2fet.py diff --git a/friprosveta/management/commands/export_student_groups.py b/src/friprosveta/management/commands/export_student_groups.py similarity index 100% rename from friprosveta/management/commands/export_student_groups.py rename to src/friprosveta/management/commands/export_student_groups.py diff --git a/friprosveta/management/commands/fet2django.py b/src/friprosveta/management/commands/fet2django.py similarity index 100% rename from friprosveta/management/commands/fet2django.py rename to src/friprosveta/management/commands/fet2django.py diff --git a/friprosveta/management/commands/fetcsv2django.py b/src/friprosveta/management/commands/fetcsv2django.py similarity index 100% rename from friprosveta/management/commands/fetcsv2django.py rename to src/friprosveta/management/commands/fetcsv2django.py diff --git a/friprosveta/management/commands/fill_groups.py b/src/friprosveta/management/commands/fill_groups.py similarity index 100% rename from friprosveta/management/commands/fill_groups.py rename to src/friprosveta/management/commands/fill_groups.py diff --git a/friprosveta/management/commands/import_studis_najave.py b/src/friprosveta/management/commands/import_studis_najave.py similarity index 100% rename from friprosveta/management/commands/import_studis_najave.py rename to src/friprosveta/management/commands/import_studis_najave.py diff --git a/friprosveta/management/commands/import_studis_students.py b/src/friprosveta/management/commands/import_studis_students.py similarity index 100% rename from friprosveta/management/commands/import_studis_students.py rename to src/friprosveta/management/commands/import_studis_students.py diff --git a/friprosveta/management/commands/import_unitime_realizations.py b/src/friprosveta/management/commands/import_unitime_realizations.py similarity index 100% rename from friprosveta/management/commands/import_unitime_realizations.py rename to src/friprosveta/management/commands/import_unitime_realizations.py diff --git a/friprosveta/management/commands/notify_teachers.py b/src/friprosveta/management/commands/notify_teachers.py similarity index 100% rename from friprosveta/management/commands/notify_teachers.py rename to src/friprosveta/management/commands/notify_teachers.py diff --git a/friprosveta/management/commands/razporedi_pedagoge_na_diplome.py b/src/friprosveta/management/commands/razporedi_pedagoge_na_diplome.py similarity index 100% rename from friprosveta/management/commands/razporedi_pedagoge_na_diplome.py rename to src/friprosveta/management/commands/razporedi_pedagoge_na_diplome.py diff --git a/friprosveta/management/commands/split_activity.py b/src/friprosveta/management/commands/split_activity.py similarity index 100% rename from friprosveta/management/commands/split_activity.py rename to src/friprosveta/management/commands/split_activity.py diff --git a/friprosveta/management/commands/split_group.py b/src/friprosveta/management/commands/split_group.py similarity index 100% rename from friprosveta/management/commands/split_group.py rename to src/friprosveta/management/commands/split_group.py diff --git a/friprosveta/management/commands/sync_subjects.py b/src/friprosveta/management/commands/sync_subjects.py similarity index 100% rename from friprosveta/management/commands/sync_subjects.py rename to src/friprosveta/management/commands/sync_subjects.py diff --git a/friprosveta/management/commands/sync_teachers.py b/src/friprosveta/management/commands/sync_teachers.py similarity index 100% rename from friprosveta/management/commands/sync_teachers.py rename to src/friprosveta/management/commands/sync_teachers.py diff --git a/friprosveta/management/commands/unitime/AcademicAreas.py b/src/friprosveta/management/commands/unitime/AcademicAreas.py similarity index 100% rename from friprosveta/management/commands/unitime/AcademicAreas.py rename to src/friprosveta/management/commands/unitime/AcademicAreas.py diff --git a/friprosveta/management/commands/unitime/AcademicClassification.py b/src/friprosveta/management/commands/unitime/AcademicClassification.py similarity index 100% rename from friprosveta/management/commands/unitime/AcademicClassification.py rename to src/friprosveta/management/commands/unitime/AcademicClassification.py diff --git a/friprosveta/management/commands/unitime/BuildingsAndRooms.py b/src/friprosveta/management/commands/unitime/BuildingsAndRooms.py similarity index 100% rename from friprosveta/management/commands/unitime/BuildingsAndRooms.py rename to src/friprosveta/management/commands/unitime/BuildingsAndRooms.py diff --git a/friprosveta/management/commands/unitime/ClassesTimePattern.py b/src/friprosveta/management/commands/unitime/ClassesTimePattern.py similarity index 100% rename from friprosveta/management/commands/unitime/ClassesTimePattern.py rename to src/friprosveta/management/commands/unitime/ClassesTimePattern.py diff --git a/friprosveta/management/commands/unitime/CreateXML.py b/src/friprosveta/management/commands/unitime/CreateXML.py similarity index 100% rename from friprosveta/management/commands/unitime/CreateXML.py rename to src/friprosveta/management/commands/unitime/CreateXML.py diff --git a/friprosveta/management/commands/unitime/DefaultTimePattern.py b/src/friprosveta/management/commands/unitime/DefaultTimePattern.py similarity index 100% rename from friprosveta/management/commands/unitime/DefaultTimePattern.py rename to src/friprosveta/management/commands/unitime/DefaultTimePattern.py diff --git a/friprosveta/management/commands/unitime/Departments.py b/src/friprosveta/management/commands/unitime/Departments.py similarity index 100% rename from friprosveta/management/commands/unitime/Departments.py rename to src/friprosveta/management/commands/unitime/Departments.py diff --git a/friprosveta/management/commands/unitime/ExportAll.py b/src/friprosveta/management/commands/unitime/ExportAll.py similarity index 100% rename from friprosveta/management/commands/unitime/ExportAll.py rename to src/friprosveta/management/commands/unitime/ExportAll.py diff --git a/friprosveta/management/commands/unitime/LastLikeCourseDemands.py b/src/friprosveta/management/commands/unitime/LastLikeCourseDemands.py similarity index 100% rename from friprosveta/management/commands/unitime/LastLikeCourseDemands.py rename to src/friprosveta/management/commands/unitime/LastLikeCourseDemands.py diff --git a/friprosveta/management/commands/unitime/Majors.py b/src/friprosveta/management/commands/unitime/Majors.py similarity index 100% rename from friprosveta/management/commands/unitime/Majors.py rename to src/friprosveta/management/commands/unitime/Majors.py diff --git a/friprosveta/management/commands/unitime/Minors.py b/src/friprosveta/management/commands/unitime/Minors.py similarity index 100% rename from friprosveta/management/commands/unitime/Minors.py rename to src/friprosveta/management/commands/unitime/Minors.py diff --git a/friprosveta/management/commands/unitime/Offerings.py b/src/friprosveta/management/commands/unitime/Offerings.py similarity index 100% rename from friprosveta/management/commands/unitime/Offerings.py rename to src/friprosveta/management/commands/unitime/Offerings.py diff --git a/friprosveta/management/commands/unitime/RoomFeatures.py b/src/friprosveta/management/commands/unitime/RoomFeatures.py similarity index 100% rename from friprosveta/management/commands/unitime/RoomFeatures.py rename to src/friprosveta/management/commands/unitime/RoomFeatures.py diff --git a/friprosveta/management/commands/unitime/Staff.py b/src/friprosveta/management/commands/unitime/Staff.py similarity index 100% rename from friprosveta/management/commands/unitime/Staff.py rename to src/friprosveta/management/commands/unitime/Staff.py diff --git a/friprosveta/management/commands/unitime/StaffTimePreferences.py b/src/friprosveta/management/commands/unitime/StaffTimePreferences.py similarity index 100% rename from friprosveta/management/commands/unitime/StaffTimePreferences.py rename to src/friprosveta/management/commands/unitime/StaffTimePreferences.py diff --git a/friprosveta/management/commands/unitime/StudentAccommodations.py b/src/friprosveta/management/commands/unitime/StudentAccommodations.py similarity index 100% rename from friprosveta/management/commands/unitime/StudentAccommodations.py rename to src/friprosveta/management/commands/unitime/StudentAccommodations.py diff --git a/friprosveta/management/commands/unitime/StudentCourseRequests.py b/src/friprosveta/management/commands/unitime/StudentCourseRequests.py similarity index 100% rename from friprosveta/management/commands/unitime/StudentCourseRequests.py rename to src/friprosveta/management/commands/unitime/StudentCourseRequests.py diff --git a/friprosveta/management/commands/unitime/StudentEnrollments.py b/src/friprosveta/management/commands/unitime/StudentEnrollments.py similarity index 100% rename from friprosveta/management/commands/unitime/StudentEnrollments.py rename to src/friprosveta/management/commands/unitime/StudentEnrollments.py diff --git a/friprosveta/management/commands/unitime/StudentGroups.py b/src/friprosveta/management/commands/unitime/StudentGroups.py similarity index 100% rename from friprosveta/management/commands/unitime/StudentGroups.py rename to src/friprosveta/management/commands/unitime/StudentGroups.py diff --git a/friprosveta/management/commands/unitime/Students.py b/src/friprosveta/management/commands/unitime/Students.py similarity index 100% rename from friprosveta/management/commands/unitime/Students.py rename to src/friprosveta/management/commands/unitime/Students.py diff --git a/friprosveta/management/commands/unitime/SubjectAreas.py b/src/friprosveta/management/commands/unitime/SubjectAreas.py similarity index 100% rename from friprosveta/management/commands/unitime/SubjectAreas.py rename to src/friprosveta/management/commands/unitime/SubjectAreas.py diff --git a/friprosveta/management/commands/unitime/SubjectRequirements.py b/src/friprosveta/management/commands/unitime/SubjectRequirements.py similarity index 100% rename from friprosveta/management/commands/unitime/SubjectRequirements.py rename to src/friprosveta/management/commands/unitime/SubjectRequirements.py diff --git a/friprosveta/management/commands/unitime/__init__.py b/src/friprosveta/management/commands/unitime/__init__.py similarity index 100% rename from friprosveta/management/commands/unitime/__init__.py rename to src/friprosveta/management/commands/unitime/__init__.py diff --git a/friprosveta/management/commands/unitime/common.py b/src/friprosveta/management/commands/unitime/common.py similarity index 100% rename from friprosveta/management/commands/unitime/common.py rename to src/friprosveta/management/commands/unitime/common.py diff --git a/friprosveta/management/commands/unitime_export.py b/src/friprosveta/management/commands/unitime_export.py similarity index 100% rename from friprosveta/management/commands/unitime_export.py rename to src/friprosveta/management/commands/unitime_export.py diff --git a/friprosveta/management/commands/update_group_sizes_from_hints.py b/src/friprosveta/management/commands/update_group_sizes_from_hints.py similarity index 100% rename from friprosveta/management/commands/update_group_sizes_from_hints.py rename to src/friprosveta/management/commands/update_group_sizes_from_hints.py diff --git a/friprosveta/management/commands/update_groups.py b/src/friprosveta/management/commands/update_groups.py similarity index 100% rename from friprosveta/management/commands/update_groups.py rename to src/friprosveta/management/commands/update_groups.py diff --git a/friprosveta/management/commands/update_subgroups_from_hints.py b/src/friprosveta/management/commands/update_subgroups_from_hints.py similarity index 100% rename from friprosveta/management/commands/update_subgroups_from_hints.py rename to src/friprosveta/management/commands/update_subgroups_from_hints.py diff --git a/friprosveta/management/commands/utils/__init__.py b/src/friprosveta/management/commands/utils/__init__.py similarity index 100% rename from friprosveta/management/commands/utils/__init__.py rename to src/friprosveta/management/commands/utils/__init__.py diff --git a/friprosveta/management/commands/utils/subject_groups.py b/src/friprosveta/management/commands/utils/subject_groups.py similarity index 100% rename from friprosveta/management/commands/utils/subject_groups.py rename to src/friprosveta/management/commands/utils/subject_groups.py diff --git a/friprosveta/management/commands/utils/unitime_allocations.py b/src/friprosveta/management/commands/utils/unitime_allocations.py similarity index 100% rename from friprosveta/management/commands/utils/unitime_allocations.py rename to src/friprosveta/management/commands/utils/unitime_allocations.py diff --git a/friprosveta/migrations/0001_initial.py b/src/friprosveta/migrations/0001_initial.py similarity index 100% rename from friprosveta/migrations/0001_initial.py rename to src/friprosveta/migrations/0001_initial.py diff --git a/friprosveta/migrations/0002_auto_20180228_1129.py b/src/friprosveta/migrations/0002_auto_20180228_1129.py similarity index 100% rename from friprosveta/migrations/0002_auto_20180228_1129.py rename to src/friprosveta/migrations/0002_auto_20180228_1129.py diff --git a/friprosveta/migrations/0003_auto_20180930_2347.py b/src/friprosveta/migrations/0003_auto_20180930_2347.py similarity index 100% rename from friprosveta/migrations/0003_auto_20180930_2347.py rename to src/friprosveta/migrations/0003_auto_20180930_2347.py diff --git a/friprosveta/migrations/0004_activity_ready_to_schedule.py b/src/friprosveta/migrations/0004_activity_ready_to_schedule.py similarity index 100% rename from friprosveta/migrations/0004_activity_ready_to_schedule.py rename to src/friprosveta/migrations/0004_activity_ready_to_schedule.py diff --git a/friprosveta/migrations/0005_activity_cycles_on_site.py b/src/friprosveta/migrations/0005_activity_cycles_on_site.py similarity index 100% rename from friprosveta/migrations/0005_activity_cycles_on_site.py rename to src/friprosveta/migrations/0005_activity_cycles_on_site.py diff --git a/friprosveta/migrations/__init__.py b/src/friprosveta/migrations/__init__.py similarity index 100% rename from friprosveta/migrations/__init__.py rename to src/friprosveta/migrations/__init__.py diff --git a/friprosveta/models.py b/src/friprosveta/models.py similarity index 100% rename from friprosveta/models.py rename to src/friprosveta/models.py diff --git a/friprosveta/restapi.py b/src/friprosveta/restapi.py similarity index 100% rename from friprosveta/restapi.py rename to src/friprosveta/restapi.py diff --git a/friprosveta/serializers.py b/src/friprosveta/serializers.py similarity index 100% rename from friprosveta/serializers.py rename to src/friprosveta/serializers.py diff --git a/friprosveta/static/css/allocations.css b/src/friprosveta/static/css/allocations.css similarity index 100% rename from friprosveta/static/css/allocations.css rename to src/friprosveta/static/css/allocations.css diff --git a/friprosveta/static/css/cgp.css b/src/friprosveta/static/css/cgp.css similarity index 100% rename from friprosveta/static/css/cgp.css rename to src/friprosveta/static/css/cgp.css diff --git a/friprosveta/static/css/cycles_overview.css b/src/friprosveta/static/css/cycles_overview.css similarity index 100% rename from friprosveta/static/css/cycles_overview.css rename to src/friprosveta/static/css/cycles_overview.css diff --git a/friprosveta/static/css/main.css b/src/friprosveta/static/css/main.css similarity index 100% rename from friprosveta/static/css/main.css rename to src/friprosveta/static/css/main.css diff --git a/friprosveta/static/css/teacher_preferences.css b/src/friprosveta/static/css/teacher_preferences.css similarity index 100% rename from friprosveta/static/css/teacher_preferences.css rename to src/friprosveta/static/css/teacher_preferences.css diff --git a/friprosveta/static/icon_addlink.gif b/src/friprosveta/static/icon_addlink.gif similarity index 100% rename from friprosveta/static/icon_addlink.gif rename to src/friprosveta/static/icon_addlink.gif diff --git a/friprosveta/static/images/bg_circles_bottom.png b/src/friprosveta/static/images/bg_circles_bottom.png similarity index 100% rename from friprosveta/static/images/bg_circles_bottom.png rename to src/friprosveta/static/images/bg_circles_bottom.png diff --git a/friprosveta/static/images/bg_circles_top.png b/src/friprosveta/static/images/bg_circles_top.png similarity index 100% rename from friprosveta/static/images/bg_circles_top.png rename to src/friprosveta/static/images/bg_circles_top.png diff --git a/friprosveta/static/images/bg_logo.png b/src/friprosveta/static/images/bg_logo.png similarity index 100% rename from friprosveta/static/images/bg_logo.png rename to src/friprosveta/static/images/bg_logo.png diff --git a/friprosveta/static/images/bg_pattern_lines.png b/src/friprosveta/static/images/bg_pattern_lines.png similarity index 100% rename from friprosveta/static/images/bg_pattern_lines.png rename to src/friprosveta/static/images/bg_pattern_lines.png diff --git a/friprosveta/static/images/bg_tile.gif b/src/friprosveta/static/images/bg_tile.gif similarity index 100% rename from friprosveta/static/images/bg_tile.gif rename to src/friprosveta/static/images/bg_tile.gif diff --git a/friprosveta/static/images/fri_logo.png b/src/friprosveta/static/images/fri_logo.png similarity index 100% rename from friprosveta/static/images/fri_logo.png rename to src/friprosveta/static/images/fri_logo.png diff --git a/friprosveta/static/images/logo_fri.gif b/src/friprosveta/static/images/logo_fri.gif similarity index 100% rename from friprosveta/static/images/logo_fri.gif rename to src/friprosveta/static/images/logo_fri.gif diff --git a/friprosveta/static/images/napis_fri.gif b/src/friprosveta/static/images/napis_fri.gif similarity index 100% rename from friprosveta/static/images/napis_fri.gif rename to src/friprosveta/static/images/napis_fri.gif diff --git a/friprosveta/static/images/tools/bg_tools.gif b/src/friprosveta/static/images/tools/bg_tools.gif similarity index 100% rename from friprosveta/static/images/tools/bg_tools.gif rename to src/friprosveta/static/images/tools/bg_tools.gif diff --git a/friprosveta/static/images/tools/contact.gif b/src/friprosveta/static/images/tools/contact.gif similarity index 100% rename from friprosveta/static/images/tools/contact.gif rename to src/friprosveta/static/images/tools/contact.gif diff --git a/friprosveta/static/images/tools/contact_over.gif b/src/friprosveta/static/images/tools/contact_over.gif similarity index 100% rename from friprosveta/static/images/tools/contact_over.gif rename to src/friprosveta/static/images/tools/contact_over.gif diff --git a/friprosveta/static/images/tools/en.gif b/src/friprosveta/static/images/tools/en.gif similarity index 100% rename from friprosveta/static/images/tools/en.gif rename to src/friprosveta/static/images/tools/en.gif diff --git a/friprosveta/static/images/tools/en_over.gif b/src/friprosveta/static/images/tools/en_over.gif similarity index 100% rename from friprosveta/static/images/tools/en_over.gif rename to src/friprosveta/static/images/tools/en_over.gif diff --git a/friprosveta/static/images/tools/home.gif b/src/friprosveta/static/images/tools/home.gif similarity index 100% rename from friprosveta/static/images/tools/home.gif rename to src/friprosveta/static/images/tools/home.gif diff --git a/friprosveta/static/images/tools/home_over.gif b/src/friprosveta/static/images/tools/home_over.gif similarity index 100% rename from friprosveta/static/images/tools/home_over.gif rename to src/friprosveta/static/images/tools/home_over.gif diff --git a/friprosveta/static/images/tools/intra.gif b/src/friprosveta/static/images/tools/intra.gif similarity index 100% rename from friprosveta/static/images/tools/intra.gif rename to src/friprosveta/static/images/tools/intra.gif diff --git a/friprosveta/static/images/tools/intra_over.gif b/src/friprosveta/static/images/tools/intra_over.gif similarity index 100% rename from friprosveta/static/images/tools/intra_over.gif rename to src/friprosveta/static/images/tools/intra_over.gif diff --git a/friprosveta/static/images/tools/rss.gif b/src/friprosveta/static/images/tools/rss.gif similarity index 100% rename from friprosveta/static/images/tools/rss.gif rename to src/friprosveta/static/images/tools/rss.gif diff --git a/friprosveta/static/images/tools/rss_over.gif b/src/friprosveta/static/images/tools/rss_over.gif similarity index 100% rename from friprosveta/static/images/tools/rss_over.gif rename to src/friprosveta/static/images/tools/rss_over.gif diff --git a/friprosveta/static/images/tools/sitemap.gif b/src/friprosveta/static/images/tools/sitemap.gif similarity index 100% rename from friprosveta/static/images/tools/sitemap.gif rename to src/friprosveta/static/images/tools/sitemap.gif diff --git a/friprosveta/static/images/tools/sitemap_over.gif b/src/friprosveta/static/images/tools/sitemap_over.gif similarity index 100% rename from friprosveta/static/images/tools/sitemap_over.gif rename to src/friprosveta/static/images/tools/sitemap_over.gif diff --git a/friprosveta/static/js/i18n.js b/src/friprosveta/static/js/i18n.js similarity index 100% rename from friprosveta/static/js/i18n.js rename to src/friprosveta/static/js/i18n.js diff --git a/friprosveta/static/js/jquery-1.7.1.js b/src/friprosveta/static/js/jquery-1.7.1.js similarity index 100% rename from friprosveta/static/js/jquery-1.7.1.js rename to src/friprosveta/static/js/jquery-1.7.1.js diff --git a/friprosveta/static/js/jquery-1.7.1.min.js b/src/friprosveta/static/js/jquery-1.7.1.min.js similarity index 100% rename from friprosveta/static/js/jquery-1.7.1.min.js rename to src/friprosveta/static/js/jquery-1.7.1.min.js diff --git a/friprosveta/static/js/jsi18n.js b/src/friprosveta/static/js/jsi18n.js similarity index 100% rename from friprosveta/static/js/jsi18n.js rename to src/friprosveta/static/js/jsi18n.js diff --git a/friprosveta/studis.py b/src/friprosveta/studis.py similarity index 100% rename from friprosveta/studis.py rename to src/friprosveta/studis.py diff --git a/friprosveta/templates/403.html b/src/friprosveta/templates/403.html similarity index 100% rename from friprosveta/templates/403.html rename to src/friprosveta/templates/403.html diff --git a/friprosveta/templates/base.html b/src/friprosveta/templates/base.html similarity index 100% rename from friprosveta/templates/base.html rename to src/friprosveta/templates/base.html diff --git a/friprosveta/templates/friprosveta/activity_detail.html b/src/friprosveta/templates/friprosveta/activity_detail.html similarity index 100% rename from friprosveta/templates/friprosveta/activity_detail.html rename to src/friprosveta/templates/friprosveta/activity_detail.html diff --git a/friprosveta/templates/friprosveta/activity_edit.html b/src/friprosveta/templates/friprosveta/activity_edit.html similarity index 100% rename from friprosveta/templates/friprosveta/activity_edit.html rename to src/friprosveta/templates/friprosveta/activity_edit.html diff --git a/friprosveta/templates/friprosveta/activity_requirements.html b/src/friprosveta/templates/friprosveta/activity_requirements.html similarity index 100% rename from friprosveta/templates/friprosveta/activity_requirements.html rename to src/friprosveta/templates/friprosveta/activity_requirements.html diff --git a/friprosveta/templates/friprosveta/allocations.html b/src/friprosveta/templates/friprosveta/allocations.html similarity index 100% rename from friprosveta/templates/friprosveta/allocations.html rename to src/friprosveta/templates/friprosveta/allocations.html diff --git a/friprosveta/templates/friprosveta/allocations_edit.html b/src/friprosveta/templates/friprosveta/allocations_edit.html similarity index 100% rename from friprosveta/templates/friprosveta/allocations_edit.html rename to src/friprosveta/templates/friprosveta/allocations_edit.html diff --git a/friprosveta/templates/friprosveta/assignments.html b/src/friprosveta/templates/friprosveta/assignments.html similarity index 100% rename from friprosveta/templates/friprosveta/assignments.html rename to src/friprosveta/templates/friprosveta/assignments.html diff --git a/friprosveta/templates/friprosveta/busy_students.html b/src/friprosveta/templates/friprosveta/busy_students.html similarity index 100% rename from friprosveta/templates/friprosveta/busy_students.html rename to src/friprosveta/templates/friprosveta/busy_students.html diff --git a/friprosveta/templates/friprosveta/busy_students_admin.html b/src/friprosveta/templates/friprosveta/busy_students_admin.html similarity index 100% rename from friprosveta/templates/friprosveta/busy_students_admin.html rename to src/friprosveta/templates/friprosveta/busy_students_admin.html diff --git a/friprosveta/templates/friprosveta/cookies.html b/src/friprosveta/templates/friprosveta/cookies.html similarity index 100% rename from friprosveta/templates/friprosveta/cookies.html rename to src/friprosveta/templates/friprosveta/cookies.html diff --git a/friprosveta/templates/friprosveta/faq.html b/src/friprosveta/templates/friprosveta/faq.html similarity index 100% rename from friprosveta/templates/friprosveta/faq.html rename to src/friprosveta/templates/friprosveta/faq.html diff --git a/friprosveta/templates/friprosveta/group_list.html b/src/friprosveta/templates/friprosveta/group_list.html similarity index 100% rename from friprosveta/templates/friprosveta/group_list.html rename to src/friprosveta/templates/friprosveta/group_list.html diff --git a/friprosveta/templates/friprosveta/group_overview.html b/src/friprosveta/templates/friprosveta/group_overview.html similarity index 100% rename from friprosveta/templates/friprosveta/group_overview.html rename to src/friprosveta/templates/friprosveta/group_overview.html diff --git a/friprosveta/templates/friprosveta/group_preferences.html b/src/friprosveta/templates/friprosveta/group_preferences.html similarity index 100% rename from friprosveta/templates/friprosveta/group_preferences.html rename to src/friprosveta/templates/friprosveta/group_preferences.html diff --git a/friprosveta/templates/friprosveta/index.html b/src/friprosveta/templates/friprosveta/index.html similarity index 100% rename from friprosveta/templates/friprosveta/index.html rename to src/friprosveta/templates/friprosveta/index.html diff --git a/friprosveta/templates/friprosveta/najave_list.html b/src/friprosveta/templates/friprosveta/najave_list.html similarity index 100% rename from friprosveta/templates/friprosveta/najave_list.html rename to src/friprosveta/templates/friprosveta/najave_list.html diff --git a/friprosveta/templates/friprosveta/place_realization.html b/src/friprosveta/templates/friprosveta/place_realization.html similarity index 100% rename from friprosveta/templates/friprosveta/place_realization.html rename to src/friprosveta/templates/friprosveta/place_realization.html diff --git a/friprosveta/templates/friprosveta/preference_types_list.html b/src/friprosveta/templates/friprosveta/preference_types_list.html similarity index 100% rename from friprosveta/templates/friprosveta/preference_types_list.html rename to src/friprosveta/templates/friprosveta/preference_types_list.html diff --git a/friprosveta/templates/friprosveta/problematic_allocations.html b/src/friprosveta/templates/friprosveta/problematic_allocations.html similarity index 100% rename from friprosveta/templates/friprosveta/problematic_allocations.html rename to src/friprosveta/templates/friprosveta/problematic_allocations.html diff --git a/friprosveta/templates/friprosveta/problems.html b/src/friprosveta/templates/friprosveta/problems.html similarity index 100% rename from friprosveta/templates/friprosveta/problems.html rename to src/friprosveta/templates/friprosveta/problems.html diff --git a/friprosveta/templates/friprosveta/results.html b/src/friprosveta/templates/friprosveta/results.html similarity index 100% rename from friprosveta/templates/friprosveta/results.html rename to src/friprosveta/templates/friprosveta/results.html diff --git a/friprosveta/templates/friprosveta/students_list.html b/src/friprosveta/templates/friprosveta/students_list.html similarity index 100% rename from friprosveta/templates/friprosveta/students_list.html rename to src/friprosveta/templates/friprosveta/students_list.html diff --git a/friprosveta/templates/friprosveta/subject.html b/src/friprosveta/templates/friprosveta/subject.html similarity index 100% rename from friprosveta/templates/friprosveta/subject.html rename to src/friprosveta/templates/friprosveta/subject.html diff --git a/friprosveta/templates/friprosveta/subject_list.html b/src/friprosveta/templates/friprosveta/subject_list.html similarity index 100% rename from friprosveta/templates/friprosveta/subject_list.html rename to src/friprosveta/templates/friprosveta/subject_list.html diff --git a/friprosveta/templates/friprosveta/tag_preference_list.html b/src/friprosveta/templates/friprosveta/tag_preference_list.html similarity index 100% rename from friprosveta/templates/friprosveta/tag_preference_list.html rename to src/friprosveta/templates/friprosveta/tag_preference_list.html diff --git a/friprosveta/templates/friprosveta/tag_time_preferences.html b/src/friprosveta/templates/friprosveta/tag_time_preferences.html similarity index 100% rename from friprosveta/templates/friprosveta/tag_time_preferences.html rename to src/friprosveta/templates/friprosveta/tag_time_preferences.html diff --git a/friprosveta/templates/friprosveta/teacher_formset_preferences.html b/src/friprosveta/templates/friprosveta/teacher_formset_preferences.html similarity index 100% rename from friprosveta/templates/friprosveta/teacher_formset_preferences.html rename to src/friprosveta/templates/friprosveta/teacher_formset_preferences.html diff --git a/friprosveta/templates/friprosveta/teacher_hours.html b/src/friprosveta/templates/friprosveta/teacher_hours.html similarity index 100% rename from friprosveta/templates/friprosveta/teacher_hours.html rename to src/friprosveta/templates/friprosveta/teacher_hours.html diff --git a/friprosveta/templates/friprosveta/teacher_hours_table.html b/src/friprosveta/templates/friprosveta/teacher_hours_table.html similarity index 100% rename from friprosveta/templates/friprosveta/teacher_hours_table.html rename to src/friprosveta/templates/friprosveta/teacher_hours_table.html diff --git a/friprosveta/templates/friprosveta/teacher_preference_list.html b/src/friprosveta/templates/friprosveta/teacher_preference_list.html similarity index 100% rename from friprosveta/templates/friprosveta/teacher_preference_list.html rename to src/friprosveta/templates/friprosveta/teacher_preference_list.html diff --git a/friprosveta/templates/friprosveta/teacher_single_democratic_preferences.html b/src/friprosveta/templates/friprosveta/teacher_single_democratic_preferences.html similarity index 100% rename from friprosveta/templates/friprosveta/teacher_single_democratic_preferences.html rename to src/friprosveta/templates/friprosveta/teacher_single_democratic_preferences.html diff --git a/friprosveta/templates/friprosveta/teacher_single_preferences.html b/src/friprosveta/templates/friprosveta/teacher_single_preferences.html similarity index 100% rename from friprosveta/templates/friprosveta/teacher_single_preferences.html rename to src/friprosveta/templates/friprosveta/teacher_single_preferences.html diff --git a/friprosveta/templates/friprosveta/timetable_teacherpreference_list.html b/src/friprosveta/templates/friprosveta/timetable_teacherpreference_list.html similarity index 100% rename from friprosveta/templates/friprosveta/timetable_teacherpreference_list.html rename to src/friprosveta/templates/friprosveta/timetable_teacherpreference_list.html diff --git a/friprosveta/templates/navigation.html b/src/friprosveta/templates/navigation.html similarity index 100% rename from friprosveta/templates/navigation.html rename to src/friprosveta/templates/navigation.html diff --git a/friprosveta/templates/registration/logged_out.html b/src/friprosveta/templates/registration/logged_out.html similarity index 100% rename from friprosveta/templates/registration/logged_out.html rename to src/friprosveta/templates/registration/logged_out.html diff --git a/friprosveta/templates/registration/login.html b/src/friprosveta/templates/registration/login.html similarity index 100% rename from friprosveta/templates/registration/login.html rename to src/friprosveta/templates/registration/login.html diff --git a/friprosveta/templates/timetable/activityrealization_list.html b/src/friprosveta/templates/timetable/activityrealization_list.html similarity index 100% rename from friprosveta/templates/timetable/activityrealization_list.html rename to src/friprosveta/templates/timetable/activityrealization_list.html diff --git a/friprosveta/templates/timetable/timetable_list.html b/src/friprosveta/templates/timetable/timetable_list.html similarity index 100% rename from friprosveta/templates/timetable/timetable_list.html rename to src/friprosveta/templates/timetable/timetable_list.html diff --git a/friprosveta/templates/timetable/timetableset_list.html b/src/friprosveta/templates/timetable/timetableset_list.html similarity index 100% rename from friprosveta/templates/timetable/timetableset_list.html rename to src/friprosveta/templates/timetable/timetableset_list.html diff --git a/friprosveta/tests.py b/src/friprosveta/tests.py similarity index 100% rename from friprosveta/tests.py rename to src/friprosveta/tests.py diff --git a/friprosveta/ul_groupname.py b/src/friprosveta/ul_groupname.py similarity index 100% rename from friprosveta/ul_groupname.py rename to src/friprosveta/ul_groupname.py diff --git a/friprosveta/urls.py b/src/friprosveta/urls.py similarity index 100% rename from friprosveta/urls.py rename to src/friprosveta/urls.py diff --git a/friprosveta/views.py b/src/friprosveta/views.py similarity index 100% rename from friprosveta/views.py rename to src/friprosveta/views.py diff --git a/timetable/__init__.py b/src/timetable/__init__.py similarity index 100% rename from timetable/__init__.py rename to src/timetable/__init__.py diff --git a/timetable/admin.py b/src/timetable/admin.py similarity index 98% rename from timetable/admin.py rename to src/timetable/admin.py index c13be0c..31f3b8f 100644 --- a/timetable/admin.py +++ b/src/timetable/admin.py @@ -29,7 +29,7 @@ class TeacherAdmin(ImportExportActionModelAdmin): "activities__name", "activities__short_name", ) - filter_horizontal = ("activities",) + # filter_horizontal = ("activities",) class ClassroomNResourcesInline(admin.TabularInline): @@ -41,7 +41,7 @@ class ClassroomNResourcesInline(admin.TabularInline): class ClassroomAdmin(ImportExportActionModelAdmin): - filter_horizontal = ("resources",) + # filter_horizontal = ("resources",) list_filter = ("classroomset",) inlines = [ ClassroomNResourcesInline, diff --git a/timetable/forms.py b/src/timetable/forms.py similarity index 100% rename from timetable/forms.py rename to src/timetable/forms.py diff --git a/timetable/management/__init__.py b/src/timetable/management/__init__.py similarity index 100% rename from timetable/management/__init__.py rename to src/timetable/management/__init__.py diff --git a/timetable/management/commands/__init__.py b/src/timetable/management/commands/__init__.py similarity index 100% rename from timetable/management/commands/__init__.py rename to src/timetable/management/commands/__init__.py diff --git a/timetable/management/commands/copy_groups.py b/src/timetable/management/commands/copy_groups.py similarity index 100% rename from timetable/management/commands/copy_groups.py rename to src/timetable/management/commands/copy_groups.py diff --git a/timetable/migrations/0001_initial.py b/src/timetable/migrations/0001_initial.py similarity index 100% rename from timetable/migrations/0001_initial.py rename to src/timetable/migrations/0001_initial.py diff --git a/timetable/migrations/0002_auto_20180228_1129.py b/src/timetable/migrations/0002_auto_20180228_1129.py similarity index 100% rename from timetable/migrations/0002_auto_20180228_1129.py rename to src/timetable/migrations/0002_auto_20180228_1129.py diff --git a/timetable/migrations/0003_auto_20180930_2347.py b/src/timetable/migrations/0003_auto_20180930_2347.py similarity index 100% rename from timetable/migrations/0003_auto_20180930_2347.py rename to src/timetable/migrations/0003_auto_20180930_2347.py diff --git a/timetable/migrations/0004_group_visible_in_navigation.py b/src/timetable/migrations/0004_group_visible_in_navigation.py similarity index 100% rename from timetable/migrations/0004_group_visible_in_navigation.py rename to src/timetable/migrations/0004_group_visible_in_navigation.py diff --git a/timetable/migrations/0005_alter_activity_mustnotoverlap.py b/src/timetable/migrations/0005_alter_activity_mustnotoverlap.py similarity index 100% rename from timetable/migrations/0005_alter_activity_mustnotoverlap.py rename to src/timetable/migrations/0005_alter_activity_mustnotoverlap.py diff --git a/timetable/migrations/0006_activity_required_rooms.py b/src/timetable/migrations/0006_activity_required_rooms.py similarity index 100% rename from timetable/migrations/0006_activity_required_rooms.py rename to src/timetable/migrations/0006_activity_required_rooms.py diff --git a/timetable/migrations/__init__.py b/src/timetable/migrations/__init__.py similarity index 100% rename from timetable/migrations/__init__.py rename to src/timetable/migrations/__init__.py diff --git a/timetable/models.py b/src/timetable/models.py similarity index 99% rename from timetable/models.py rename to src/timetable/models.py index 4da5ed9..b51c5d8 100644 --- a/timetable/models.py +++ b/src/timetable/models.py @@ -570,7 +570,8 @@ def default_timetable(request): - IndexError when no public timetable exists for a given site. """ all_timetables = Timetable.objects.all() - current_site = get_current_site(request) + #current_site = get_current_site(request) + current_site = Site.objects.all().last() current_site_default_timetables = all_timetables.filter( timetablesite__site=current_site, public=True, timetablesite__default=True ) diff --git a/timetable/static/js/activities.js b/src/timetable/static/js/activities.js similarity index 100% rename from timetable/static/js/activities.js rename to src/timetable/static/js/activities.js diff --git a/timetable/static/js/preferences.js b/src/timetable/static/js/preferences.js similarity index 100% rename from timetable/static/js/preferences.js rename to src/timetable/static/js/preferences.js diff --git a/timetable/templates/404.html b/src/timetable/templates/404.html similarity index 100% rename from timetable/templates/404.html rename to src/timetable/templates/404.html diff --git a/timetable/templates/500.html b/src/timetable/templates/500.html similarity index 100% rename from timetable/templates/500.html rename to src/timetable/templates/500.html diff --git a/timetable/templates/timetable/activity_requirements.html b/src/timetable/templates/timetable/activity_requirements.html similarity index 100% rename from timetable/templates/timetable/activity_requirements.html rename to src/timetable/templates/timetable/activity_requirements.html diff --git a/timetable/templates/timetable/allocations.html b/src/timetable/templates/timetable/allocations.html similarity index 100% rename from timetable/templates/timetable/allocations.html rename to src/timetable/templates/timetable/allocations.html diff --git a/timetable/templates/timetable/index.html b/src/timetable/templates/timetable/index.html similarity index 100% rename from timetable/templates/timetable/index.html rename to src/timetable/templates/timetable/index.html diff --git a/timetable/templates/timetable/results.html b/src/timetable/templates/timetable/results.html similarity index 100% rename from timetable/templates/timetable/results.html rename to src/timetable/templates/timetable/results.html diff --git a/timetable/templates/timetable/teacher_formset_preferences.html b/src/timetable/templates/timetable/teacher_formset_preferences.html similarity index 100% rename from timetable/templates/timetable/teacher_formset_preferences.html rename to src/timetable/templates/timetable/teacher_formset_preferences.html diff --git a/timetable/templates/timetable/teacher_single_preferences.html b/src/timetable/templates/timetable/teacher_single_preferences.html similarity index 100% rename from timetable/templates/timetable/teacher_single_preferences.html rename to src/timetable/templates/timetable/teacher_single_preferences.html diff --git a/timetable/templates/timetable/timetable_teacherpreference_list.html b/src/timetable/templates/timetable/timetable_teacherpreference_list.html similarity index 100% rename from timetable/templates/timetable/timetable_teacherpreference_list.html rename to src/timetable/templates/timetable/timetable_teacherpreference_list.html diff --git a/timetable/templatetags/__init__.py b/src/timetable/templatetags/__init__.py similarity index 100% rename from timetable/templatetags/__init__.py rename to src/timetable/templatetags/__init__.py diff --git a/timetable/templatetags/timetable_extras.py b/src/timetable/templatetags/timetable_extras.py similarity index 100% rename from timetable/templatetags/timetable_extras.py rename to src/timetable/templatetags/timetable_extras.py diff --git a/timetable/urls.py b/src/timetable/urls.py similarity index 100% rename from timetable/urls.py rename to src/timetable/urls.py diff --git a/timetable/views.py b/src/timetable/views.py similarity index 100% rename from timetable/views.py rename to src/timetable/views.py diff --git a/unitime/__init__.py b/src/unitime/__init__.py similarity index 100% rename from unitime/__init__.py rename to src/unitime/__init__.py diff --git a/unitime/admin.py b/src/unitime/admin.py similarity index 100% rename from unitime/admin.py rename to src/unitime/admin.py diff --git a/unitime/migrations/0001_initial.py b/src/unitime/migrations/0001_initial.py similarity index 100% rename from unitime/migrations/0001_initial.py rename to src/unitime/migrations/0001_initial.py diff --git a/unitime/migrations/__init__.py b/src/unitime/migrations/__init__.py similarity index 100% rename from unitime/migrations/__init__.py rename to src/unitime/migrations/__init__.py diff --git a/unitime/models.py b/src/unitime/models.py similarity index 100% rename from unitime/models.py rename to src/unitime/models.py diff --git a/urnik_fri/__init__.py b/src/urnik_fri/__init__.py similarity index 100% rename from urnik_fri/__init__.py rename to src/urnik_fri/__init__.py diff --git a/urnik_fri/celery.py b/src/urnik_fri/celery.py similarity index 100% rename from urnik_fri/celery.py rename to src/urnik_fri/celery.py diff --git a/src/urnik_fri/settings.py b/src/urnik_fri/settings.py new file mode 100644 index 0000000..60cf4f0 --- /dev/null +++ b/src/urnik_fri/settings.py @@ -0,0 +1,195 @@ +# Django settings for urnik project. +import ldap +from django_auth_ldap.config import LDAPSearch, GroupOfNamesType +from friprosveta.ul_groupname import ULNestedGroupOfNamesType +from django.utils.translation import gettext_lazy as _ +from urnik_fri.settings_common import * + +# DEBUG = False +DEBUG = True + +#--- UNITIME settings ------ +UNITIME_DB_USER = "user" +UNITIME_DB_PASSWORD = "password" +UNITIME_DB_NAME = "db_name" +UNITIME_DB_HOST = "db_host" +# ------------------------- + + +ADMINS = ( + ('polz', 'polz@fri.uni-lj.si'), + ('gregor', 'gregor.jerse@fri.uni-lj.si'), + ('gregorj', 'gregor@jerse.info'), + ('gasperfele@fri1.uni-lj.si', 'polz@fri.uni-lj.si'), +) +MANAGERS = ADMINS + +# AUTHENTICATION_BACKENDS = ( +# 'guardian.backends.ObjectPermissionBackend', +# 'django.contrib.auth.backends.ModelBackend', # this is default +# ) + +#----------------------------------------- +# Email settings +#----------------------------------------- +EMAIL_HOST = '10.0.32.2' +EMAIL_PORT = 25 +#EMAIL_HOST_USER = 'urnik' +#EMAIL_HOST_PASSWORD = 'pogreglz' +EMAIL_USE_TLS = True + + +#----------------------------------------- +# Database settings +#----------------------------------------- +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'timetable', # Or path to database file if using sqlite3. + 'USER': 'timetable', # Not used with sqlite3. + 'PASSWORD': 'qOvpzZODQ4n55JKRyRU16PJBEeUde1uK', # Not used with sqlite3. + 'HOST': 'simargl.jerse.info', # Set to empty string for localhost. Not used with sqlite3. + }, +} + +import os + +#----------------------------------------- +# Django secret key +# Make this unique, and don't share it with anybody. +#----------------------------------------- +SECRET_KEY = 'make_this_unique_and_dont_share_it_with_anybody_sure' + + +#----------------------------------------- +# LDAP settings +#----------------------------------------- +# AUTH_LDAP_SERVER_URI = "ldaps://[2001:1470:fffd:ff90::ad1]:3269" +# AUTH_LDAP_SERVER_URI = "ldaps://dcv1fri1.fri1.uni-lj.si:3269" +# AUTH_LDAP_BIND_DN = "CN=ldapp,OU=System;OU=admin;DC=fri1;DC=uni-lj;DC=si" +# AUTH_LDAP_BIND_PASSWORD = "Fu3[EBu`P'JHNuktV]3cNVRN" +# AUTH_LDAP_USER_SEARCH = LDAPSearch( +# "DC=uni-lj,DC=si", +# ldap.SCOPE_SUBTREE, "(userPrincipalName=%(user)s)") +# # Mirror groups in LDAP +# AUTH_LDAP_GROUP_SEARCH = LDAPSearch( +# "DC=uni-lj,DC=si", +# ldap.SCOPE_SUBTREE, "(objectClass=group)" +# ) +# AUTH_LDAP_GROUP_TYPE = ULNestedGroupOfNamesType(name_attr="cn") +# AUTH_LDAP_MIRROR_GROUPS = True +# # Only users in this group can log in. +# # AUTH_LDAP_REQUIRE_GROUP = "cn=enabled,ou=django,ou=groups,dc=example,dc=com" +# # Populate the Django user from the LDAP directory. +# AUTH_LDAP_USER_ATTR_MAP = { +# "first_name": "givenName", +# "last_name": "sn", +# "email": "mail" +# } +# # AUTH_LDAP_PROFILE_ATTR_MAP = { +# # "employee_number": "employeeNumber" +# # } + +# AUTH_LDAP_USER_FLAGS_BY_GROUP = { +# # "is_active": "cn=active,ou=django,ou=groups,dc=example,dc=com", +# # "is_staff": "cn=staff,ou=django,ou=groups,dc=example,dc=com", +# # "is_superuser": "cn=superuser,ou=django,ou=groups,dc=example,dc=com" +# } + +# # This is the default, but I like to be explicit. +# AUTH_LDAP_ALWAYS_UPDATE_USER = True +# # Use LDAP group membership to calculate group permissions. +# #AUTH_LDAP_FIND_GROUP_PERMS = True +# # Cache group memberships for an hour to minimize LDAP traffic +# AUTH_LDAP_CACHE_GROUPS = True +# AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600 + +# ----------------------------------- +# Timplate settings +# Make sure Debug is False +# ----------------------------------- +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + 'templates', + ], + 'APP_DIRS': True, + 'OPTIONS': { + 'debug': False, + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.debug', + 'django.template.context_processors.i18n', + 'django.template.context_processors.media', + 'django.template.context_processors.request', + 'django.template.context_processors.static', + 'django.template.context_processors.tz', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +# ----------------------------------- +# Logging settings +# ----------------------------------- +LOGGING = { + 'version': 1, + 'disable_existing_loggers': True, + 'formatters': { + 'verbose': { + 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' + }, + 'simple': { + 'format': '%(levelname)s %(message)s' + }, + }, + 'handlers': { + 'null': { + 'level': 'DEBUG', + 'class': 'logging.NullHandler', + }, + 'console':{ + 'level': 'DEBUG', + 'class': 'logging.StreamHandler', + 'formatter': 'simple' + }, + 'file':{ + 'level': 'DEBUG', + 'class': 'logging.FileHandler', + 'filename': '/home/gregor/urnik/django.log', + 'formatter': 'verbose' + }, + }, + 'loggers': { + 'django': { + 'handlers': ['file'], + 'propagate': True, + 'level': 'INFO', + }, + 'friprosveta': { + 'handlers': ['console', 'file'], + # 'handlers': ['null'], + 'level': 'INFO', + }, + 'friprosveta': { + 'handlers': ['file'], + # 'handlers': ['null'], + 'level': 'DEBUG', + }, + + } +} + +# ----------------------------------- +# Studis API settings +# ----------------------------------- +STUDIS_API_BASE_URL = 'https://studisfri.uni-lj.si/api' +STUDIS_API_TOKEN = 'sanja-svinja-kokoruz' + + +#------------------------------------ +# Exchange settings +#------------------------------------ +STUDENT_MAPPER_PRODUCTION = True diff --git a/urnik_fri/settings_common.py b/src/urnik_fri/settings_common.py similarity index 98% rename from urnik_fri/settings_common.py rename to src/urnik_fri/settings_common.py index 37e2793..a2dc18d 100644 --- a/urnik_fri/settings_common.py +++ b/src/urnik_fri/settings_common.py @@ -111,7 +111,6 @@ "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.locale.LocaleMiddleware", "django.middleware.common.CommonMiddleware", - "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", diff --git a/urnik_fri/settings_example.py b/src/urnik_fri/settings_example.py similarity index 100% rename from urnik_fri/settings_example.py rename to src/urnik_fri/settings_example.py diff --git a/urnik_fri/settings_midime.py b/src/urnik_fri/settings_midime.py similarity index 94% rename from urnik_fri/settings_midime.py rename to src/urnik_fri/settings_midime.py index 8a34537..966de73 100644 --- a/urnik_fri/settings_midime.py +++ b/src/urnik_fri/settings_midime.py @@ -113,12 +113,12 @@ "class": "logging.StreamHandler", "formatter": "simple", }, - "file": { - "level": "DEBUG", - "class": "logging.FileHandler", - "filename": "/home/gregor/personal/urnik/debug.log", - "formatter": "verbose", - }, + # "file": { + # "level": "DEBUG", + # "class": "logging.FileHandler", + # "filename": "/home/gregor/personal/urnik/debug.log", + # "formatter": "verbose", + # }, }, "loggers": { "django": { diff --git a/urnik_fri/urls.py b/src/urnik_fri/urls.py similarity index 100% rename from urnik_fri/urls.py rename to src/urnik_fri/urls.py diff --git a/urnik_fri/wsgi_example.py b/src/urnik_fri/wsgi_example.py similarity index 100% rename from urnik_fri/wsgi_example.py rename to src/urnik_fri/wsgi_example.py