[UPDT] HORILLA: Updated horilla global varriable APPS by declare them in every app ready() function
This commit is contained in:
@@ -22,8 +22,10 @@ class AssetConfig(AppConfig):
|
||||
def ready(self):
|
||||
from django.urls import include, path
|
||||
|
||||
from horilla.horilla_settings import APPS
|
||||
from horilla.urls import urlpatterns
|
||||
|
||||
APPS.append("asset")
|
||||
urlpatterns.append(
|
||||
path("asset/", include("asset.urls")),
|
||||
)
|
||||
|
||||
@@ -21,9 +21,11 @@ class AttendanceConfig(AppConfig):
|
||||
def ready(self):
|
||||
from django.urls import include, path
|
||||
|
||||
from horilla.horilla_settings import APPS
|
||||
from horilla.settings import MIDDLEWARE
|
||||
from horilla.urls import urlpatterns
|
||||
|
||||
APPS.append("attendance")
|
||||
urlpatterns.append(
|
||||
path("attendance/", include("attendance.urls")),
|
||||
)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.db import connection
|
||||
from django.core.management import call_command
|
||||
from django.db import connection
|
||||
|
||||
from dynamic_fields.methods import column_exists
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -17,10 +19,11 @@ class DynamicFieldsConfig(AppConfig):
|
||||
name = "dynamic_fields"
|
||||
|
||||
def ready(self):
|
||||
from dynamic_fields.models import DynamicField
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from simple_history.models import HistoricalRecords
|
||||
|
||||
from dynamic_fields.models import DynamicField
|
||||
|
||||
try:
|
||||
dynamic_objects = DynamicField.objects.filter()
|
||||
# Ensure this logic only runs when the server is started (and only once)
|
||||
@@ -52,8 +55,9 @@ class DynamicFieldsConfig(AppConfig):
|
||||
logger.error(e)
|
||||
logger.info("ignore if it is fresh installation")
|
||||
|
||||
from django.urls import include, path
|
||||
|
||||
from base.urls import urlpatterns
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns.append(
|
||||
path("df/", include("dynamic_fields.urls")),
|
||||
|
||||
@@ -8,8 +8,10 @@ class HelpdeskConfig(AppConfig):
|
||||
def ready(self):
|
||||
from django.urls import include, path
|
||||
|
||||
from horilla.horilla_settings import APPS
|
||||
from horilla.urls import urlpatterns
|
||||
|
||||
APPS.append("helpdesk")
|
||||
urlpatterns.append(
|
||||
path("helpdesk/", include("helpdesk.urls")),
|
||||
)
|
||||
|
||||
@@ -48,19 +48,19 @@ APP_URLS = [
|
||||
]
|
||||
|
||||
APPS = [
|
||||
"base",
|
||||
"recruitment",
|
||||
"employee",
|
||||
"leave",
|
||||
"pms",
|
||||
"onboarding",
|
||||
"asset",
|
||||
"attendance",
|
||||
"payroll",
|
||||
"auth",
|
||||
"offboarding",
|
||||
"base",
|
||||
"employee",
|
||||
"accessibility",
|
||||
"dynamic_fields",
|
||||
"horilla_audit",
|
||||
"horilla_views",
|
||||
"horilla_backup",
|
||||
"horilla_crumbs",
|
||||
"horilla_widgets",
|
||||
"horilla_documents",
|
||||
"helpdesk",
|
||||
"horilla_automations",
|
||||
"notifications",
|
||||
]
|
||||
|
||||
NO_PERMISSION_MODALS = [
|
||||
|
||||
@@ -8,8 +8,10 @@ class LeaveConfig(AppConfig):
|
||||
def ready(self):
|
||||
from django.urls import include, path
|
||||
|
||||
from horilla.horilla_settings import APPS
|
||||
from horilla.urls import urlpatterns
|
||||
|
||||
APPS.append("leave")
|
||||
urlpatterns.append(
|
||||
path("leave/", include("leave.urls")),
|
||||
)
|
||||
|
||||
@@ -8,8 +8,10 @@ class OffboardingConfig(AppConfig):
|
||||
def ready(self):
|
||||
from django.urls import include, path
|
||||
|
||||
from horilla.horilla_settings import APPS
|
||||
from horilla.urls import urlpatterns
|
||||
|
||||
APPS.append("offboarding")
|
||||
urlpatterns.append(
|
||||
path("offboarding/", include("offboarding.urls")),
|
||||
)
|
||||
|
||||
@@ -8,8 +8,10 @@ class OnboardingConfig(AppConfig):
|
||||
def ready(self):
|
||||
from django.urls import include, path
|
||||
|
||||
from horilla.horilla_settings import APPS
|
||||
from horilla.urls import urlpatterns
|
||||
|
||||
APPS.append("onboarding")
|
||||
urlpatterns.append(
|
||||
path("onboarding/", include("onboarding.urls")),
|
||||
)
|
||||
|
||||
@@ -18,8 +18,10 @@ class PayrollConfig(AppConfig):
|
||||
ready = super().ready()
|
||||
from django.urls import include, path
|
||||
|
||||
from horilla.horilla_settings import APPS
|
||||
from horilla.urls import urlpatterns
|
||||
|
||||
APPS.append("payroll")
|
||||
urlpatterns.append(
|
||||
path("payroll/", include("payroll.urls.urls")),
|
||||
)
|
||||
|
||||
@@ -17,8 +17,10 @@ class PmsConfig(AppConfig):
|
||||
def ready(self):
|
||||
from django.urls import include, path
|
||||
|
||||
from horilla.horilla_settings import APPS
|
||||
from horilla.urls import urlpatterns
|
||||
|
||||
APPS.append("pms")
|
||||
urlpatterns.append(
|
||||
path("pms/", include("pms.urls")),
|
||||
)
|
||||
|
||||
@@ -23,8 +23,10 @@ class RecruitmentConfig(AppConfig):
|
||||
def ready(self):
|
||||
from django.urls import include, path
|
||||
|
||||
from horilla.horilla_settings import APPS
|
||||
from horilla.urls import urlpatterns
|
||||
|
||||
APPS.append("recruitment")
|
||||
urlpatterns.append(
|
||||
path("recruitment/", include("recruitment.urls")),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user