Git Product home page Git Product logo

deform_retail_demo's People

Contributors

ericrasmussen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dslayerman

deform_retail_demo's Issues

Thanks

This is exactly what I was looking for. I'm developing a project using pyramid, deform, foundation and mako templates and was lost on how to integrate it all. I'm sure this will help immensely! Thanks.

Would you please add a i18n demo?

the translate filter for the form error messages looks like can't work.
I think it is because the request.localizer is not init.
so, if there is a demo for how to use i18n with deform and colander would be very nice.

login.mako: TypeError: 'Undefined' object is not callable

I've tried to integrate it with a project of mine and I'm encountering an issue here:

https://github.com/ericrasmussen/deform_retail_demo/blob/master/deformretail/templates/login.mako#L92

The runtime exception is:

File "/Users/Shared/webapp/deformport_env/deformport/deformport/templates/auth/login.mako", line 92, in render_render_error
${e|n,translate}
TypeError: 'Undefined' object is not callable

It's doing something with some class called TranslationString but the incoming "e" object is null/undefined

Looking at the calling code: https://github.com/ericrasmussen/deform_retail_demo/blob/master/deformretail/views.py#L138

if submitted:
    # try to validate the form and save the user/redirect on success
    try:
        appstruct = form.validate(controls)
        request.session.flash("You are now logged in! (not really)")
        location = request.route_url('login')
        return HTTPFound(location=location)
    # if the form failed, return it with errors and don't save changes
    except deform.ValidationFailure, e:
        return {'form': form}
return {'form': form}

I notice the exception is returning the same form object as if the submission was successful?

I'm not sure what's going on here. Any suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.