Rename 'mainsite' to 'website'
|
@ -57,7 +57,7 @@ class LogoutView(RedirectView):
|
|||
auth_logout(self.request)
|
||||
if "next" in self.request.GET:
|
||||
return self.request.GET["next"]
|
||||
return reverse("mainsite:home")
|
||||
return reverse("website:home")
|
||||
|
||||
if "next" in self.request.GET:
|
||||
return "{}?next={}".format(
|
||||
|
|
|
@ -27,7 +27,7 @@ INSTALLED_APPS = [
|
|||
"django.contrib.staticfiles",
|
||||
"markdownx",
|
||||
"haystack",
|
||||
"mainsite",
|
||||
"website",
|
||||
"inventory",
|
||||
"django_cas_ng",
|
||||
"accounts",
|
||||
|
@ -90,7 +90,7 @@ MARKDOWNX_MARKDOWN_EXTENSIONS = [
|
|||
"markdown.extensions.extra",
|
||||
"markdown.extensions.sane_lists",
|
||||
"iconfonts",
|
||||
"mainsite.markdown",
|
||||
"website.markdown",
|
||||
"inventory.markdown",
|
||||
]
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ urlpatterns = [
|
|||
path("markdownx/", include("markdownx.urls")),
|
||||
path("inventory/", include("inventory.urls")),
|
||||
path("account/", include("accounts.urls")),
|
||||
path("", include("mainsite.urls")),
|
||||
path("", include("website.urls")),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
default_app_config = "mainsite.apps.MainsiteConfig"
|
1
website/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
default_app_config = "website.apps.WebsiteConfig"
|
|
@ -1,6 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class MainsiteConfig(AppConfig):
|
||||
name = "mainsite"
|
||||
class WebsiteConfig(AppConfig):
|
||||
name = "website"
|
||||
verbose_name = "Site internet"
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 3.1.2 on 2020-12-13 14:19
|
||||
# Generated by Django 3.1.2 on 2020-12-27 11:34
|
||||
|
||||
from django.db import migrations, models
|
||||
import markdownx.models
|
|
@ -22,6 +22,6 @@ class MarkdownPage(models.Model):
|
|||
|
||||
def get_absolute_url(self):
|
||||
if self.slug:
|
||||
return reverse("mainsite:md_page", args=[self.slug])
|
||||
return reverse("website:md_page", args=[self.slug])
|
||||
else:
|
||||
return reverse("mainsite:home")
|
||||
return reverse("website:home")
|
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 886 B After Width: | Height: | Size: 886 B |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 488 B |
|
@ -3,5 +3,5 @@
|
|||
{% block "content" %}
|
||||
<h1>Requête invalide</h1>
|
||||
<p>Votre requête au serveur est invalide et n'a donc pas pu être traitée.</p>
|
||||
<p>Vous pouvez retourner sur la <a href="{% url "mainsite:home" %}">page d'accueil</a>.</p>
|
||||
<p>Vous pouvez retourner sur la <a href="{% url "website:home" %}">page d'accueil</a>.</p>
|
||||
{% endblock %}
|
|
@ -7,5 +7,5 @@
|
|||
<p>Cet accès vous est probablement refusé car vous n'êtes actuellement pas connecté·e.
|
||||
Vous pouvez vous rendre à la page de <a href="{% url "accounts:login" %}?next={{ request.get_full_path }}">connexion</a>.</p>
|
||||
{% endif %}
|
||||
<p>Vous pouvez retourner sur la <a href="{% url "mainsite:home" %}">page d'accueil</a>.</p>
|
||||
<p>Vous pouvez retourner sur la <a href="{% url "website:home" %}">page d'accueil</a>.</p>
|
||||
{% endblock %}
|
|
@ -3,5 +3,5 @@
|
|||
{% block "content" %}
|
||||
<h1>Page introuvable</h1>
|
||||
<p>La page que vous avez demandée n'existe plus ou n'a jamais existé.</p>
|
||||
<p>Vous pouvez retourner sur la <a href="{% url "mainsite:home" %}">page d'accueil</a>.</p>
|
||||
<p>Vous pouvez retourner sur la <a href="{% url "website:home" %}">page d'accueil</a>.</p>
|
||||
{% endblock %}
|
|
@ -4,5 +4,5 @@
|
|||
<h1>Incident technique</h1>
|
||||
<p>Un incident technique est survenu pendant l'affichage de cette page.</p>
|
||||
<p>Nous allons essayer de résoudre le problème au plus vite.</p>
|
||||
<p>Vous pouvez retourner sur la <a href="{% url "mainsite:home" %}">page d'accueil</a>.</p>
|
||||
<p>Vous pouvez retourner sur la <a href="{% url "website:home" %}">page d'accueil</a>.</p>
|
||||
{% endblock %}
|
|
@ -8,7 +8,7 @@
|
|||
<nav>
|
||||
{% with url_name=request.resolver_match.url_name %}
|
||||
<div>
|
||||
<a {% if url_name == "home" %}class="current"{% endif %} href="{% url "mainsite:home" %}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
||||
<a {% if url_name == "home" %}class="current"{% endif %} href="{% url "website:home" %}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
||||
<a {% if url_name == "inventory" %}class="current"{% endif %} href="{% url "inventory:inventory" %}">Inventaire</a>
|
||||
<a {% if url_name == "suggestions" %}class="current"{% endif %} href="">Suggestions</a>
|
||||
{% if request.user.is_staff %}
|
|
@ -1,7 +1,7 @@
|
|||
from django.urls import path
|
||||
from .views import MarkdownPageView
|
||||
|
||||
app_name = "mainsite"
|
||||
app_name = "website"
|
||||
|
||||
urlpatterns = [
|
||||
path("", MarkdownPageView.as_view(), {"slug": ""}, name="home"),
|
|
@ -6,7 +6,7 @@ from .models import MarkdownPage
|
|||
|
||||
class MarkdownPageView(DetailView):
|
||||
model = MarkdownPage
|
||||
template_name = "mainsite/markdown_page.html"
|
||||
template_name = "website/markdown_page.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|