def product(request): return create(request, ProductForm, reverse('product.read'), (('/', 'IRIS'), (reverse('packagedb'), 'Package Database'), (reverse('product.read'), 'Products'), (None, 'Create'), ))
def gittree(request): return create(request, GitTreeForm, reverse('gittree.read'), (('/', 'IRIS'), (reverse('packagedb'), 'Package Database'), (reverse('gittree.read'), 'Git trees'), (None, 'Create'), ))
def package(request): return create(request, PackageForm, reverse('package.read'), (('/', 'IRIS'), (reverse('packagedb'), 'Package Database'), (reverse('package.read'), 'Packages'), (None, 'Create'), ))
def domain(request): return create(request, DomainForm, reverse('domain.read'), (('/', 'IRIS'), (reverse('packagedb'), 'Package Database'), (reverse('domain.read'), 'Domains'), (None, 'Create'), ))
def license(request): return create(request, LicenseForm, reverse('license.read'), (('/', 'IRIS'), (reverse('packagedb'), 'Package Database'), (reverse('license.read'), 'Licenses'), (None, 'Create'), ))
def gittree(request): return create( request, GitTreeForm, reverse("gittree.read"), ( ("/", "IRIS"), (reverse("packagedb"), "Package Database"), (reverse("gittree.read"), "Git trees"), (None, "Create"), ), )
def license(request): return create( request, LicenseForm, reverse("license.read"), ( ("/", "IRIS"), (reverse("packagedb"), "Package Database"), (reverse("license.read"), "Licenses"), (None, "Create"), ), )
def domain(request): return create( request, DomainForm, reverse("domain.read"), ( ("/", "IRIS"), (reverse("packagedb"), "Package Database"), (reverse("domain.read"), "Domains"), (None, "Create"), ), )
def image(request): return create( request, ImageForm, reverse("image.read"), ( ("/", "IRIS"), (reverse("packagedb"), "Package Database"), (reverse("image.read"), "Images"), (None, "Create"), ), )
def product(request): return create( request, ProductForm, reverse("product.read"), ( ("/", "IRIS"), (reverse("packagedb"), "Package Database"), (reverse("product.read"), "Products"), (None, "Create"), ), )
def subdomain(request): domain = request.GET.get("domain") url = reverse("domain.read", args=(domain,)) breadcrumb = ( ("/", "IRIS"), (reverse("packagedb"), "Package Database"), (reverse("domain.read"), "Domains"), (url, request.GET.get("name")), (None, "Create"), ) if request.method == "POST": return create(request, SubDomainForm, url, breadcrumb) form = SubDomainForm(initial={"domain": domain}, cancel_url=url) return render(request, "core/create.html", {"form": form, "breadcrumb": breadcrumb})
def subdomain(request): domain = request.GET.get('domain') url = reverse('domain.read', args=(domain,)) breadcrumb = (('/', 'IRIS'), (reverse('packagedb'), 'Package Database'), (reverse('domain.read'), 'Domains'), (url, request.GET.get('name')), (None, 'Create'), ) if request.method == 'POST': return create(request, SubDomainForm, url, breadcrumb) form = SubDomainForm(initial={'domain': domain}, cancel_url=url) return render(request, 'core/create.html', { 'form': form, 'breadcrumb': breadcrumb, })