Rename profile to billing
This commit is contained in:
parent
b2707cbbe0
commit
477baeec32
|
@ -23,7 +23,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
SECRET_KEY = "insecure-fake-key-do-not-use-in-production"
|
SECRET_KEY = "insecure-fake-key-do-not-use-in-production"
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = False
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = []
|
ALLOWED_HOSTS = []
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,11 @@ from django.contrib import admin
|
||||||
from django.urls import include, path
|
from django.urls import include, path
|
||||||
|
|
||||||
from core.ui.views.drilldown import Drilldown
|
from core.ui.views.drilldown import Drilldown
|
||||||
from core.views import Home, Profile, Signup
|
from core.views import Billing, Home, Signup
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", Home.as_view(), name="home"),
|
path("", Home.as_view(), name="home"),
|
||||||
path("profile/", Profile.as_view(), name="profile"),
|
path("billing/", Billing.as_view(), name="billing"),
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("accounts/", include("django.contrib.auth.urls")),
|
path("accounts/", include("django.contrib.auth.urls")),
|
||||||
path("accounts/signup/", Signup.as_view(), name="signup"),
|
path("accounts/signup/", Signup.as_view(), name="signup"),
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="collapse navbar-collapse" id="base-nav">
|
<div class="collapse navbar-collapse" id="base-nav">
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<li><a href="{% url 'profile' %}">Profile</a></li>
|
<li><a href="{% url 'billing' %}">Billing</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.paid %}
|
{% if user.paid %}
|
||||||
<li><a href="{% url 'drilldown' %}">Drilldown</a></li>
|
<li><a href="{% url 'drilldown' %}">Drilldown</a></li>
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
<button id="setup-button">Setup payment mandate</button>
|
<button id="setup-button">Setup payment mandate</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% include 'checkout.html' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,12 +1,10 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="title">Pathogen Products Panel</h1>
|
<h1 class="title">Pathogen Data Insights</h1>
|
||||||
<h2 class="subtitle">Billing and subscription management</h2>
|
<div class="container">
|
||||||
|
<h2 class="subtitle">Welcome to the Neptune system</h2>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{% if user.subscription_active %}
|
<h2 class="subtitle">Hello!</h2>
|
||||||
{% include 'checkout.html' %}
|
</div>
|
||||||
{% else %}
|
|
||||||
<h2> Please setup a payment mandate in the profile page to view products </h2>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -16,8 +16,8 @@ class Home(View):
|
||||||
return render(request, self.template_name)
|
return render(request, self.template_name)
|
||||||
|
|
||||||
|
|
||||||
class Profile(LoginRequiredMixin, View):
|
class Billing(LoginRequiredMixin, View):
|
||||||
template_name = "profile.html"
|
template_name = "billing.html"
|
||||||
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
return render(request, self.template_name)
|
return render(request, self.template_name)
|
||||||
|
|
Loading…
Reference in New Issue