forked from Fediversity/Fediversity
rename form and add navigation element
This commit is contained in:
parent
af1c051498
commit
a97418c30e
4 changed files with 8 additions and 5 deletions
|
@ -26,6 +26,9 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'service_list' %}">Services</a>
|
<a href="{% url 'service_list' %}">Services</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'configuration_form' %}">Configuration</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
{% load custom_tags %}
|
{% load custom_tags %}
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form method="post" enctype="multipart/form-data" action="{% url 'deploy_services' %}">
|
<form method="post" enctype="multipart/form-data" action="{% url 'configuration_form' %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form.as_p }}
|
||||||
|
|
|
@ -25,5 +25,5 @@ urlpatterns = [
|
||||||
path("", include("django.contrib.auth.urls")),
|
path("", include("django.contrib.auth.urls")),
|
||||||
path("account/", views.AccountDetail.as_view(), name='account_detail'),
|
path("account/", views.AccountDetail.as_view(), name='account_detail'),
|
||||||
path("services/", views.ServiceList.as_view(), name='service_list'),
|
path("services/", views.ServiceList.as_view(), name='service_list'),
|
||||||
path("deploy/", views.DeployServices.as_view(), name='deploy_services'),
|
path("configuration/", views.ConfigurationForm.as_view(), name='configuration_form'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -25,11 +25,11 @@ class ServiceList(TemplateView):
|
||||||
template_name = 'service_list.html'
|
template_name = 'service_list.html'
|
||||||
|
|
||||||
|
|
||||||
class DeployServices(LoginRequiredMixin, UpdateView):
|
class ConfigurationForm(LoginRequiredMixin, UpdateView):
|
||||||
template_name = 'deploy_services.html'
|
template_name = 'configuration_form.html'
|
||||||
model = Configuration
|
model = Configuration
|
||||||
form_class = forms.Deployment
|
form_class = forms.Deployment
|
||||||
success_url = reverse_lazy('deploy_services')
|
success_url = reverse_lazy('configuration_form')
|
||||||
|
|
||||||
def get_object(self, queryset=None):
|
def get_object(self, queryset=None):
|
||||||
obj, created = Configuration.objects.get_or_create(
|
obj, created = Configuration.objects.get_or_create(
|
||||||
|
|
Loading…
Add table
Reference in a new issue