Esempio n. 1
0
def producer_details(pivot_uuid, producer_uuid):

    producer = MemberBusiness(g.user).get_producer(producer_uuid=producer_uuid)

    if producer.is_github():
        return render_template('web/producer_github_details.html',
                               producer=producer)

    return render_template('web/producer_details.html', producer=producer)
Esempio n. 2
0
def create_github_producer(pivot_uuid):
    form = NewGithubProducerForm()
    if form.validate_on_submit():
        producer = MemberBusiness(g.user).create_github_producer(
            pivot_uuid=pivot_uuid,
            name=form.name.data,
            description=form.description.data)

        return redirect(
            url_for('web.producer_details',
                    pivot_uuid=pivot_uuid,
                    producer_uuid=producer.uuid))

    return render_template('web/new_github_producer.html',
                           pivot=MemberBusiness(g.user).get_pivot(pivot_uuid),
                           form=form)
Esempio n. 3
0
def create_generic_consumer(pivot_uuid):
    form = NewGenericConsumerForm()
    if form.validate_on_submit():
        consumer = MemberBusiness(g.user).create_generic_consumer(
            pivot_uuid=pivot_uuid,
            name=form.name.data,
            description=form.description.data)

        return redirect(
            url_for('web.consumer_details',
                    pivot_uuid=pivot_uuid,
                    consumer_uuid=consumer.uuid))

    return render_template('web/new_generic_consumer.html',
                           pivot=MemberBusiness(g.user).get_pivot(pivot_uuid),
                           form=form)
Esempio n. 4
0
def create_pivot():
    form = NewPivotForm()
    if form.validate_on_submit():
        pivot = MemberBusiness(g.user).create_pivot(
            name=form.name.data, description=form.description.data)

        return redirect(url_for('web.pivot_details', pivot_uuid=pivot.uuid))

    return render_template('web/new_pivot.html', form=form)
Esempio n. 5
0
def create_producer(pivot_uuid):
    return render_template('web/new_producer.html',
                           pivot=MemberBusiness(g.user).get_pivot(pivot_uuid))
Esempio n. 6
0
def consumer_details(pivot_uuid, consumer_uuid):

    consumer = MemberBusiness(g.user).get_consumer(consumer_uuid=consumer_uuid)

    return render_template('web/consumer_details.html', consumer=consumer)
Esempio n. 7
0
def pivot_details(pivot_uuid):
    return render_template('web/pivot_details.html',
                           pivot=MemberBusiness(g.user).get_pivot(pivot_uuid))