# mysite/mysite/urls.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('', include('multimedia.urls')),
path('admin/', admin.site.urls),
]
# mysite/multimedia/urls.py
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]
# mysite/multimedia/views.py
from django.shortcuts import render
context = {
'site_title':'Django App',
'page_title': 'ទំព័រដើម',
}
def index(request):
return render(request, 'front/home.html', context)
<!--mysite/multimedia/templates/front/home.html-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>{{ site_title }} | {{ page_title}}</title>
{% load static %}
<link href="{% static 'images/site_logo.png' %}" rel="icon" />
<link href="{% static 'fonts/setup.css' %}" rel="stylesheet" />
<link href="{% static 'styles/base.css' %}" rel="stylesheet" />
<script src="{% static 'scripts/jquery.js' %}"></script>
</head>
<body>
Welcome to Khmer Web Django application!
</body>
</html>
/* mysite/multimedia/static/styles/base.css */
:root{
--background-light: #68accc;
--background: white;
--background-dark: #287494;
--body-font: 14px/1.5 Vidaloka, OdorMeanChey;
--link: #447e9b;
--color: rgb(109, 109, 109);
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
a{
text-decoration: none;
color: var(--link);
}
a:hover{
opacity: .7;
}
.region{
max-width: 1100px;
margin: 0 auto;
}
body{
color: var(--color);
font: var(--body-font);
background: var(--background);
}