Example #1
0
def product(request):
    return create(request, ProductForm, reverse('product.read'),
                  (('/', 'IRIS'),
                   (reverse('packagedb'), 'Package Database'),
                   (reverse('product.read'), 'Products'),
                   (None, 'Create'),
                  ))
Example #2
0
def gittree(request):
    return create(request, GitTreeForm, reverse('gittree.read'),
                  (('/', 'IRIS'),
                   (reverse('packagedb'), 'Package Database'),
                   (reverse('gittree.read'), 'Git trees'),
                   (None, 'Create'),
                  ))
Example #3
0
def package(request):
    return create(request, PackageForm, reverse('package.read'),
                  (('/', 'IRIS'),
                   (reverse('packagedb'), 'Package Database'),
                   (reverse('package.read'), 'Packages'),
                   (None, 'Create'),
                  ))
Example #4
0
def domain(request):
    return create(request, DomainForm, reverse('domain.read'),
                  (('/', 'IRIS'),
                   (reverse('packagedb'), 'Package Database'),
                   (reverse('domain.read'), 'Domains'),
                   (None, 'Create'),
                   ))
Example #5
0
def license(request):
    return create(request, LicenseForm, reverse('license.read'),
                  (('/', 'IRIS'),
                   (reverse('packagedb'), 'Package Database'),
                   (reverse('license.read'), 'Licenses'),
                   (None, 'Create'),
                   ))
Example #6
0
def gittree(request):
    return create(
        request,
        GitTreeForm,
        reverse("gittree.read"),
        (
            ("/", "IRIS"),
            (reverse("packagedb"), "Package Database"),
            (reverse("gittree.read"), "Git trees"),
            (None, "Create"),
        ),
    )
Example #7
0
def license(request):
    return create(
        request,
        LicenseForm,
        reverse("license.read"),
        (
            ("/", "IRIS"),
            (reverse("packagedb"), "Package Database"),
            (reverse("license.read"), "Licenses"),
            (None, "Create"),
        ),
    )
Example #8
0
def domain(request):
    return create(
        request,
        DomainForm,
        reverse("domain.read"),
        (
            ("/", "IRIS"),
            (reverse("packagedb"), "Package Database"),
            (reverse("domain.read"), "Domains"),
            (None, "Create"),
        ),
    )
Example #9
0
def image(request):
    return create(
        request,
        ImageForm,
        reverse("image.read"),
        (
            ("/", "IRIS"),
            (reverse("packagedb"), "Package Database"),
            (reverse("image.read"), "Images"),
            (None, "Create"),
        ),
    )
Example #10
0
def product(request):
    return create(
        request,
        ProductForm,
        reverse("product.read"),
        (
            ("/", "IRIS"),
            (reverse("packagedb"), "Package Database"),
            (reverse("product.read"), "Products"),
            (None, "Create"),
        ),
    )
Example #11
0
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})
Example #12
0
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,
        })