mirror of
https://github.com/kristoferssolo/kristofersxyz.git
synced 2025-10-21 18:30:34 +00:00
Updated KARBS
This commit is contained in:
parent
bce82d5c5f
commit
a565762f65
@ -1,3 +0,0 @@
|
||||
# from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
@ -1,6 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class KarbsConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "karbs"
|
||||
@ -1,3 +0,0 @@
|
||||
# from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
@ -1,3 +0,0 @@
|
||||
# from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@ -1,7 +0,0 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.karbs, name="karbs"),
|
||||
path("instructions", views.instructions, name="instructions"),
|
||||
]
|
||||
@ -1,11 +0,0 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
def instructions(request):
|
||||
"""Karbs Instruction"""
|
||||
return render(request, "karbs/instructions.html", {"title": "Karbs Instructions"})
|
||||
|
||||
|
||||
def karbs(request):
|
||||
"""Karbs install script"""
|
||||
return render(request, "karbs/karbs", {"title": "KARBS"})
|
||||
@ -4,6 +4,6 @@ from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="home"),
|
||||
path("projects", views.projects, name="projects"),
|
||||
path("karbs", views.karbs, name="karbs"),
|
||||
path("lightsaber", views.lightsaber, name="lightsaber"),
|
||||
]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from django.shortcuts import render
|
||||
from django.shortcuts import redirect, render
|
||||
|
||||
|
||||
def index(request):
|
||||
@ -11,3 +11,8 @@ def lightsaber(request):
|
||||
|
||||
def projects(request):
|
||||
return render(request, "main/projects.html", {"title": "Projects"})
|
||||
|
||||
|
||||
def karbs(request):
|
||||
"""Karbs install script"""
|
||||
return redirect("/projects/karbs/")
|
||||
|
||||
3
kristofersxyz/apps/projects/admin.py
Normal file
3
kristofersxyz/apps/projects/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
kristofersxyz/apps/projects/apps.py
Normal file
6
kristofersxyz/apps/projects/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ProjectsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'projects'
|
||||
3
kristofersxyz/apps/projects/models.py
Normal file
3
kristofersxyz/apps/projects/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
3
kristofersxyz/apps/projects/tests.py
Normal file
3
kristofersxyz/apps/projects/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
9
kristofersxyz/apps/projects/urls.py
Normal file
9
kristofersxyz/apps/projects/urls.py
Normal file
@ -0,0 +1,9 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.projects, name="projects"),
|
||||
path("karbs", views.karbs, name="karbs"),
|
||||
path("karbs/instructions", views.instructions, name="instructions"),
|
||||
]
|
||||
13
kristofersxyz/apps/projects/views.py
Normal file
13
kristofersxyz/apps/projects/views.py
Normal file
@ -0,0 +1,13 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
def projects(request):
|
||||
return render(request, "projects/projects.html", {"title": "Projects"})
|
||||
|
||||
|
||||
def karbs(request):
|
||||
return render(request, "projects/karbs/karbs", {"title": "KARBS"})
|
||||
|
||||
|
||||
def instructions(request):
|
||||
return render(request, "projects/karbs/instructions.html", {"title": "Karbs Instructions"})
|
||||
@ -46,7 +46,7 @@ INSTALLED_APPS = [
|
||||
"django.contrib.staticfiles",
|
||||
"fontawesomefree",
|
||||
"main",
|
||||
"karbs",
|
||||
"projects",
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
||||
@ -13,15 +13,15 @@ Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path("blog/", include("blog.urls"))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
path("", include("main.urls")),
|
||||
path("karbs/", include("karbs.urls")),
|
||||
path("projects/", include("projects.urls")),
|
||||
]
|
||||
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user