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