Skip to main content

The project intend to or extendig the capabilities of flask in order to read and write data directely to tryton.

Project description

** FlaskTrytonWTF This project is intend to be used for extendig the capabilities of flask in order to read and write data directely to tryton

issiue/info: info@omniasolutions.eu

You can use this extention like a normal FlaskForm Just remember to add trytonObject and the field that you like to see in your input form we also inser the subbit button in and if its pressed we write date into tryton

from FlaskTrytonWTF import FTWTF
...
...
...
class MyTrytonForm(FTWTF.TFlaskForm):
    trytonObject = tryton.pool.get('my.tryton.object')
    tryton_fields = {'field_1': {},
                     'field_2': {},
                     'field_3': {}
                     }
    submitLable = "Submit"
@app.route('/input_form', methods=['GET', 'POST'])
@tryton.transaction()
def input_form():
    form = MyTrytonForm()
    if form.validate_on_submit():
        data_submitted = form.trytonSubmit() # DO NOT FORGET TO CALL THE TRYTON SUBMIT IN ORDER DO FLUSH THE DATA
                                             # ALSO THE DATA SUBMITTED IS RETURNED AS DICTIONAY OF VALUES 
                                             # SO YOU CAN USE IF !!
        return render_template('show_input_confirmation.html', title='Conferma', form=data_submitted)
    return render_template('nuovo_citadin.html', form=form)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for FlaskTrytonWTF, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size FlaskTrytonWTF-0.0.1.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View
Filename, size FlaskTrytonWTF-0.0.1-py3-none-any.whl (5.1 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page