Giter VIP home page Giter VIP logo

yafowil.widget.datetime's Introduction

Conestack

This package contains the constack organization docs and a setup for working on packages of this organization.

Install System dependencies (Debian/Ubuntu):

$ make dependencies

Install development environment:

$ make project-install

Build docs:

$ make docs

Run tests:

$ make test

Cleanup development environment:

$ make project-clean

Cleanup development environment including sources directory:

$ make project-full-clean

Happy hacking!

yafowil.widget.datetime's People

Contributors

agitator avatar attilaolah avatar gogobd avatar jensens avatar rnixx avatar thet avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

2silver

yafowil.widget.datetime's Issues

'str' object is not callable

setting up a formular with a datetime field like this

- birthday:
        factory: 'field:label:error:datetime'
        props:
            format: '%d.%m.%Y %H:%M'
            disabled: False
            required: False
            datepicker: True
            timepicker: False
            time: False
            locale: de
            required_message: i18n:birthday_required:No Birthday given

in a Plone v5.2.5 instance using py v3.7, I've got the following error

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 274, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 378, in __call__
  Module z3c.pt.pagetemplate, line 176, in render
  Module chameleon.zpt.template, line 302, in render
  Module chameleon.template, line 215, in render
  Module chameleon.utils, line 53, in raise_with_traceback
  Module chameleon.template, line 192, in render
  Module 590c2ca9616803ac9e372f07e5022468, line 341, in render
  Module 598d910b346c084de70a1626ba287f79, line 860, in render_master
  Module 598d910b346c084de70a1626ba287f79, line 1489, in render_content
  Module 590c2ca9616803ac9e372f07e5022468, line 326, in __fill_content_core
  Module 590c2ca9616803ac9e372f07e5022468, line 203, in render_content_core
  Module zope.tales.expressions, line 250, in __call__
  Module Products.PageTemplates.Expressions, line 225, in _eval
  Module Products.PageTemplates.Expressions, line 155, in render
  Module yafowil.plone.form, line 57, in render_form
  Module yafowil.controller, line 32, in __init__
TypeError: 'str' object is not callable

 - Expression: "view/render_form"
 - Filename:   ... .../browser/templates/testform.pt
 - Location:   (line 17: col 37)
 - Source:     ... :form replace="structure view/render_form" />
                                            ^^^^^^^^^^^^^^^^
 - Expression: "provider:plone.abovecontentbody"
 - Filename:   ... egg/Products/CMFPlone/browser/templates/main_template.pt
 - Location:   (line 94: col 70)
 - Source:     ... 
                                     ^
 - Expression: "context/main_template/macros/master"
 - Filename:   ... .../browser/templates/testform.pt
 - Location:   (line 6: col 23)
 - Source:     ... etal:use-macro="context/main_template/macros/master"
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7fa79675fa50>
               options: {}
               args: ()
               nothing: None
               modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x7fa79b627fd0>
               request: <WSGIRequest, URL=http://localhost:8080/Plone/@@test-form>
               view: <Products.Five.browser.metaconfigure.SimpleViewClass from /...forms/browser/templates/testform.pt object at 0x7fa791d2c410>
               context: <PloneSite at /Plone>
               views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7fa7964b8710>
               here: <PloneSite at /Plone>
               container: <PloneSite at /Plone>
               root: <Application at >
               traverse_subpath: []
               user: <PropertiedUser 'admin'>
               default: <DEFAULT>
               repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x7fa795464230>
               loop: {}
               target_language: None
               translate: <function BaseTemplate.render.<locals>.translate at 0x7fa790429ef0>
               macroname: 'master'
               attrs: {}

When I don't set the locale property or I only use default values and just activate the datepicker, the parsed date is not valid and raises a DateTimeConversionError

Any suggestions or fixes?

I'm using...

  • Plone v5.2.5 with Python v3.7
  • yafowil v3.0
  • yafowil.plone v3.0.รŸ
  • yafowil.widget.datetime v1.13
  • yafowil.yaml v1.3.1
  • bda.intellidatetime v1.3

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.