~sirodoht/mataroa

2ac02448c9b6f288e696259240802b835375e2ca — Theodore Keloglou 3 months ago d232829
add modus privacy redirect
2 files changed, 5 insertions(+), 0 deletions(-)

M main/urls.py
M main/views.py
M main/urls.py => main/urls.py +1 -0
@@ 12,6 12,7 @@ urlpatterns = [
    path("dashboard/", views.dashboard, name="dashboard"),
    path("modus/operandi/", views.operandi, name="operandi"),
    path("modus/transparency/", views.transparency, name="transparency"),
    path("modus/privacy/", views.privacy_redir, name="privacy_redir"),
    path("guides/markdown/", views.guides_markdown, name="guides_markdown"),
    path("guides/images/", views.guides_images, name="guides_images"),
    path("guides/comments/", views.guides_comments, name="guides_comments"),

M main/views.py => main/views.py +4 -0
@@ 1138,6 1138,10 @@ def operandi(request):
    return render(request, "main/operandi.html")


def privacy_redir(request):
    return redirect("operandi", permanent=True)


def transparency(request):
    monthly_revenue = models.User.objects.filter(is_premium=True).count() * 9 / 12
    published_posts = models.Post.objects.filter(published_at__isnull=False).count()