Skip to content

Commit

Permalink
Template update for easy user navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
ZEZE1020 committed Jan 12, 2025
1 parent 88aac2e commit b443977
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
18 changes: 9 additions & 9 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Social Media API</title>
{% load static %}
<title>{% block title %}My Social Media API{% endblock %}</title>
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="{% url 'home' %}">Home</a></li>
{% if user.is_authenticated %}
<li><a href="{% url 'account_logout' %}">Logout</a></li>
{% else %}
<li><a href="{% url 'account_login' %}">Login</a></li>
<li><a href="{% url 'account_signup' %}">Sign Up</a></li>
{% endif %}
<li><a href="/admin/">Admin</a></li>
<li><a href="/api/accounts/">Accounts API</a></li>
<li><a href="/api/notifications/">Notifications API</a></li>
<li><a href="/api/posts/">Posts API</a></li>
<li><a href="/accounts/">Accounts</a></li>
</ul>
</nav>
</header>

<main>
{% block content %}
{% endblock %}
</main>

<footer>
<p>&copy; 2025 Social Media API</p>
<p>&copy; 2025 My Social Media API</p>
</footer>
</body>
</html>
16 changes: 14 additions & 2 deletions templates/home.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{% extends 'base.html' %}

{% block title %}Home{% endblock %}

{% block content %}
<h1>Welcome to Social Media API</h1>
<p>This is a simple API for managing posts, users, and notifications.</p>
<h1>Welcome to My Social Media API</h1>
<p>Here are the paths you can access:</p>
<ul>
<li><a href="{% url 'home' %}">Home</a>: This page</li>
<li><a href="/admin/">Admin</a>: Access the Django admin interface</li>
<li><a href="/api/accounts/">Accounts API</a>: View and manage user accounts via API</li>
<li><a href="/api/notifications/">Notifications API</a>: View and manage notifications via API</li>
<li><a href="/api/posts/">Posts API</a>: View and manage posts via API</li>
<li><a href="/accounts/">Accounts</a>: Access the accounts section</li>
<li><a href="/static/path/to/static/file">Static Files</a>: Access static files</li>
<li><a href="/path/to/other/files">Other Files</a>: Access other files</li>
</ul>
{% endblock %}

0 comments on commit b443977

Please sign in to comment.