Compare commits
No commits in common. "9a8d9f9c60eaf7e873a18dc22b130479f458898b" and "87321b44e17100fb90e5a6ae6325584a016b27e0" have entirely different histories.
9a8d9f9c60
...
87321b44e1
|
|
@ -43,7 +43,6 @@ INSTALLED_APPS = [
|
||||||
"django.contrib.sessions",
|
"django.contrib.sessions",
|
||||||
"django.contrib.messages",
|
"django.contrib.messages",
|
||||||
"django.contrib.staticfiles",
|
"django.contrib.staticfiles",
|
||||||
"core",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
|
@ -131,7 +130,6 @@ STATIC_ROOT = BASE_DIR / "static"
|
||||||
|
|
||||||
# User model and authentication
|
# User model and authentication
|
||||||
AUTH_USER_MODEL = "accounts.User"
|
AUTH_USER_MODEL = "accounts.User"
|
||||||
LOGOUT_REDIRECT_URL = "core:homepage"
|
|
||||||
|
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,5 @@ from django.urls import include, path
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("", include("core.urls", namespace="core")),
|
|
||||||
path("accounts/", include("accounts.urls")),
|
path("accounts/", include("accounts.urls")),
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{% load static %}
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<title>
|
|
||||||
{% block title %}Astronomy Base - The Dazed Gerbil{% endblock %}
|
|
||||||
</title>
|
|
||||||
{% block styles %}{% endblock %}
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
{% block page %}
|
|
||||||
{% block usernav %}
|
|
||||||
{% include 'usernav.html' %}
|
|
||||||
{% endblock %}
|
|
||||||
{% block header %}
|
|
||||||
{% include 'header.html' %}
|
|
||||||
{% endblock %}
|
|
||||||
{% block sitenav %}{% endblock %}
|
|
||||||
{% block content %}{% endblock %}
|
|
||||||
{% block footer %}
|
|
||||||
{% include 'footer.html' %}
|
|
||||||
{% endblock %}
|
|
||||||
{% endblock %}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<footer>
|
|
||||||
<p>© The Dazed Gerbil 2025 to {% now "Y" %}</p>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<header>
|
|
||||||
<h1><a href="{% url 'core:homepage' %}">Astronomy Base by The Dazed Gerbil</a></h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
<nav>
|
|
||||||
<hr />
|
|
||||||
<ul>
|
|
||||||
{% if page_obj.has_previous %}
|
|
||||||
<li><a href="?page=1">« first</a></li>
|
|
||||||
<li><a href="?page={{ page_obj.previous_page_number }}">previous</a></li>
|
|
||||||
{% endif %} {% for page in page_obj.paginator.page_range %}
|
|
||||||
<li><a href="?page={{ page }}">{{ page }}</a></li>
|
|
||||||
{% endfor %} {% if page_obj.has_next %}
|
|
||||||
<li><a href="?page={{ page_obj.next_page_number }}">next</a></li>
|
|
||||||
<li><a href="?page={{ page_obj.paginator.num_pages }}">last »</a></li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
<div>
|
|
||||||
<ul>
|
|
||||||
{% if request.user.is_authenticated %}
|
|
||||||
<span>Nice to see you again {{ request.user }}!</span>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'dashboard:dashboard' %}">Dashboard</a>
|
|
||||||
</li>
|
|
||||||
{# <li><a href="{% url 'display_profile' %}">Account profile</a></li> #}
|
|
||||||
<li>
|
|
||||||
<form method="post" action="{% url 'logout' %}" style="display: inline;">
|
|
||||||
{% csrf_token %}
|
|
||||||
<button type="submit"
|
|
||||||
style="background: none;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0;
|
|
||||||
text-decoration: underline">Logout</button>
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
{% else %}
|
|
||||||
{# <li><a href="{% url 'django_registration_register' %}">Sign up</a></li> #}
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'login' %}">Login</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'password_reset' %}">Forgotten password?</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
from django.urls import path
|
|
||||||
|
|
||||||
from .views import Homepage
|
|
||||||
|
|
||||||
app_name = "core"
|
|
||||||
|
|
||||||
urlpatterns = [
|
|
||||||
path("", Homepage.as_view(), name="homepage"),
|
|
||||||
]
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
from django.views.generic import TemplateView
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
||||||
class Homepage(TemplateView):
|
|
||||||
template_name = "core/homepage.html"
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue