Add index, allowed hosts

This commit is contained in:
Nico Schottelius 2022-01-30 14:47:01 +01:00
parent ba9bf94d8e
commit a8001e36b0
4 changed files with 18 additions and 3 deletions

View file

@ -0,0 +1,12 @@
<h1>Welcome to uncloud</h1>
<h2>What is uncloud?</h2>
At ungleich we have developed uncloud as an order system that allows
you to manage all your resources.
<h2>What can I do with uncloud?</h2>
<ul>
<li>You can<a href="{% url 'products' %}">order products</a></li>
</ul>

View file

@ -85,6 +85,8 @@ class ProductSelectView(CreateView):
model = ProductOrder model = ProductOrder
fields = ['product' ] fields = ['product' ]
class IndexView(TemplateView):
template_name = "app/index.html"
class Yearly(TemplateView): class Yearly(TemplateView):
template_name = "app/config_product.html" template_name = "app/config_product.html"

View file

@ -26,7 +26,7 @@ SECRET_KEY = os.environ['SECRET_KEY'] if 'SECRET_KEY' in os.environ else 'a bad
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
ALLOWED_HOSTS = [] ALLOWED_HOSTS = ['*']
# Application definition # Application definition

View file

@ -23,7 +23,8 @@ urlpatterns = [
path('order/<slug:product>/', appviews.ProductOrderView.as_view(), name='product-order'), path('order/<slug:product>/', appviews.ProductOrderView.as_view(), name='product-order'),
path('order/recurring/<slug:product>/<slug:timeframe>/', appviews.ProductOrderView.as_view(), name='product-order-tf'), path('order/recurring/<slug:product>/<slug:timeframe>/', appviews.ProductOrderView.as_view(), name='product-order-tf'),
path('order/onetime/<slug:product>/', appviews.ProductOneTimeOrderView.as_view(), name='product-order-onetime'), path('order/onetime/<slug:product>/', appviews.ProductOneTimeOrderView.as_view(), name='product-order-onetime'),
path('product/', appviews.ProductListView.as_view()), path('product/', appviews.ProductListView.as_view(), name='products'),
path('product/<slug:slug>/', appviews.ProductDetailView.as_view(), name='product-detail') path('product/<slug:slug>/', appviews.ProductDetailView.as_view(), name='product-detail'),
path('', appviews.IndexView.as_view(), name='index'),
] ]