diff --git a/ubottu/factoids/apps.py b/ubottu/factoids/apps.py index 0fcd820..aa31fb0 100644 --- a/ubottu/factoids/apps.py +++ b/ubottu/factoids/apps.py @@ -3,4 +3,4 @@ from django.apps import AppConfig class FactoidsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' - name = 'factoids' + name = 'factoids' \ No newline at end of file diff --git a/ubottu/factoids/views.py b/ubottu/factoids/views.py index fecb491..93a185a 100644 --- a/ubottu/factoids/views.py +++ b/ubottu/factoids/views.py @@ -1,6 +1,8 @@ from django.http import HttpResponse, Http404 from rest_framework.views import APIView from rest_framework.decorators import api_view +from django.utils.decorators import method_decorator +from django.views.decorators.cache import cache_page from rest_framework.response import Response from .models import Fact from .serializers import FactSerializer diff --git a/ubottu/ubottu/settings.py b/ubottu/ubottu/settings.py index 0e4e45b..0dd6f36 100644 --- a/ubottu/ubottu/settings.py +++ b/ubottu/ubottu/settings.py @@ -15,7 +15,6 @@ from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent - # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ @@ -25,6 +24,13 @@ SECRET_KEY = 'aekeijahsheik8AhghaiDie5awuen3ahvaeHeeyirahsaic4einaePeiyoophahd' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.db.DatabaseCache', + 'LOCATION': 'cache', + } +} + ALLOWED_HOSTS = ['*'] REST_FRAMEWORK = { diff --git a/ubottu/ubottu/urls.py b/ubottu/ubottu/urls.py index 61a2b75..8625bbb 100644 --- a/ubottu/ubottu/urls.py +++ b/ubottu/ubottu/urls.py @@ -4,6 +4,7 @@ from django.shortcuts import redirect urlpatterns = [ path("factoids/", include("factoids.urls")), + path("bugtracker/", include("bugtracker.urls")), path("admin/", admin.site.urls), path('', lambda request: redirect('factoids/', permanent=False)), # Redirect from root to 'factoids' ] \ No newline at end of file