Skip to content
Snippets Groups Projects
Commit ce7752aa authored by Webster, Aidan (UG - Comp Sci & Elec Eng)'s avatar Webster, Aidan (UG - Comp Sci & Elec Eng)
Browse files

Create 'core' app

parent f2c7a299
No related branches found
No related tags found
No related merge requests found
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class CoreConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'core'
File added
from django.db import models
# Create your models here.
Initial index page
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
urlpatterns = [
path('', views.index)
]
from django.shortcuts import render
# Create your views here.
def index(request):
return render(request, 'index.html')
......@@ -42,6 +42,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'core'
]
MIDDLEWARE = [
......
......@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include("core.urls"))
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment