Skip to content

getDatesHash change when restart the instance #8

@Emanuel80

Description

@Emanuel80

Dears,

I tested your very good product, but I found two issues.

The template : 'poodletable.pt' has the action default set to ''

and when a user save the selection, the system do nothing. I changed the action to call the "jq_submit_data" (tal:attributes="action string:${here/absolute_url}/jq_submit_data") and it save the selections. I also add a line at the end of the **call** of "jq_submit_data" to return self.request.response.redirect('voted') (but is not important)

The most strange issue is that when I saved the selection like as a user, the system saved my selection, but when i restart the instance (i'm working on a development machine) and I go on my selection I found it, but if I try to change it, the system forgot all selection and lose all data. By printing on the code some results I notice that the hash value change. I rewrite the code in a simple way

def getDatesHash(self):
     return ['%s%s'%(str(a['date']).replace('.',''),str(a['duration']).replace(':','').replace('-',''))
             for a in self.getDates()]

return [str(hash('%s%s' % (a['date'], a['duration'])))

for a in self.getDates()]

and now it work.

Probably I do something wrong at the beginning but I would like to share with you my issue and what I do to solved it on Plone 4.2.5. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions