Commit 7cccb446 authored by Hildegunn Elin Olaussen Nedregård's avatar Hildegunn Elin Olaussen Nedregård
Browse files

Fixed folder structure

parent 9107bcfa
......@@ -3,7 +3,7 @@
<head> <meta charset="utf-8">
<title> </title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="../../static/main.css">
<link rel="stylesheet" type="text/css" href="../static/css/main.css">
</head>
<header>
......@@ -47,7 +47,7 @@ Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="../../static/header.js"></script>
<script src="../../static/footer.js"></script>
<script src="../static/js/header.js"></script>
<script src="../static/js/footer.js"></script>
</html>
\ No newline at end of file
......@@ -26,7 +26,7 @@
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="/startpage", style="font-weight: bold">Rød tråd</a>
<a class="nav-link" href="", style="font-weight: bold">Rød tråd</a>
<li class="nav-item">
<a class="nav-link" href="#">Utfordringer</a>
</li>
......
......@@ -31,7 +31,7 @@ ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'startpage.apps.StartpageConfig',
#'startpage.apps.StartpageConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
......
......@@ -14,29 +14,24 @@ Including another URLconf
2. Add a URL to urlpatterns: path('startpage/', include('startpage.urls'))
"""
from django.contrib import admin
<<<<<<< rodTraa/rodTraa/urls.py
from django.urls import path, include
from django.urls import path
from django.conf.urls.static import static
from . import settings
urlpatterns = [
path('admin/', admin.site.urls),
# Denne linker til startpage/urls.py
path('startpage/', include('startpage.urls')),
]
=======
from django.urls import path
from django.conf.urls.static import static
from . import settings
from apps.staticpages.views import index
from apps.staticpages.views import startpage
from apps.staticpages.views import myprofile
urlpatterns = [
path('admin/', admin.site.urls),
path('', index),
path('startpage/', startpage),
path('myprofile/<int:pk>/', myprofile),
path('startpage/', include('startpage.urls')),
#path('', index),
#path('myprofile/<int:pk>/', myprofile),
#path('startpage/', include('startpage.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
>>>>>>> rodTraa/rodTraa/urls.py
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class StartpageConfig(AppConfig):
name = 'startpage'
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
urlpatterns = [
# Denne linker til "home" i views.py
path('', views.home, name='startpage-home'),
# Denne linker til "login" i views.py
path('login/', views.login, name='startpage-login'),
]
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpResponse
def home(request):
context = {
'posts': posts
}
return render(request, 'startpage/UserFrontpage.html', context)
def login(request):
return render(request, 'startpage/login.html')
posts = [
{
'author': 'Sander Høyland',
'title': 'Strikkeoppdatering 1',
'content': 'Startet på et nytt pannebånd!',
'date-posted': '10.02.2020'
},
{
'author': 'Sander Høyland',
'title': 'Strikkeoppdatering 2',
'content': 'Ferdig med pannebåndet!',
'date-posted': '18.02.2020'
}
]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment