mirror of
https://github.com/thecyberlearn/modern-django-starter.git
synced 2026-08-18 07:52:54 +00:00
✨ Features: - Complete Django project with authentication - Email/password and social login (Google, Facebook) - Role-based access control (admin, staff, user) - Docker and Docker Compose setup - Production-ready configuration - Static file handling with WhiteNoise - PostgreSQL database integration - Comprehensive documentation - GitHub CI/CD workflows - Dokploy deployment configuration 🚀 Ready for deployment on Dokploy, Heroku, Railway, and other platforms
93 lines
4.1 KiB
HTML
93 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}Django Boilerplate{% endblock %}</title>
|
|
{% load static %}
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="{% url 'core:home' %}">Django App</a>
|
|
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<ul class="navbar-nav me-auto">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{% url 'core:home' %}">Home</a>
|
|
</li>
|
|
{% if user.is_authenticated %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{% url 'accounts:dashboard' %}">Dashboard</a>
|
|
</li>
|
|
{% if user.has_role %}
|
|
{% if user.has_role:'staff' or user.has_role:'admin' %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{% url 'core:staff_dashboard' %}">Staff</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if user.has_role:'admin' %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{% url 'core:admin_dashboard' %}">Admin</a>
|
|
</li>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
</ul>
|
|
|
|
<ul class="navbar-nav">
|
|
{% if user.is_authenticated %}
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
|
|
{{ user.full_name|default:user.email }}
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li><a class="dropdown-item" href="{% url 'accounts:profile' %}">Profile</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li><a class="dropdown-item" href="{% url 'account_logout' %}">Logout</a></li>
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{% url 'account_login' %}">Login</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{% url 'account_signup' %}">Sign Up</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="container mt-4">
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
|
|
{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% block content %}
|
|
{% endblock %}
|
|
</main>
|
|
|
|
<footer class="bg-dark text-light text-center py-3 mt-5">
|
|
<div class="container">
|
|
<p>© 2024 Django Boilerplate. Built with Django & Bootstrap.</p>
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="{% static 'js/main.js' %}"></script>
|
|
</body>
|
|
</html> |