Skip to content

Commit 33f0bf0

Browse files
committed
chore: home page for the sample development service
1 parent e8a503b commit 33f0bf0

3 files changed

Lines changed: 93 additions & 1 deletion

File tree

django_service/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
TEMPLATES = [
7474
{
7575
"BACKEND": "django.template.backends.django.DjangoTemplates",
76-
"DIRS": [],
76+
"DIRS": [BASE_DIR / "django_service/templates"],
7777
"APP_DIRS": True,
7878
"OPTIONS": {
7979
"context_processors": [
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Django Email Learning Sample Service</title>
7+
<style>
8+
body {
9+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
10+
line-height: 1.6;
11+
font-weight: 400;
12+
}
13+
a {
14+
color: #02b8a5;
15+
text-decoration: none;
16+
}
17+
.container {
18+
max-width: 800px;
19+
margin: 0 auto;
20+
padding: 2rem;
21+
}
22+
h1 {
23+
color: #2c3e50;
24+
font-size: 1.5rem;
25+
}
26+
h2 {
27+
color: #2c3e50;
28+
font-size: 1.3rem;
29+
margin-top: 1.5rem;
30+
}
31+
p {
32+
font-size: 1.1em;
33+
line-height: 1.6;
34+
}
35+
code {
36+
background-color: #efefef;
37+
display: inline-block;
38+
padding: 1px 6px;
39+
border-radius: 6px;
40+
color: rgb(52, 51, 51);
41+
}
42+
</style>
43+
</head>
44+
<body>
45+
<div class="container">
46+
<h1>Welcome to Django Email Learning Development Sample Service</h1>
47+
<p>
48+
This is a sample Django service demonstrating the Django Email Learning package,
49+
intended for development and testing only.<br />
50+
We use <a href="https://vite.dev/">Vite</a> to build the frontend assets of this Django library. During development,
51+
ensure the Vite server is running. In a separate shell from your Django server,
52+
navigate to the "frontend" folder, install dependencies <code>npm install</code>
53+
and run the development server <code>npm run dev</code>. <br/>
54+
We are using react for the frontend development, and for UI components, we are using
55+
<a href="https://mui.com/">MUI</a> library.</p>
56+
<p>
57+
Also make sure that you have run the necessary migrations <code>python manage.py migrate</code>
58+
and have a superuser created <code>python manage.py createsuperuser</code> to access the admin interface.
59+
</p>
60+
<p>
61+
If you encounter any issues while setting up or running the development server,
62+
feel free to start a discussion in the <a href="https://github.com/AvaCodeSolutions/django-email-learning/discussions">GitHub Discussions</a>.
63+
</p>
64+
65+
<p>
66+
To access the Course Management interface, navigate to
67+
<a href="/email_learning/platform/courses/">/email_learning/platform/courses/</a>.
68+
</p>
69+
<h2>External Links</h2>
70+
<ul>
71+
<li><a href="https://github.com/AvaCodeSolutions/django-email-learning">Github Repository</a></li>
72+
<li><a href="https://github.com/orgs/AvaCodeSolutions/projects/5/views/4">Project Roadmap</a></li>
73+
</ul>
74+
<h2>Sponsor the Project</h2>
75+
<p>
76+
If you find this project useful and would like to support its development,
77+
consider sponsoring us on <a href="https://github.com/sponsors/AvaCodeSolutions">GitHub Sponsors</a> or
78+
<a href="https://opencollective.com/django-email-learning">Open Collective</a>.
79+
</p>
80+
</div>
81+
</body>
82+
</html>

django_service/urls.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,20 @@
1515
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
1616
"""
1717
from django.contrib import admin
18+
from django.views.generic import TemplateView
19+
from django.contrib.auth import views as auth_views
1820
from django.urls import path, include
1921

2022
urlpatterns = [
23+
path(
24+
"", TemplateView.as_view(template_name="django_service/home.html"), name="home"
25+
),
2126
path("admin/", admin.site.urls),
27+
path(
28+
"accounts/login/",
29+
auth_views.LoginView.as_view(template_name="admin/login.html"),
30+
name="login",
31+
),
2232
path(
2333
"email_learning/",
2434
include("django_email_learning.urls", namespace="django_email_learning"),

0 commit comments

Comments
 (0)