chore: add skeleton for information app

!8
This commit is contained in:
2024-05-19 08:15:48 +09:30
parent 191244ed40
commit e8ab3a0aa5
7 changed files with 75 additions and 0 deletions

View File

@ -217,3 +217,7 @@ if DEBUG:
"127.0.0.1",
]
# Apps Under Development
INSTALLED_APPS += [
'information.apps.InformationConfig',
]

View File

@ -43,4 +43,6 @@ if settings.DEBUG:
urlpatterns += [
path("__debug__/", include("debug_toolbar.urls"), name='_debug'),
# Apps Under Development
path("information/", include("information.urls")),
]

View File

6
app/information/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class InformationConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'information'

13
app/information/urls.py Normal file
View File

@ -0,0 +1,13 @@
from django.urls import path
from . import views
from .views import knowledge_base, playbooks
app_name = "Information"
urlpatterns = [
path("kb/", knowledge_base.Index.as_view(), name="Knowledge Base"),
path("playbook/", playbooks.Index.as_view(), name="Playbooks"),
]

View File

@ -0,0 +1,25 @@
import json
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.db.models import Q
from django.shortcuts import render
from django.views import generic
from access.mixin import OrganizationPermission
class Index(generic.View):
# permission_required = [
# 'itil.view_knowledge_base'
# ]
template_name = 'base.html.j2'
def get(self, request):
context = {}
context['content_title'] = 'Knowledge Base'
return render(request, self.template_name, context)

View File

@ -0,0 +1,25 @@
import json
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.db.models import Q
from django.shortcuts import render
from django.views import generic
from access.mixin import OrganizationPermission
class Index(generic.View):
# permission_required = [
# 'itil.view_playbook'
# ]
template_name = 'base.html.j2'
def get(self, request):
context = {}
context['content_title'] = 'Playbooks'
return render(request, self.template_name, context)