Hi Dexter. Here goes another example: http://hyperwidgets.svn.sourceforge.net/viewvc/hyperwidgets/trunk/hyperwidgets/trunk/ I liked this one a little more.
Hope it helps you :) -- Tomás Schertel ---------------------------------------------- Linux Registered User #304838 Arch Linux User http://www.archlinux.org/ ---------------------------------------------- On Sat, Oct 29, 2011 at 10:38, Dexter <sci.cr...@gmail.com> wrote: > MLSS does it for me ... > any senior member here ... can u plz have a look at the code here > https://github.com/alexksikes/MLSS/ and confirm if that is good > coding. > > Within my personal understanding I liked it ... Thanks again TOM > > Cheers > PK > > > > On Oct 29, 1:22 am, Tomás Acauan Schertel <tscher...@gmail.com> wrote: > > Hi Dex. > > > > I found it. > > Take a look athttps://github.com/alexksikes. There are a few app made > with > > webpy. I can name wikitrivia, MLSS and webpyapp. > > All of them use the kind of structure we are talking about. > > Hope you find this help full. > > > > -- > > Tomás Schertel > > ---------------------------------------------- > > Linux Registered User #304838 > > Arch Linux Userhttp://www.archlinux.org/ > > ---------------------------------------------- > > > > > > > > > > > > > > > > On Fri, Oct 28, 2011 at 11:52, Dexter <sci.cr...@gmail.com> wrote: > > > Thanks for the link Tom > > > I will let u kno if I get there first > > > > > Cheers > > > PK > > > > > On Oct 28, 5:30 pm, Tomás Acauan Schertel <tscher...@gmail.com> wrote: > > > > Hi Dex. > > > > > > I' m starting with subapps too. So I also have questions. > > > > I know we can work with mappings in a file as you said. > > > > But I can' t tell how to do it. > > > > I' ve found some projects using web.py and I' ve already saw this > kind of > > > > structure. > > > > I'll look for it and as soon I found it I' ll post it here. > > > > A good place to look for python code is nullege.com. I' ve found all > > > > examples there. > > > > > > -- > > > > Tomás Schertel > > > > ---------------------------------------------- > > > > Linux Registered User #304838 > > > > Arch Linux Userhttp://www.archlinux-br.org/ > > > > ---------------------------------------------- > > > > > > On Fri, Oct 28, 2011 at 05:11, Dexter <sci.cr...@gmail.com> wrote: > > > > > Yeah exactly ... that is the reason for question. > > > > > Wont it be a good idea to define the > > > > > urls,sessions and app in a separate file say config.py > > > > > and then add them to web.ctx.urls, web.ctx.session, web.ctx.app in > > > > > config.py > > > > > > > In the main code.py we import this config.py file so that the > config > > > > > code runs and in all other files use web.ctx.urls, web.ctx.sessions > > > > > and web.ctx.app > > > > > > > Cheers > > > > > PK > > > > > > > On Oct 28, 4:44 am, Tomás Acauan Schertel <tscher...@gmail.com> > wrote: > > > > > > As fas as I know, each file will act as an application. > > > > > > In cookbook' s example you can see that both files has a > > > web.application > > > > > > declared. > > > > > > > > -- > > > > > > Tomás Schertel > > > > > > ---------------------------------------------- > > > > > > Linux Registered User #304838 > > > > > > Arch Linux Userhttp://www.archlinux-br.org/ > > > > > > ---------------------------------------------- > > > > > > > > On Thu, Oct 27, 2011 at 19:42, Dexter <sci.cr...@gmail.com> > wrote: > > > > > > > Thanks for the replies guys ... few more doubts though ... > > > > > > > > > @Tomas > > > > > > > Do sub apps mean using more than one file and nothin more ... > > > > > > > I would like to clear that I have just one app ... I just want > to > > > > > > > separate the classes into different files and not define > different > > > > > > > app = web.application(urls, globals(),autoreload=False) > > > > > > > > > @Sergei > > > > > > > That means I wont have access to to the form data in render in > I > > > dont > > > > > > > define it like ? > > > > > > > render._keywords['globals']['render'] = render > > > > > > > > > Cheers > > > > > > > PK > > > > > > > > > On Oct 26, 11:10 pm, Tomás Acauan Schertel < > tscher...@gmail.com> > > > > > > > wrote: > > > > > > > > Dexter, > > > > > > > > > > Take a look here: > http://webpy.org/cookbook/sessions_with_subapp > > > > > > > > This page shows how you can work with session and sub > > > applications > > > > > (more > > > > > > > > than one file). > > > > > > > > > > -- > > > > > > > > Tomás Schertel > > > > > > > > ---------------------------------------------- > > > > > > > > Linux Registered User #304838 > > > > > > > > Arch Linux Userhttp://www.archlinux-br.org/ > > > > > > > > ---------------------------------------------- > > > > > > > > > > On Wed, Oct 26, 2011 at 10:30, Dexter <sci.cr...@gmail.com> > > > wrote: > > > > > > > > > Hi > > > > > > > > > > > I have started writing an application in web.py > > > > > > > > > The main code.py page consists of numerous classes now and > the > > > > > > > > > different classes have content like forms to be rendered > > > > > > > > > > > The page has become quite crowded. What is the best > practice to > > > > > > > > > organise webpy code. I thought that may putting the > different > > > > > classes > > > > > > > > > in different files is a good idea. However that causes the > > > > > DBSession > > > > > > > > > stores and the commonly used decorators to be inaccessible > to > > > the > > > > > > > > > classes. > > > > > > > > > > > I can define the > > > > > > > > > DBstore = web.session.DBStore(DB, 'sessions') > > > > > > > > > dbsession = web.session.Session(app, DBstore, > > > initializer={'count': > > > > > > > > > 0}) > > > > > > > > > > > in a separate file and import it both in code.py and the > other > > > > > > > > > classes.py > > > > > > > > > > > However I am not sure if then the same session remains > globally > > > > > used. > > > > > > > > > How can I make some objects globally the same > > > > > > > > > Should I use something like web.ctx > > > > > > > > > > > One more question > > > > > > > > > Can anyone explain what is the significance of > > > > > > > > > render._keywords['globals']['render'] = render > > > > > > > > > at > > > > > > > > >http://webpy.org/skeleton/0.3 > > > > > > > > > > > in view.py > > > > > > > > > > > -- > > > > > > > > > You received this message because you are subscribed to the > > > Google > > > > > > > Groups > > > > > > > > > "web.py" group. > > > > > > > > > To post to this group, send email to > webpy@googlegroups.com. > > > > > > > > > To unsubscribe from this group, send email to > > > > > > > > > webpy+unsubscr...@googlegroups.com. > > > > > > > > > For more options, visit this group at > > > > > > > > >http://groups.google.com/group/webpy?hl=en. > > > > > > > > > -- > > > > > > > You received this message because you are subscribed to the > Google > > > > > Groups > > > > > > > "web.py" group. > > > > > > > To post to this group, send email to webpy@googlegroups.com. > > > > > > > To unsubscribe from this group, send email to > > > > > > > webpy+unsubscr...@googlegroups.com. > > > > > > > For more options, visit this group at > > > > > > >http://groups.google.com/group/webpy?hl=en. > > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "web.py" group. > > > > > To post to this group, send email to webpy@googlegroups.com. > > > > > To unsubscribe from this group, send email to > > > > > webpy+unsubscr...@googlegroups.com. > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/webpy?hl=en. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "web.py" group. > > > To post to this group, send email to webpy@googlegroups.com. > > > To unsubscribe from this group, send email to > > > webpy+unsubscr...@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/webpy?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "web.py" group. > To post to this group, send email to webpy@googlegroups.com. > To unsubscribe from this group, send email to > webpy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/webpy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to webpy@googlegroups.com. To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.