Hi Niphlod,

I need to trouble you again for your guidance.

I've successfully copied the files. I've added a new application tz_test to
test the plugin.

This is my controller and there are some other scaffolding coded not
included.
========================================================
import pytz
from plugin_timezone import fast_tz_detector

def detect_timezone():
    tz = fast_tz_detector()
    return dict(tz=tz)

def test():
    detect_timezone()
    zone = session.plugin_timezone_tz
    form = SQLFORM.grid(db.sometable)
    return dict(form=form)

This is my model.
=============
db = DAL("sqlite://storage.sqlite")
import pytz
user_timezone = session.plugin_timezone_tz or 'UTC'
db.define_table('sometable',
  Field('appointment', 'datetime',
        requires=IS_DATETIME(timezone=pytz.timezone(user_timezone))
  )
)

I called the below page to create a new row in the table.
http://127.0.0.1:8000/tz_test/default/test/new/sometable?_signature=84a55b727259cb27cb2c2234966da9d9b0cd7dfd#

I was given a form to fill, and select a date. Then the form rejected me.
Do you have any suggestion on how i may resolve this?

Appreciate your help to provide some insights..

Thanks
Wayne





On Tue, Apr 16, 2013 at 12:09 AM, Niphlod <niph...@gmail.com> wrote:

> yep, github downloads a zip that holds a folder that holds the content
>
> - archive.zip
>       - w2p_timezone_plugin-master
>             - modules
>             - static
>
> What you need to do is copy the modules and static folders "on top" of
> your applications one..... e.g. if your app is at
> /path/to/web2py/application/yourappname/ you should copy modules and static
> under that folder (which has already a "static" and a "modules" folder).
>
> Don't worry, within each of them there is a folder plugin_timezone that
> "holds" the plugin content completely separate from your app, so no file
> overwrites will be done.
>
>>
>>>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/aV1nNiDIwiY/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to