Re: [pylons-discuss] need guidance for Pyramid, Jinja2, deform combination

2015-11-22 Thread Krishnakant Mane
Thanks Jeff,
Can you give me an example of how you do this?
Happy hacking.
Krishnakant.

On 21/11/2015, Jeff Dairiki  wrote:
> On Fri, Nov 13, 2015 at 4:40 AM, kk  wrote:
>
>> I guess I said all in my subject line.
>> I would love if I can have templates in jinja2 and use deform library
>> together with Pyramid.
>
>
> I do this. It "just works."  The stock templates which come with deform are
> Chameleon, not Jinja2, but it doesn't matter.  Deform, using its chameleon
> templates, produces HTML markup for the form.  This can be interpolated
> into a Jinja2 template without issue.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.


[pylons-discuss] Re: Is it necesary that all views should be in a single file

2015-11-11 Thread Krishnakant Mane


On Monday, November 9, 2015 at 11:24:19 PM UTC+5:30, Jonathan Vanasco wrote:
>
> You can have views in multiple files, and even different packages.  
>
> `views.py` is just a "scaffold" or reference implementation.
>
> IIRC, Pyramid will automatically scan either `views.py` or a  `views/` 
> package directory and subdirectories by default.  (ie, everything with an 
> `__init__.py`) 
>
> If you want to scan other packages/directories, you can even use dotted 
> notation to explicitly scan them as well:
>
> config.scan("myapp.views_a")
>
So should I do config.scann for the views package?
Or is it that Pyramid will automatically see my package name?
I am still confused how Pyramid will automatically know which files contain 
my view code? 

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.


[pylons-discuss] Is it necesary that all views should be in a single file

2015-11-09 Thread Krishnakant Mane
Hello,
Can have I have a set of modules in a package containing my view classes?
I had asked this same question before regarding normal views.
I don't feel that it is a good idea to have all views in a single views.py 
file.
Happy hacking.
Krishnakant. 

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.


[pylons-discuss] is there an off line pyramid installer?

2014-08-28 Thread Krishnakant Mane

Dear all,
I have already worked with Pylons before.
I wish to know if just in case we have an offline tarball of Pyramid 
available.
I would ideally like some thing like sudo python setup.py install do the 
job with all the default libraries which it any ways installs .
So if there is a single package like django offers, there will be less 
band width waisted when internet is scarce or slow.
So if I get a tarball which contains mako, webobb, beaker ... and all 
those default things, it becomes very ideal.  If additional things like 
sqlalchemy are to be installed, they can be downloaded in addition.

Happy hacking.
Krishnakant.

I go to teach Python in many schools in semi urben areas where this 
Scenario comes.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.


l10n confusion

2013-08-05 Thread Krishnakant Mane

Dear Pylons developers.
I have been using Pylons for last 3 years but just recently I had to 
fall into the work of localization.

So far it has been going good, but I have one problem.
I wonder how I could translate strings coming from database?
For example there is a list containing names of accounts in an 
accounting software.

So to fill up the list I have to do some thing like %for l in c.list
...
%endfor
And in that code I have to fill the items.
or may be I have to take the name of a certain thing which comes from 
database in english.
So if I have to set it using ${c.name} what do I do to get it marked for 
translation?

should the code be some thing like _{${c.varname}}
Kindly help me with this confusion.
happy hacking.
Krishnakant.


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




trying to find a missing link in my localization steps

2013-04-16 Thread Krishnakant Mane

Hello I am in the process of doing i18n and l10n for my web application.
I use mako template and all the words to be translated have been put 
into a ${_()} along with generation of pot file.

I also generated a po file for my language, Marathi.


Now, I know I have to add a dropdown list labled please choose a 
language  but I exactly wish to know how to program the interface or 
the application for setting the chosen language for the session?

For example I might select Marathi and click set.
Now from this point, my marathi interface should come.
I am not getting exactly what to configure and how to configure this.
Can some one guide in this regard.
Happy Hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: trying to find a missing link in my localization steps

2013-04-16 Thread Krishnakant Mane

I wish to have a slightly different approach.
I wish to have a dropdown where user can select a language and click 
procede.
The procede can call a controller action (I still use Pylons 1.) and 
that action can return the home page and all pages there after in the 
selected language.

Any idea how this can be done?
Happy hacking.
Krishnakant.
On 04/16/2013 03:56 PM, Kris Nackaerts wrote:

What I do, not sure if it's 100% correct but it works:

In my mako template: a 
href=${request.route_url('home')}?language=en${_(uenglish)}/a


In the view:
if 'language' in request.GET.keys():
request.response.set_cookie('_LOCALE_', 
request.GET['language'])

return request.response

So when the language is selected, the home screen is opened in the 
right language and from that point everything is in the right language.



On Tue, Apr 16, 2013 at 12:13 PM, Krishnakant Mane krm...@gmail.com 
mailto:krm...@gmail.com wrote:


Hello I am in the process of doing i18n and l10n for my web
application.
I use mako template and all the words to be translated have been
put into a ${_()} along with generation of pot file.
I also generated a po file for my language, Marathi.


Now, I know I have to add a dropdown list labled please choose a
language  but I exactly wish to know how to program the interface
or the application for setting the chosen language for the session?
For example I might select Marathi and click set.
Now from this point, my marathi interface should come.
I am not getting exactly what to configure and how to configure this.
Can some one guide in this regard.
Happy Hacking.
Krishnakant.

-- 
You received this message because you are subscribed to the Google

Groups pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it,
send an email to pylons-discuss+unsubscr...@googlegroups.com
mailto:pylons-discuss%2bunsubscr...@googlegroups.com.
To post to this group, send email to
pylons-discuss@googlegroups.com
mailto:pylons-discuss@googlegroups.com.
Visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google 
Groups pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to pylons-discuss+unsubscr...@googlegroups.com.

To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




basic confusion on first time localization

2013-04-04 Thread Krishnakant Mane

Hello all.
i am a Pylons 1.0 user for last 2 years.
I wish to clear some of my confusions regarding translation.
I am refering to the tutorial at 
docs.pylonsproject.org/projects/pylons-webframework/en/latest/i18n.html 
to learn the process.

My first question is which library should I actually use, bable or getext?
Secondly, if I am using mako template, is it going to be a problem if I 
switch to ginger.  For that matter I am thinking of switching to Pyramid 
in the near future, will that be a problem?
Further, I might use tw in my app in the near future for designing some 
forms.

Will I have to do some thing special for remaking the translation process.
Lastly, do I need the bable or what ever library installed at all places 
where my app is going to be used?
or is it that just the developer's machines need it for actually doing 
the translations?
I am asking this because I understand that finally we generate the mo 
files which are pre compiled machine objects?

Happy hacking.
Krishnakant.




--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What is and isn't Pyramid

2013-03-29 Thread Krishnakant Mane

Hello paul.

I think Piramid is a framework for complex web applications (easy ones 
are easily done using DJango ).
It can also be used to just develop a web front end for an already 
existing service based on xmlrpc or soap.
The stacked approach is what I personally feel makes it stand out from 
the rest, although I guess turbogears does the same.

Happy hacking.
Krishnakant.

On 03/29/2013 10:16 PM, Paul Everitt wrote:

The discussion about docs turned into a discussion about Pyramid and target 
markets. Which was perfect, as Blaise and I are in some chats about related 
topics.

Rather than hijack that thread, I thought I'd start a new one. What is Pyramid? And even 
more difficult, what isn't it? (I am a staunch believer in focus and having the courage 
and honesty to say that's not us, you're better served elsewhere.)

I'd like to listen to more ideas from insiders and casual developers about:

- Who Pyramid appeals to

- What differentiates it (in a no-bullshit, honest-to-goodness way)

- What is an unmet need in the Python web frameworks space that Pyramid does a 
good job of itch-scratching for

--Paul



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: is any one using tosca widgets or dynforms in real applications?

2013-02-25 Thread Krishnakant Mane

Hello, thanks for the help.
On 02/25/2013 01:27 AM, Mengu wrote:

hi krishnakant,

1) use tw2, not tw1.
That is understood, given that there are so many new things I see in the docs 
(I had tryed version 1 before ).
2) you can definitely customize the form css.

Well, this is exactly what I wish to do.
Basically I would be using tw with mako templates and hoping that it 
will be easy to integrate.

3) you can also customize the generated forms via custom templates.

This is some thing I did not understand.  Could you clearify?


Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




searching for documentation on ajax requests with dynforms

2013-02-25 Thread Krishnakant Mane

Hello.
I am a new member to this mailing list and a beginner with tw.
I have so far understood that I will need to use tw2 and for ajax 
tw2.dynforms.

Now after reading the documentation I realsie that I need to know more.
I am slowly getting to grips with the concept, but there are a few 
issues I would like clarification
1, is there a way I can make direct ajax calls and work with a returned 
JSON object?  For example I have a Pylons/ Piramid controller action 
that connects to a core service and gets the desired data.  Then this 
action returns back a JSON object.  Now what I would like to do is to 
have the form process it and put right data into the right widget.  Is 
this possible using dynforms?
2, While using the grid layout of dynforms, I need to have different 
types of widgets into the cells.  These widgets might also get data from 
an AJAX request and the return might be a json.  How can I handle this?
I will have more such queries and would be bothering the experienced 
people here.
The library itself looks so wonderful that I will be using it even 
though there is some learning curve involved.

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




is any one using tosca widgets or dynforms in real applications?

2013-02-23 Thread Krishnakant Mane

Hello all,
I think the subject says it all.
My questions is about tosca widgets.
Is it production quality, has some one used in real apps and how good is 
dynforms for ajax based requirements?
Also I wish to know if there is a way to change the css of forms 
generated by tosca?

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: is any one using tosca widgets or dynforms in real applications?

2013-02-23 Thread Krishnakant Mane

So  basically there are definite advantages of tw given it's power.
I tryed some other form libraries but hit the wall when it came to 
customizing the css.

happy hacking.
Krishnakant.
On 02/24/2013 02:00 AM, Thomas G. Willis wrote:
the folks on the toscawidgets mailing list would probably be better 
qualified to answer that kind of question.


I haven't used tw2 in a while but you should be able to override the 
templates of all the widgets for maximum flexibility, but you can also 
assign a series of css classes. So there's 2 options for you.


On Saturday, February 23, 2013 10:35:56 AM UTC-5, kk.gnu wrote:

Hello all,
I think the subject says it all.
My questions is about tosca widgets.
Is it production quality, has some one used in real apps and how
good is
dynforms for ajax based requirements?
Also I wish to know if there is a way to change the css of forms
generated by tosca?
Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google 
Groups pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to pylons-discuss+unsubscr...@googlegroups.com.

To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: can't find the exact header for sending ods file as a downloadable file

2012-12-23 Thread Krishnakant Mane

On 12/22/2012 02:10 AM, Jason wrote:
hi Jason,
Thanks for the idea.

Once you have the ods as a file object in your view-callable you can 
return it with something like:


filecontent = myfile.read()
headers = {
'Content-Type': 'application/ods',
'Content-Length': len(filecontent),
'Content-Disposition': 'attachment; filename=myfilename.ods' }
return Response(filecontent, headerlist=headers.items())





I tried this.

curdir = os.getcwd()
ledgerfile = open(curdir + /Ledger.ods,r)
ledgerdata = ledgerfile.read()
headers = 
{'Content-Type':'application/vnd.oasis.opendocument.spreadsheet' 
,'Content-disposition': 'attachment; filename=' + curdir  + 
'/Ledger.ods', 'Content-Length': len(ledgerdata)}


ledgerfile.close()

return Response(ledgerdata, headerlist= headers.items())

Note that this is the Response object resulting from
from pylons.controllers.util import abort, redirect, Response
So it is not the response (with a small r ) as in from pylons import 
request response, although this import is also there in my code.
Now what happens is that my browser (Firefox) displays the content of 
spreadsheet in a junk form instead of showing me the dialog box to 
download the file.

Can any one suggest what could be the problem?
Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



can't find the exact header for sending ods file as a downloadable file

2012-12-21 Thread Krishnakant Mane

Hello all.
I wish to send across an ods (spreadsheet) file from my pylons 
controller in such a way that the browser should ask the user to 
download the file (by presenting the usual download dialog of course ).

Can some one help here?
happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Fwd: [Gnukhata-devel] separation of js code from mako files

2012-10-26 Thread Krishnakant Mane

Dear Pylons/ piramid developers,
I am forwarding this email from mailing list for GNUKhata 
www.gnukhata.org, a free and open source accounting software which I am 
leading.

Basically we use Pylons version 1.0 for the front end.
We are now planning to use some ui refinement library like bootstrap in 
particular.
OUr developers have faced a problem integrating the tmpl_context (c) 
related data with javascript.

The details on the problem follow in the forwarded email.
Kindly help.
happy hacking.
Krishnakant.





 Original Message 
Subject:[Gnukhata-devel] separation of js code from mako files
Date:   Thu, 25 Oct 2012 20:00:34 +0530
From:   ujwala pawade pawadeso...@gmail.com
To: gnukhata dev gnukhata-de...@cis-india.org



Hello Developers,
All of you are aware that I and Mukesh have started working on Bootstrap 
which will give very nice refinements to GNUKhata front-end.
I have almost separated js code from mako files and problem here i m 
facing is about accessing python values from controllers i.e. 
tmpl_context as c
Since javascript code is been separated from mako files and for some 
files in the document.ready function this template context variable 
value has been used.
Now javascript file can't locate its value. So whatever value or message 
is attached in that tmpl_context is not getting accessed or displayed.

Currently i am finding a way to fix this problem.
If anyone have any idea, solution or suggestion for this , I welcome them.
Thank You :-)
--
Ujwala...
Freedom Matters, Not The Cost... :)




--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

___
Gnukhata-devel mailing list
gnukhata-de...@cis-india.org
http://lists.cis-india.org/mailman/listinfo/gnukhata-devel



Re: Is this correct?

2012-08-07 Thread Krishnakant Mane

I think Both pyramid and Pylons have their own advantage.
Python users would obviously use a framework in that language while php 
users will prefer some thing like Symfony.
Python seemingly is more powerful in terms of builtin functionality 
(batteries included as they say ), while php is tuned for working on the 
web and blends better with HTML.
That is not to say that templating In Python is any bad, mako is really 
great and I have been working with it for last 3 years.

It is just that Python is an allrounder and php is a web specialist.
I am very much used to Pylons and have an app front end developed in it 
for production use on a large scale.

I am addicted to Python and the said framework.
But after learning php, I see it is not bad at all.
May be I will develop another big application this time with Symfony and 
PHP.

Happy hacking.
Krishnakant
.
On 08/06/2012 06:50 PM, Malthe Borch wrote:

On 6 August 2012 15:03, Chris Rossi ch...@archimedeanco.com wrote:

On Sun, Aug 5, 2012 at 11:24 PM, Sayth Renshaw flebber.c...@gmail.com wrote:

Hi

I am new to web development and have been using asp and visual studio at
college. Wanting to swap over to an open source format.

Want to clarify a perception/s would an advantage of Pyramid over say
Symfony/Drupal is that I can utilize numpy  matplotlib directly iny data
driven web page.  Is that correct?


Yes.


What attracted me to Pyramid is that it seemed from my i initial reading
that it doesn't force decisions upon the user and leave database and
template packages etc up to the user.


Me too.  ;)


What would the disadvantage be of using Pyramid over a PHP framework ?


I don't know.  The only one I can think of is if you know PHP but not
Python, you have to learn the programming language.

Chris

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



how big can a mako template be for a response?

2012-06-01 Thread Krishnakant Mane

Hello all,
I have been using Pylons for more than a year now and I am really happy 
with it.

I have not shifted to pyramid  yet, so do tell me if that is necessary.
My application uses Pylons 1.0 as the tool framework for the front end.

The logic is in a backend server written in pure Python Twisted library.
So the app in Pylons just makes calls to the rpc functions through the 
controller and renders the mako templates.
I am facing a very strange issue, although it might not e as strange for 
the experienced users.

The application in question is an accounting software.
After doing about 250 transactions (which correspond to 500 records in 
the transaction table) the front end written in Pylons gets jammed while 
displaying all records.


Same is with the case of ledger.
For those who are not understanding what I am refering to, a ledger is a 
list of all transactions on an account including amount of each 
transaction (Either Debit or Credit).
When there are more than 50 rows in the ledger with 5 columns, Pylons 
fails to render the mako template.
Before you raise the doubt, let me assure   you all that the back end 
server is actually sending all the records in a ready to use grid format 
to the pylons controller.
The controller also receives the data, but when I attach the entire grid 
to tmpl_context (c) variable, the mako is not rendered.
Even in the first case of searching all vouchers for the entire 
financial year, the data from the core engine (back end ) is actually 
sent to the controller.  But when the grid gets attached to c variable, 
the template is not rendered.
I don't get any error, but the browser stands still waiting for the 
controller to render some thing.

Is there some size limit for a mako template?
One more strange thing, while I run the front end application with the 
core logic on local host, the ledger comes all right within a snap.
But when both things are hosted on a remote server, the ledger does not 
work.

I click view ledger and wait and wait and wait.

However the voucher.mako behavior is consistent both on the local 
machine and remote server, that is , the browser waits but no response.
I understand that attaching a grid of 250 rows to a c variable is quite 
heavy, but does that really matter?
Is there some limitation of mako for the amount of data that can be sent 
across?

Please help with this as I am really confused.

happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: The Pylons Project is looking for GSoC students and ideas!

2012-04-03 Thread Krishnakant Mane

Hi,
Has some one thought about an eclipse plugin for pylons?
Happy hacking.
Krishnakant

On 03/04/12 17:36, John Anderson wrote:

On Tue, Apr 3, 2012 at 12:14 AM, Joe Dallagojd.dall...@gmail.com  wrote:


Just to clarify, I would also be more than willing to do any of the
ones mentioned the wiki.  I would be interested in hearing which
projects the community feels are the most necessary.



The wiki is a starting point, feel free to add your ideas to it!



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: Pyramid in Production

2012-03-08 Thread Krishnakant Mane

I would absolutely recommend nginx for production use.
It does the load balancing pritty well and I had myself asked for advice 
on the approach and reverse proxy with paist has given me the best 
performance.

Happy hacking.
Krishnakant.

On 09/03/12 00:27, Jonathan Vanasco wrote:

Not talking about Pyramid / WSGI layer itself...

Assuming that these are just skinning a platform for customers, I
would keep away from running each application on a separate IP and try
to handle them via virtualhosts.  The rationale for this is:
1. It's easier to step  repeat for new clients
2. If you hit bottlenecks, you can scale out all of one component at
the same time
3. In terms of server maintenance, you'll have different types of
exact setups for machines.

You probably are planning for this already, but i'll mention anyways
-- you'll also want to have Varnish and/or Nginx running in front of
your setup.  That'll take care of issues from slow-connections and
offload any static serving from whatever WSGI server you choose.



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



any advantages of using fast cgi over reverce proxy with nginx?

2012-01-30 Thread Krishnakant Mane

hello all,
I am developing a pylons app related to finance.
I have decided to go with nginx as my http server.
What option will be better, fast cgi or reverce proxy?
my pylons app runs on port 8080 and the server hosting the app does not 
have apachi or any other web server for that matter.

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



any one with experience using formbuild?

2011-11-13 Thread Krishnakant Mane

hello all,
I was wondering if any one could share any experience of using formbuild 
for some production web site/ application?
my main concern is how I can apply css to the fields generated using 
formbuild and can i use javascript events on the fields?


Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



any plugin for pylons or mako in eclipse?

2011-11-11 Thread Krishnakant Mane

Hello all,
I am trying to search if there is a plugin for pylons or specifically mako?
I can manage code completion in pylons controllers naturally because 
python is supported in pydev.

But mako is a problem.
Any suggestion?
happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



tips on migrating existing pylons app from python 2.6 to 2.7

2011-10-04 Thread Krishnakant Mane

Hello all.
I wish to know what all needs to be done to shift my pylons 1 based web 
app to python 2.7?

When it was developed it was in python 2.6 and now I use python 2.7?
I have all the eggs which I collected from buildout and I am dead sure 
that I have the right eggs.
But I still have an impression that before just taking the webapp and 
untarring it, I must first consult this mailing list and know the 
pitfalls while doing so.
I am sure just taking the webapp tarball, uncompressing it and running 
paster serve development.ini will not help.
Note, I have a seperate version of python installed in /opt/devtools so 
I don't use a virtual environment.
my system runs python 2.6 while I have a seperate python2.7 inthe said 
folder.

Further more, /opt/devtools/bin is not in my classpath.

happy hacking.
Krishnakant.



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: can some one give me exact names of pylons dependencies for off line setup?

2011-10-02 Thread Krishnakant Mane

Thanks,
This seems to be promising idea.
Happy hacking.
Krishnakant.


On 02/10/11 02:23, Carsten Senger wrote:

Am Samstag, den 01.10.2011, 22:40 +0530 schrieb Krishnakant Mane:

Hello all,
I want to create a cd distribution for my pylons based app.
I will certainly come across situations where there is bad or even no
internet for easy_install to work online.
I would like a perfect list with proper url's to download all the
dependencies for Pylons version 1.0 with correct versions of all modules.
I will then download them and write a script with the -i parameter to
get the eggs or tarballs from local directory.
So can some one help me on this?
I request this because not all latest packages might be on pypi and some
are on their own independent url.

When you use zc.buildout [1] you can zip up the buildout directory that
contains the downloaded eggs and run it anywhere again with `buildout -N
-o` (N = non-newest mode, o = offline).
The dumppickedversions extension[2] prints out the picked versions which
you can then insert in the buildout configuration to pin the packages to
that version.
You can combine buildout with virtualenv with --no-site-packages to
isolate the installation from the systems python.

Buildout is heavier than pip and has it's own downsides, especially the
verbose output and sometimes cryptic error messages, but it's darn easy
to repeat even complicated deployment even without a network connection.

You might look at the buildout of the karl project or from this project
[3] to see a buildout configuration of a pyramid project.

..Carsten

[1] http://www.buildout.org/
[2] http://pypi.python.org/pypi/buildout.dumppickedversions
[3] https://bitbucket.org/csenger/designhub/src



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



can some one give me exact names of pylons dependencies for off line setup?

2011-10-01 Thread Krishnakant Mane

Hello all,
I want to create a cd distribution for my pylons based app.
I will certainly come across situations where there is bad or even no 
internet for easy_install to work online.
I would like a perfect list with proper url's to download all the 
dependencies for Pylons version 1.0 with correct versions of all modules.
I will then download them and write a script with the -i parameter to 
get the eggs or tarballs from local directory.

So can some one help me on this?
I request this because not all latest packages might be on pypi and some 
are on their own independent url.

Please help.
Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: can some one give me exact names of pylons dependencies for off line setup?

2011-10-01 Thread Krishnakant Mane


Hello again.
As suggested, I tryed with pip freeze but may be I am doing some thing 
seriously wrong, I can't figure out which packages are ment for pylons 
and which are not.
There is a lot of stuff that pip is showing and i can easily make out 
that not all packages are needed for Pylons 1.0.
I will be very very happy if some one can releave me of the frustration 
to know all the eggs and tar files needed for a complete pylons 1.0 
setup with python 2.7.2

Happy hacking.
Krishnakant.
On 01/10/11 22:40, Krishnakant Mane wrote:

Hello all,
I want to create a cd distribution for my pylons based app.
I will certainly come across situations where there is bad or even no 
internet for easy_install to work online.
I would like a perfect list with proper url's to download all the 
dependencies for Pylons version 1.0 with correct versions of all modules.
I will then download them and write a script with the -i parameter to 
get the eggs or tarballs from local directory.

So can some one help me on this?
I request this because not all latest packages might be on pypi and 
some are on their own independent url.

Please help.
Happy hacking.
Krishnakant.



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: is it possible to use virtual environment with pylons without activation?

2011-08-14 Thread Krishnakant Mane


On 15/08/11 00:39, cd34 wrote:

you can do:

#!/path/to/virtualenv/bin/python

in your startup script which will cause the script to load from that
environment. Cron jobs are often run this way.

At that point, you might also choose to update your environment:

import os, sys, site
sys.path.append('/path/to/pyramid/project')
site.addsitedir('/path/to/pyramid/lib/python2.6/site-packages')


Thanks a lot for this pointer.
However there is a small problem in this case.
before I initiate the serving of my pylons app from the vertual 
environment, I have to start another service, this one being a twisted 
server for xmlrpc.

The core logic has been written long before and its stable.
'So we did not choose to remove it, instead our pylons controllers talk 
as an agent to the APIs in this xmlrpc service.
So the bottom line is that the rpc engine has to be run using system 
level python (I have the sudo permissions for this ).
Now given this fact, how can I have a single python script first run the 
code to start the rpc server and then divert the path to another python 
instance inside the venv and server the web app?

Happy hacking.
Krishnakant.



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



can I have more than one session keys?

2011-08-12 Thread Krishnakant Mane

hello all,
This might be a very sili question.
I have a situation where I have to store 2 items as session data.
Its a financial software and one variable is client_id.
It is the id which is sent to the core engine running as xmlrpc.
The other user specific global item is the organisation name which is 
supposed to be kept as a cookies  along with from date and to date.

So can I have beaker.session.key = more than once in the development ini?
Further more, how do i delete these session variables when the user logs 
out?

happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



wish to make session call a function when it gets closed

2011-08-07 Thread Krishnakant Mane

Hello all,
I have an interesting problem here.
my application is made of a core engine written in xmlrpc.
It is published as a web service listenning on a certain port.
On the same server runs my pylons app served behind nginx.
So the basic work of all the controllers is to make calls to the rpc 
engine and render templates or return json.
on the front end I have a logout function which calls an action to 
remove one instance of an sqlalchemy engine from the core server.

Now the problem is not when some one clicks logout.
I want that the same controller action gets called when some one closes 
the browser window directly using alt + f4 or clicks close on the browser.
I know that session closes once the user closes the  browser, but in my 
case the session also has to send a message to another service to close 
some thing on that end.
So can some one tell me where to write the call to the core engin's 
closeConnection().

What actually happens when a user closes the browser?
Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



inconsistent return behaviour from jsonified action for ajax submit

2011-07-29 Thread Krishnakant Mane

Hello all.
I have recently observed that when an action returns json instead of a 
mako template,  the behaviour is highly inconsistent.

The problem is like this.
One of my mako template sends an ajax submit request (using jquery) to 
an action controller.


Users of jquery will know that we use some kind of an after submit event 
to process the returned json object.

in my case it is called success function.
Now what is happening is the following.
I often get a save dialog when the success function fires after submit.
I know its a json object that my action controller returns.

As a part of investigation,  I did download that text file.
I found that the text file exactly  contains the key: value pare that 
should have been otherwise processed safely as json.
Meaning the problem seems to be between  the  communication from action 
to the mako template.

Is there any known inconsistency with ajax submit?
or am I missing a trick?
I am paisting the code snippit of the controller action and that part of 
the mako template which is concerned with processing of the returned jason.

Note that in my action, I don't have an @jsonify at the top.
This is compensated by the dumps function used in the controller.
The decision to do so is because once I had removed @jsonify and it 
started to work.

But again this problem and I don't  know why.
Actually we are approaching a deadline and this error has again come up 
unexpectedly.

So we as a team are really desperately looking for some pointer.
Any help will be appreciated more than gold and silver.

following is the controller action.
This is an accounting  software  and the code I am paisting is the 
action that calls a rpc method from another server.

This action saves a transaction between  2 accounts.
It does so by sending the data to the rpc server.
Here goes the  code.


def setVoucher(self):
c.flag = n
# Add Contra Voucher.
if c.flag == n:

#self.vouchertype =request.params[voucherflag]
# get current date
#print request.params
self.date=str(strftime(%Y-%m-%d %H:%M:%S))
self.datepicker = request.params[dated] + - + 
request.params[datem] + - + request.params[datey]
date_of_transaction = 
datetime.datetime.strptime(str(self.datepicker),%d-%m-%Y).strftime(%Y-%m-%d 
%H:%M:%S)

self.queryParams_master=[str(request.params[reference_no]),self.date,date_of_transaction,request.params[narration]]

#print self.queryParams_master

self.queryParams_details = []
length = request.params[rowslength]


for i in range(1,int(length)):

if str(request.params[crdr+str(i)]) == 'Cr':
queryParams_details 
=[request.params[crdr+str(i)],request.params[acc+str(i)],request.params[cr+str(i)]]

if str(request.params[crdr+str(i)]) == 'Dr':
queryParams_details 
=[request.params[crdr+str(i)],request.params[acc+str(i)],request.params[dr+str(i)]]

self.queryParams_details.append(queryParams_details)

#print request.params[vouchertype_flag]
self.queryParams=[request.params[vouchertype_flag]]

trial = 
app_globals.server_proxy.cashbook.setCashBook(self.queryParams_master,self.queryParams_details,session[gnukhata])
res = 
app_globals.server_proxy.voucher.setVoucher(self.queryParams,session[gnukhata])


if res == True:
for r in self.queryParams_details:
if r[0] == 'Cr':

app_globals.server_proxy.account.updateAccountBalance([r[1],r[2],'craccount'],session[gnukhata])

else:

app_globals.server_proxy.account.updateAccountBalance([r[1],r[2],'draccount'],session[gnukhata]) 


#print self.queryParams
data = {message:Voucher has been 
saved,vouchertype_flag:self.queryParams}

response.headers[Content-Type] = text/json
return simplejson.dumps(data)

Look at the way headers are set and the call to the dumps.

Now the concerned mako code.


Look at the success function.
YOu can easily see whats going on there, and I guess it was pritty 
streight forward.

Yet this problem.


var options = {

beforeSubmit:  validateForm, // pre-submit callback
success: function(data){
//the below code just appends the value fromm the key message to the 
span called voucher_warning.

$(#voucher_warning).append(data[message]);
//alert(data[vouchertype_flag]);
document.getElementById(vouchertype_flag).value = 
data[vouchertype_flag];

acc=[];
total_credit = 0;
total_debit = 0;
var table = document.getElementById(dataTable);
var rowCount = parseInt(table.rows.length) - parseInt(2);
for(var i=1; irowCount; i++)
{

Re: inconsistent return behaviour from jsonified action for ajax submit

2011-07-29 Thread Krishnakant Mane

Hi cornelius,
Yes tried with return false in the click event .still the browser keeps 
giving same save as dialog box

happy hacking
krishnakant
On 29/07/11 15:40, Cornelius Kölbel wrote:

Hi Krishnakant,

I think this is not a plyons issue, but a javascript issue.

The javscript function that performs the ajax call and processes the
json response should end with a

return false;


 $('#submit').click(function(){
 $('#voucher').ajaxSubmit(options);//on submit button click event
 return false;
 });

Then your browser does not try to display/save the json resonse.

Moreover: If you are dealing with JSON, i recommend using firefox and
the jsonview plugin!

Kind regards
Cornelius

Am 29.07.2011 11:58, schrieb Krishnakant Mane:

Hello all.
I have recently observed that when an action returns json instead of a
mako template,  the behaviour is highly inconsistent.
The problem is like this.
One of my mako template sends an ajax submit request (using jquery) to
an action controller.

Users of jquery will know that we use some kind of an after submit
event to process the returned json object.
in my case it is called success function.
Now what is happening is the following.
I often get a save dialog when the success function fires after submit.
I know its a json object that my action controller returns.

As a part of investigation,  I did download that text file.
I found that the text file exactly  contains the key: value pare that
should have been otherwise processed safely as json.
Meaning the problem seems to be between  the  communication from
action to the mako template.
Is there any known inconsistency with ajax submit?
or am I missing a trick?
I am paisting the code snippit of the controller action and that part
of the mako template which is concerned with processing of the
returned jason.
Note that in my action, I don't have an @jsonify at the top.
This is compensated by the dumps function used in the controller.
The decision to do so is because once I had removed @jsonify and it
started to work.
But again this problem and I don't  know why.
Actually we are approaching a deadline and this error has again come
up unexpectedly.
So we as a team are really desperately looking for some pointer.
Any help will be appreciated more than gold and silver.

following is the controller action.
This is an accounting  software  and the code I am paisting is the
action that calls a rpc method from another server.
This action saves a transaction between  2 accounts.
It does so by sending the data to the rpc server.
Here goes the  code.


def setVoucher(self):
 c.flag = n
 # Add Contra Voucher.
 if c.flag == n:

 #self.vouchertype =request.params[voucherflag]
 # get current date
 #print request.params
 self.date=str(strftime(%Y-%m-%d %H:%M:%S))
 self.datepicker = request.params[dated] + - +
request.params[datem] + - + request.params[datey]
 date_of_transaction =
datetime.datetime.strptime(str(self.datepicker),%d-%m-%Y).strftime(%Y-%m-%d
%H:%M:%S)

self.queryParams_master=[str(request.params[reference_no]),self.date,date_of_transaction,request.params[narration]]
 #print self.queryParams_master

 self.queryParams_details = []
 length = request.params[rowslength]


 for i in range(1,int(length)):

 if str(request.params[crdr+str(i)]) == 'Cr':
 queryParams_details
=[request.params[crdr+str(i)],request.params[acc+str(i)],request.params[cr+str(i)]]
 if str(request.params[crdr+str(i)]) == 'Dr':
 queryParams_details
=[request.params[crdr+str(i)],request.params[acc+str(i)],request.params[dr+str(i)]]
 self.queryParams_details.append(queryParams_details)

 #print request.params[vouchertype_flag]
 self.queryParams=[request.params[vouchertype_flag]]

 trial =
app_globals.server_proxy.cashbook.setCashBook(self.queryParams_master,self.queryParams_details,session[gnukhata])
 res =
app_globals.server_proxy.voucher.setVoucher(self.queryParams,session[gnukhata])

 if res == True:
 for r in self.queryParams_details:
 if r[0] == 'Cr':

app_globals.server_proxy.account.updateAccountBalance([r[1],r[2],'craccount'],session[gnukhata])
 else:

app_globals.server_proxy.account.updateAccountBalance([r[1],r[2],'draccount'],session[gnukhata])

 #print self.queryParams
 data = {message:Voucher has been
saved,vouchertype_flag:self.queryParams}
 response.headers[Content-Type] = text/json
 return simplejson.dumps(data)

Look at the way headers are set and the call to the dumps.

Now the concerned mako code.


Look at the success function.
YOu can easily see whats going on there, and I guess it was pritty
streight forward.
Yet this problem

converting request values into cdata, is it a pylons issue?

2011-07-28 Thread Krishnakant Mane

Hello all.
I have a requirement where a pylons action controller gets data fromm 
request.params[companyname] and put it into an xml file at the server 
side.

it has many other fields but here I am just making things simple.
Now my problem is that when user enters special characters such as , 
for example mark  spencer  then the code fails.
Obviously I think somewhere we need to convert this into cdata. Is there 
some way in which  I instruct the request to send the values in cdata?

Happy  hacking.
Krishnakant.
ps:
I am sorry  if this is not really a pylons issue, if so please treat it 
as off topic.



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: converting request values into cdata, is it a pylons issue?

2011-07-28 Thread Krishnakant Mane

On 28/07/11 12:26, Mike Orr wrote:

On Wed, Jul 27, 2011 at 11:15 PM, Krishnakant Manekrm...@gmail.com  wrote:

Hello all.
I have a requirement where a pylons action controller gets data fromm
request.params[companyname] and put it into an xml file at the server
side.
it has many other fields but here I am just making things simple.
Now my problem is that when user enters special characters such as, for
example mark  spencer  then the code fails.
Obviously I think somewhere we need to convert this into cdata. Is there
some way in which  I instruct the request to send the values in cdata?

Where and how does it fail?

CDATA is not a way to protect against markup crashes. It's just a bulk
quoting mechanism to avoid having to quote individual  in a chunk
of text. But Pylons should automatically quote all the data values in
your outgoing template, so you don't need CDATA. Unless perhaps you're
trying to embed Javascript in an HTML file and the quoting rules are
getting too complex; but the answer there is to put the Javascript in
a separate file.

If you send a form to the user and they enter mark  spencer in a
text field, it should come back to you as a properly-formatted POST
document containing markamp; spencer. WebOb will automatically
decode that to umark  spencer for you. You put that in a template
variable (c.name  =   ${name}), and Pylons/Mako's default filter
should convert that to markamp; spencer in the output XML. If
that's not working, we need to know where exactly it's breaking down,
or what you're doing differently than this.





A very unlikely possibility is that the browser is returning
misformatted POST input, which is choking WebOb. But I have never seen
a browser do that.



Yes I have one thing different.
The return is in a json object.
I  have  @jsonify at the top of my action.
So the organisation name gets processed that way.
Problem also seems to be that when an ajax function is called to send 
the value back for processing, it must be doing some thing wrong.

Let me explain the exact situation.
In accounting, we have books maintained for every financial year.
So first I choose an organisation name fromm the dropdown and an ajax 
request is sent to retrive its financial year.

So when I try doing this, I see that the entire application crashes.
Secondly I also have a strong doubt that when organisation is deployed 
in the first place, the data might not be encoded properly so when we 
retrive back the data its not in proper format.
so when I create a new organisation with name as Mark  spencer, I 
wonder if its going in the right way inside request.params.

I printed it to the terminal and came right.
But now when I have it in the dropdown it means c.name worked right.
The  problem only happens when I send that back for processing (meaning 
getting  the financial year which was earlier saved for selected 
organisation).
Now the controller retrives the exact financial year for the requested 
organisation.
But the value of the requested organisation seems to get currupt 
somewhere and so the retrival mechanism fails.

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: converting request values into cdata is it pylons issue

2011-07-28 Thread Krishnakant Mane

Hi Mike.
Strange enough but i solved it due to one major hint you gave me 
knowingly or unknowingly.

I did convert my data to string.
It was unicode string i suppose.
And yes I had to use cdata also.
Now it works fine.
By the way you were right json does it pritty well it was not json's 
problem.

Thanks a lot.
Happy hacking.
Krishnakant.

On 28/07/11 23:30, Mike Orr wrote:

By the way, if you can't extract the data any other way, you can do two things:

- Create a temporary model with binary columns, which will fetch the
strings without modifying them.
- Decode the values in Python to unicode using latin1, or with one of
the 'errrors' arguments to the decode method.

Python's implementation of latin1 assigns unicode characters to all
256 byte values, even though 0x90-0x9f are undefined in latin1. They
show up as zero-space unprintable characters. That's the normal way in
Python to deal with strings in unknown character sets. It distorts
some of the characters, but that may be better than not seeing the
values at all.


'A\x80B'.decode('latin1')

u'A\x80B'

print 'A\x80B'.decode('latin1')

AB

s = 'A\x80B'.decode('latin1')
len(s)

3

list(s)

[u'A', u'\x80', u'B']



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



a challenge sending ods file to the browser throgh and an action

2011-07-08 Thread Krishnakant Mane

hello all,
I am using pylons 0.9.7 for developing my application.
It is an accounting software and I need to return back an ods file to be 
downloaded by the user.

But even after trying fileapp I can't get thihngs to work.
Can some one give me any idea as to what I must do?
All I need is to have the response set in such a way that the browser 
open the download dialog and let the user decide where to download/ open 
on the local machine.

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: a challenge sending ods file to the browser throgh and an action

2011-07-08 Thread Krishnakant Mane

On 08/07/11 20:26, Karol Tomala wrote:
You have to set MIME type on Response object according to the file 
type. Look at WebOb.Response documentation on how to set headers. 
Required headers (at least) are probably:

Content-Type: YOU_MIME_TYPE
Content-Transfer-Encoding: binary
Content-Description: File Transfer



Content-Disposition: attachment; filename=YOUR_FILE_NAME



Hi Karol.
So after setting this headers and other response attributes,what should 
be the end?

Should it be a json return?
Or  should I justt render the return or what is the last thing my 
controller action is supposed to do?

Happy  hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: a challenge sending ods file to the browser throgh and an action

2011-07-08 Thread Krishnakant Mane


On 08/07/11 20:24, Michael Merickel wrote:
For the browser to serve up a file for download you can set the 
Content-Disposition header on the response.


http://en.wikipedia.org/wiki/MIME#Content-Disposition


Thanks a lot.
This has worked withy pdf files but I use odfpy to generate ods files 
and that is not working.

May be one thing that Karol suggested about the file transfer was missing.

Happy hacking.
Krishnakant.



--

Michael
--
You received this message because you are subscribed to the Google 
Groups pylons-discuss group.

To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



confused on avoiding sql injections using ORM

2011-07-04 Thread Krishnakant Mane

Hello all.
I use Pylons 0.9.7 and sqlalchemy.
I use the Object Relational Mapper with declarative syntax in a few of 
my modules.
I was reading chapter 7 of the Pylons book and I understood that sql 
injections can be avoided using the expression api.

But can this be also done using ORM?
I tryed on my software and sql injections do work.
Is it possible to avoide it with ORM or will i have to totally avoide 
using an ORM layer of sqlalchemy and only use the expression api?

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: [sqlalchemy] Re: confused on avoiding sql injections using ORM

2011-07-04 Thread Krishnakant Mane


On 05/07/11 03:03, Malthe Borch wrote:

Think about it this way:

There's two kinds of strings when you're dealing with SQL: 1) SQL
language, 2) your data input. Don't ever include (2) in (1) –– let the
API do it.


How does one do this with the orm?
I am talking about things like session.add etc, obviously for inserts.

Say I create an instance of a mapped class and then attach some values 
to it.

And want to do session.add.
Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: sqlalchemy version in pylons 1.0

2011-06-17 Thread Krishnakant Mane



Hello,
I have used version 0.6.X with no problems.
so any later versions will not be problems I guess.
Happy hacking.
KKrishnakant.
On 17/06/11 03:00, Wyatt Baldwin wrote:

On Thursday, June 16, 2011 10:13:57 AM UTC-7, monax wrote:

Hello!

What problem can I have if I will use sqlalchemy version 0.7 with
pylons 1.0? Pylons 1.0 uses sqlalchemy version 0.5 by default.


Pylons doesn't depend on SQLAlchemy, so there shouldn't be any 
problems at all.


When you create a Pylons project using `paster create -t pylons`, you 
can choose to include some SQLAlchemy configuration, which I'm pretty 
sure is compatible with 0.7. If it's not, it's just a few lines of 
code to update.

--
You received this message because you are subscribed to the Google 
Groups pylons-discuss group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/3DTM1u0LQZgJ.

To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: help on daemonising my pylons app

2011-04-27 Thread Krishnakant Mane

On 27/04/11 06:33, Mike Orr wrote:

I run my apps under supervisor, which is a Python daemon manager.

On Tue, Apr 26, 2011 at 3:26 PM, Krishnakant Manekrm...@gmail.com  wrote:

Hello all.
I have a pylons application running in a virtual environment.
Can some one give me a hint as to how I could have the virtual environment
started and the paster serve production.ini be run as a daemon?

I looked on the internet and found one shell script.
I am paisting the content below but not sure if that shell script
initialises the venv.

#! /bin/sh

### BEGIN INIT INFO
# Provides:my_app  application instance
# Required-Start:$all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: starts instance ofmy_app  app
# Description:   starts instance ofmy app  app using start-stop-daemon
### END INIT INFO

### EDIT ME ##
# path to workingenv install if any
PYTHONPATH=path to pylons workingenv/lib/python2.4

# path to app
APP_PATH=path to my_app

# path to paster bin
DAEMON=path to pylons workingenv/bin/paster

# startup args
DAEMON_OPTS= serve --log-filemy logfile  --server-name=main
production.ini

# script name
NAME=my_rc_script.sh

# app name
DESC=my_app

# pylons user
RUN_AS=user to switch to after startup

PID_FILE=/var/run/paster.pid

### END EDIT ME ##

test -x $DAEMON || exit 0

set -e

case $1 in
  start)
echo -n Starting $DESC: 
start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background
--pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
echo $NAME.
;;
  stop)
echo -n Stopping $DESC: 
start-stop-daemon --stop --pidfile $PID_FILE
echo $NAME.
;;

  restart|force-reload)
echo -n Restarting $DESC: 
start-stop-daemon --stop --pidfile $PID_FILE
sleep 1
start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background
--pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
echo $NAME.
;;
  *)
N=/etc/init.d/$NAME
echo Usage: $N {start|stop|restart|force-reload}2
exit 1
;;
esac

exit 0

Can this be a more simpler thing than what I paisted?
I did not understand the opts that were passed to the daemon.
I can figure out production.ini but why the other one?

happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.






I would also like to use superwiser.
Can you give some hint?
By the way I think I must make a daemon any ways because I have to make 
an automated system where my application is started as a background 
process as soon as the machine starts.
So I don't expect the end user to do a paster serve --daemonise 
production.ini manuall.

Can this too be automated?
And yes there is also this step of starting the virtual environment 
which should also be automated.

I guess this certainly need some kind of a shell script?
Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: help on daemonising my pylons app

2011-04-27 Thread Krishnakant Mane

On 27/04/11 22:33, Mike Orr wrote:


In Ubuntu, install the 'supervisor package' and create an
/etc/supervisor/conf.d/ file for your application. Here's an example:

[program:inews]
command = /home/wwwadmin/venv/inews2.5/bin/paster serve
/home/wwwadmin/apps/inews/production.ini
process_name = inews
autostart = true
startsecs = 5
;exitcodes = 0,2
user = www-data
redirect_stderr = true
stdout_logfile = /home/wwwadmin/data/inews/error.log

Note that the 'paster' is in a virtualenv, so it'll run under the
virutalenv environment. Also note that you don't daemonize the program
yourself: Supervisor does that.

Supervisor has three main advantages over traditional init.d scripts:
- It runs the application in a child process so it doesn't need a PID
file, and it knows immediately if the application dies..
- You can start/stop/list jobs with the supervisorctl command (which
I symlink to supervisor).
- It's Python!

By end user do you mean yourself or another sysadmin? I don't
distribute daemon applications; I just run them myself. If you need to
distribute them so that an unknowledgeable sysadmin can install them,
it's more difficult. Every OS and Linux distro is different in its
daemon configuration. If your sysadmins are all running a DEB or
RPM-based system with a 'supervisor' and 'python-virtualenv' packages
available, you can make a DEB or RPM package for them containing the
application and Supervisor conf file and a postinstall script to
create a virtualenv. Otherwise I would just give them the application
tarball and a sample Supervisor conf file, with instructions on how to
build the virtualenv and configure Supervisor.



Thanks Mike.
Just one slightly off topic question but not a big one though.
If it is disturbing for the list then I would modestly request mike to 
reply off list.
Can I use this same superwise tool for running a python twisted program 
as well?


Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: help on daemonising my pylons app

2011-04-27 Thread Krishnakant Mane

On 27/04/11 22:33, Mike Orr wrote:

By end user do you mean yourself or another sysadmin? I don't
distribute daemon applications; I just run them myself. If you need to
distribute them so that an unknowledgeable sysadmin can install them,
Yes I intend exactly that.
it's more difficult. Every OS and Linux distro is different in its
daemon configuration. If your sysadmins are all running a DEB or
RPM-based system with a 'supervisor' and 'python-virtualenv' packages
available, you can make a DEB or RPM package for them containing the
application and Supervisor conf file and a postinstall script to
create a virtualenv. Otherwise I would just give them the application
tarball and a sample Supervisor conf file, with instructions on how to

Well I have rpm and deb users so that narrows the possibilities and the 
variations I will have to do.
I never made a post install script so don't have exact idea.
And I don't know if I can put the same functionality in the setup.py file so 
that the sample file you provided can be put to use with alterations?
may be get it coppyed to a location like /etc or so?
Happy hacking.
Krishnakant.
build the virtualenv and configure Supervisor.



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



help on daemonising my pylons app

2011-04-26 Thread Krishnakant Mane

Hello all.
I have a pylons application running in a virtual environment.
Can some one give me a hint as to how I could have the virtual 
environment started and the paster serve production.ini be run as a daemon?


I looked on the internet and found one shell script.
I am paisting the content below but not sure if that shell script 
initialises the venv.


#! /bin/sh

### BEGIN INIT INFO
# Provides: my_app application instance
# Required-Start:$all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: starts instance of my_app app
# Description:   starts instance of my app app using start-stop-daemon
### END INIT INFO

### EDIT ME ##
# path to workingenv install if any
PYTHONPATH=path to pylons workingenv/lib/python2.4

# path to app
APP_PATH=path to my_app

# path to paster bin
DAEMON=path to pylons workingenv/bin/paster

# startup args
DAEMON_OPTS= serve --log-file my logfile --server-name=main 
production.ini


# script name
NAME=my_rc_script.sh

# app name
DESC=my_app

# pylons user
RUN_AS=user to switch to after startup

PID_FILE=/var/run/paster.pid

### END EDIT ME ##

test -x $DAEMON || exit 0

set -e

case $1 in
  start)
echo -n Starting $DESC: 
start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background 
--pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS

echo $NAME.
;;
  stop)
echo -n Stopping $DESC: 
start-stop-daemon --stop --pidfile $PID_FILE
echo $NAME.
;;

  restart|force-reload)
echo -n Restarting $DESC: 
start-stop-daemon --stop --pidfile $PID_FILE
sleep 1
start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background 
--pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS

echo $NAME.
;;
  *)
N=/etc/init.d/$NAME
echo Usage: $N {start|stop|restart|force-reload} 2
exit 1
;;
esac

exit 0

Can this be a more simpler thing than what I paisted?
I did not understand the opts that were passed to the daemon.
I can figure out production.ini but why the other one?

happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



need help with enginx configuration with Pylons.

2011-04-24 Thread Krishnakant Mane

Hello all.
Can some one help me out with a small problem?
if any one has ever deployed an application in pylons 0.9.7 using nginx 
1.0 or lower, then please give me an example of nginx.conf file and any 
other files I need to change.
My application name is gnukhata and I will highly appreciate if some one 
could also share off list a production.ini file.
Right now I am trying to configure the file as given 
at,http://www.rightbrainnetworks.com/blog/deploying-a-pylons-app-to-production-step-by-step-part-1-of-2/


I did as exactly mentioned in this tutorial part one for nginx.conf.
I have the lines changed exactly as in the example there.
Can some one tell me if that's the correct way to do?
happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: need help with enginx configuration with Pylons.

2011-04-24 Thread Krishnakant Mane

Thanks Michael.
So will just reverce proxy help me utilise the performance bennifits 
that nginx offers?
Afterall this kind of setup will only help to proxy requests to python 
paist.  But is paist itself good enough to handle loads of requests?
I herd that fastcgi does some event based requesting and lends the work 
to some worker processes?

is that right or this will any ways happen with nginx using reverce proxy?

Happy hacking.
Krishnakant.

On 25/04/11 00:41, Michael Merickel wrote:
I'm not sure what the pros/cons of fastcgi are, but I use nginx in 
production as a reverse proxy on several projects. This cookbook is 
for pyramid, but the configuration is framework-agnostic:


http://docs.pylonsproject.org/projects/pyramid_cookbook/dev/deployment.html#nginx-paster-supervisord

Obviously your INI file will be slightly different for pylons, but the 
nginx configuration would remain the same.


Michael


On Sun, Apr 24, 2011 at 12:24 PM, Krishnakant Mane krm...@gmail.com 
mailto:krm...@gmail.com wrote:


Hello all.
Can some one help me out with a small problem?
if any one has ever deployed an application in pylons 0.9.7 using
nginx 1.0 or lower, then please give me an example of nginx.conf
file and any other files I need to change.
My application name is gnukhata and I will highly appreciate if
some one could also share off list a production.ini file.
Right now I am trying to configure the file as given

at,http://www.rightbrainnetworks.com/blog/deploying-a-pylons-app-to-production-step-by-step-part-1-of-2/

I did as exactly mentioned in this tutorial part one for nginx.conf.
I have the lines changed exactly as in the example there.
Can some one tell me if that's the correct way to do?
happy hacking.
Krishnakant.

-- 
You received this message because you are subscribed to the Google

Groups pylons-discuss group.
To post to this group, send email to
pylons-discuss@googlegroups.com
mailto:pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscr...@googlegroups.com
mailto:pylons-discuss%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.


--
You received this message because you are subscribed to the Google 
Groups pylons-discuss group.

To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: inconsistant request.param[]

2011-04-08 Thread Krishnakant Mane
Sorry for the repeat post, but here is the exact error message given by 
pylons prompt.


ajax submit Exception happened during processing of request from 
('127.0.0.1', 57000) python

On 07/04/11 23:46, Krishnakant Mane wrote:
and as any one using jquery might be aware the data is sent as a 
key=valuekey1=value1 etc.

Happy hacking.
Krishnakant.


.
I tryed to print the request.params and a few of those params are 
actually not getting printed.
I put alerts in my javascript code and the values are indeed coming 
from the proper widgits in the proper way.  I also know that the url 
is correctly pointing to the controller/action when the ajax submit 
happens.
I have an accountname which is an input text, groupname which is a 
value out of a select dropdown, basedon which is again a dropdown, 
description which is a textarea and openingbalance which is a numeric 
field.
I have directly taken the values of these widgets using jquery's val() 
function which works with all widgets in the dom.
So do I have to set some request headers or is this some parsing issue 
which I might be missing out?

Happy hacking.
Krishnakant.




--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



inconsistant request.param[]

2011-04-08 Thread Krishnakant Mane

.
I tryed to print the request.params and a few of those params are 
actually not getting printed.
I put alerts in my javascript code and the values are indeed coming from 
the proper widgits in the proper way.  I also know that the url is 
correctly pointing to the controller/action when the ajax submit happens.
I have an accountname which is an input text, groupname which is a value 
out of a select dropdown, basedon which is again a dropdown, description 
which is a textarea and openingbalance which is a numeric field.
I have directly taken the values of these widgets using jquery's val() 
function which works with all widgets in the dom.
So do I have to set some request headers or is this some parsing issue 
which I might be missing out?

Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: a very veard message pops up with pylons 1.0 with firefox

2010-08-25 Thread Krishnakant Mane

On Tuesday 24 August 2010 08:56 AM, cd34 wrote:

Can you run something like livehttpheaders to see what the url is
being generated?  Can you post the code from the form that is giving
you the error?  Are you using Toscawidgets?
   


I am actually using pure xhtml

The code follows.
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN 
http://www.w3.org/TR/html4/strict.dtd;

html
head
titlenew member/title
meta name=generator content=Bluefish 1.0.7
meta name=author content=krishna
meta name=date content=2010-08-20T15:29:28+0530
meta name=copyright content=
meta name=keywords content=
meta name=description content=
meta name=ROBOTS content=NOINDEX, NOFOLLOW
meta http-equiv=content-type content=text/html; charset=UTF-8
meta http-equiv=content-type content=application/xhtml+xml; 
charset=UTF-8

meta http-equiv=content-style-type content=text/css
meta http-equiv=expires content=0
meta http-equiv=refresh content=5; URL=http://;
script type=text/javascript src=/jquery/jquery.js /script


/head
body
form method=post, action=http://localhost:5000/member/setMember;

table
tr
td Id /td
td Name /td
td Address /td
/tr
tr
tdinput type=text name=memberid id=memberid /td
tdinput type=text name=membername id=membername /td
tdtextarea name=memberaddress id=memberaddress rows=2 
cols=24/textarea /td

/tr
tr
td input type=submit,value=submit /td
/tr
/table
/form
/body
/html

What could be wrong with this?

Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: a very veard message pops up with pylons 1.0 with firefox

2010-08-25 Thread Krishnakant Mane

On Wednesday 25 August 2010 11:22 PM, Graham Higgins wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 25 Aug 2010, at 18:23, Krishnakant Mane wrote:

form method=post, action=http://localhost:5000/member/setMember;



td input type=submit,value=submit /td



What could be wrong with this?




Spurious commas.


Removed it but the problem still persists.
it still gives the same error of url can't be loaded.

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: a very veard message pops up with pylons 1.0 with firefox

2010-08-25 Thread Krishnakant Mane

On Thursday 26 August 2010 12:32 AM, karikris...@gmail.com wrote:

Hi Krishnakant,

Did you try removing refresh header?
   


Which line exactly?

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: a very veard message pops up with pylons 1.0 with firefox

2010-08-25 Thread Krishnakant Mane


Sorry krish.
I did not see this mail first.
Ok I wil try.
can you exactly give the meta line as it should be?
I am still not clear.
Even better should I remove that meta line?
Happy hacking.
Krishnakant.
On Thursday 26 August 2010 12:15 AM, karikris...@gmail.com wrote:

Hi Krishnakant,

It happens because of refresh header in meta where the URL  is not
given for refresh. Refresh expects the fully qualified url.

meta http-equiv=refresh content=5; URL=http://;

This solves the issue.

As Graham mentioned, you should not use comma in between html
attributes.  I found in form and input type='submit' field.

Take a look at blueprint css sort of framework to work with tableless
HTML.

Thanks,

Krish
http://www.stacked.in





On Aug 25, 10:52 pm, Graham Higginsgjhigg...@gmail.com  wrote:
   

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 25 Aug 2010, at 18:23, Krishnakant Mane wrote:

 

form method=post, action=http://localhost:5000/member/setMember;
td  input type=submit,value=submit  /td
What could be wrong with this?
   

Spurious commas.

- --
Cheers,

Graham

http://www.linkedin.com/in/ghiggins

-BEGIN PGP SIGNATURE-

iEYEARECAAYFAkx1WFwACgkQOsmLt1NhivznPQCgvu+8ceE0gE7jAUW1RlaqxW4P
qi4An3o4oTnEIBJ1yECsKxG0ITYPHLiAiQCVAgUBTHVYXFnrWVZ7aXD1AQKl6wQA
i6XpLRhabIUWH7H4bNTpdE/3LiQqHtFoiEsUXMqoJFMXDwEzsRh///biArmswZSK
Z/37i4wBd9lIpEhLx7hpSO22DHi1IzWeyjW6AwuwV64F+4M0/mPIjy9d+CMALdSr
xa4dctURrNInhkxyxsbPQuiGTVtslNvrGd7lXM6AK/s=
=xfhJ
-END PGP SIGNATURE-
 
   


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



a very veard message pops up with pylons 1.0 with firefox

2010-08-23 Thread Krishnakant Mane

Hello.
This could be off topic and might apply to many things but I found this 
is consistantly happening with pylons so thought I would post here as 
well (apart from the mailing list for firefox ).
Well the problem is that when I run an application in pylons 1.0 and 
open up a form, I get an error message alert saying that the url is 
invalid and cannot be loaded.
It does not hert though because when form is actually submitted to the 
pylons action, all happens as expected.
But this error is irritating because the alert is thrown on my face as 
soon as the form is loaded.
and most importantly, such a thing does not happen with pylons 0.9 on 
any event.
Needless to say that I am using plain html and url_for() in 0.9 and just 
url() in 1.0 which is the only difference in the form.

Why could this be happening?

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



how to use tmpl_context inside a javascript function?

2010-08-19 Thread Krishnakant Mane

Hello,
Might be this is too easy and I am overlooking some simple solution.
But really, I am not finding a way to include a value from tmpl_context 
inside a javascript function.
what if I am creating a form that will have dynamically added rows and 
each row has a dropdown list containing some data.
If it was a static form I could just write input type = ... value = 
${c.names}
this also applies to text entries which might need to hold data received 
from the pylons controller action.
so if I were to create form fields inside a javascript function, i will 
need to some how access ${c.Whatever}  and get the pre-populated field 
generated.

Then I can use jquery to perhaps duplicate rows of such form fields.
Is there a way to accomplish this task?

Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: how to use tmpl_context inside a javascript function?

2010-08-19 Thread Krishnakant Mane

On Friday 20 August 2010 04:20 AM, Wyatt Baldwin wrote:

You can put Mako/JS templates in your templates directory and then
render them from your HTML template with something likescript src=$
{url('/templates/javascripts/whizbang.js')}/script.

   

NO, the problem at hand is not that complex and large.


Otherwise, if you're writing the JS inline in the HTML template (ew?),
then you should just be able to use `c` in the usual way:

script
   var get_pants = function () {
 var pants = '${c.pants}';
 return pants;
   }
   var make_stuff_from_list = function () {
 % for thing in c.list_of_things:
   new Thing('${thing.title}', ${thing.quantity});
 % endfor
   }
/script
   



Oh, does this work?
I remember last time I tryed to use ${h.url_for} inside a javascript and 
it did not work.

May be things have improved after that?
Any ways, I must also mention that when I had tryed to use the ${} 
syntax inside a javascript function, the script was inside a header 
section and not inside a body section.

could that be a problem?

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



can some one help me choose the right library for dynamic forms?

2010-08-18 Thread Krishnakant Mane

Hello all,
I have off late posted a few questions which are challenging for me to 
solve.

I have a need to create dynamic forms for my pylons application.
I had posted earlier on using tw.dynforms and asked for some guidance.
But now I know that I will be forced to change my templating engine to 
genshi and due to its performance issues I don't feel it is a good option.
I also looked at sprox but seems its prritty unclear about dynamic forms 
+ it needs sqlalchemy or some thing similar to work with.
My API calls and database objects are linked through an xmlrpc module 
and my pylons web app is going to sit on top of this xmlrpc layer.

SO I can't directly use SA or similar ORM in my pylons Model.
I am now trying to figure out if tw.jquery would work for me, But I 
can't figure out if there is a way to get tw.jquery work with pylons and 
if it does really help generating dynamic forms where rows of fields 
could be added or removed by the user at runtime.

Can some one guide me in the right direction?

Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



how would a request from a dynamically growing form look like?

2010-08-17 Thread Krishnakant Mane

Hello all,
I am having a case similar to the one mentioned in the tw.dynforms tutorial.

I have a inventory related module and the form might grow dynamically.
meaning there might be more than one item and more than one cost etc.
so request[item] wil not work because there might be more than one row 
thus more than one field for item.
even more, there will be some calculation involved on the front end side 
and the result is to be fetched using ajax.
but I don't know how the proper data can be sent and received using an 
ajax call before the request is submitted as an entire non-ajax http 
request?
because I have a dropdown list of all items and this list will be 
repeated for every additional row.
the moment an item is selected in a particular row, it has to show the 
available stock in hand and the cost in the adjacent fields.

How do I carry out this opperation?
meaning how does the form know which row is active?
because the ajax must update the field in that current row.

How does this work with pylons based views



Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



any one managed to setup tw.forms with pylons 1.0?

2010-08-17 Thread Krishnakant Mane

Hello all.
I am trying to setup pylons 1.0 along with toscawidgets.
I particularly want to install tw.forms and configure the same.
I even want to use tw.dynforms with pylons 1.0 so genshi is also setup.
I would like to request for a sample middleware.py with the proper imports.
I have followed instructions online but I get import errors.

I also need to know how I can get genshi and mako to work together with 
mako as the default engine.


So if I need to render a genshi based template what is the syntax to 
change the rendering engine from default mako to genshi.


Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: Pylons book update to 1.0?

2010-08-15 Thread Krishnakant Mane

On Sunday 15 August 2010 11:26 AM, Mike Orr wrote:

I think he was leaving it open for the community to update to 1.0 but
it hasn't happened. As far as I know there's no new edition of the
paper book planned. Obviously, it costs the publisher a lot to do an
update, so they can't do it for every version of every program.

   

I think 1.0 is a major release and there are quite a few important changes.
So although it is not a possible for publisher to bring out  paper 
editions for every version, it is a nice idea to bring out one for 
version 1.


Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: is toscawidgets linked with webhelpers?

2010-08-09 Thread Krishnakant Mane

HI,
If sprox has some thing like tw.dinforms then I will be happy to use it.
Happy hacking.
Krishnakant.

On Monday 09 August 2010 01:39 AM, b vivek wrote:


Hi guys ! For Forms cant Sprox be used .. I mean it does make work a 
lot fast in many cases...and you can set the ids you want. An example 
can be as under:-
for eg: you had your table(from which you are supposed to build your 
form) with a column like businesstitle and you wanted the id to be 
be saymytitle instead of businesstitle, you could just pass on a 
parameter like


__field_widget_args__={'businesstitle':{'id':'mytitle'}}

 and considering the fact that Sprox is built over toscawidgets, I 
think you just might be able to do something like this there too.



On Sun, Aug 8, 2010 at 4:59 PM, Krishnakant Mane krm...@gmail.com 
mailto:krm...@gmail.com wrote:


Hi Krish,
Actually even I had the same experience a while before but seems
tw.forms has improved.
I got your point and I too generally prefer the plain html way,
but at times tw.forms or formbuild comes handy.
What I particularly like is the dinforms library.
But still I don't know what are the ids of the widgets generated
using tosca.
Since we just provide the name of the widgit while initialisation,
I don't know what Ids are getting assigned to the widgets inside
the form.
So I can't use getElementById.

Happy hacking.
Krishnakant.


On Sunday 08 August 2010 03:49 PM, karikris...@gmail.com
mailto:karikris...@gmail.com wrote:

Hello Krishnakant,

Toscowidget instrument the form and generate the complete form
through
python code. webhelpers just emit html code and it cannot be
compared
to toscawidget approach. In toscawidget, form is an object and
form
elements are like members of object just like python object model.

Webhelpers doesn't do object orientation, rather provide
useful set of
APIs and utility class which are commonly used. I somehow
don't like
the customization of toscawidget, then I use the plain form and
webhelper approach to generate the form using mako template. I
have
explored toscawidget one and half years before now it could
have been
improved.

In my opinion, toscawidget should never part of webhelpers
library..

Regards,

Krish

On Aug 7, 10:01 pm, Krishnakant Manekrm...@gmail.com
mailto:krm...@gmail.com  wrote:

Hello all,
The question might sound beard, but I have a reason to ask it.

When we generate a form using webhelpers, its python code
which creates
the widgets, and I know the ids of every widget.
So if I do document.getElementById it works fine.
I see that tw.forms also generates widgets using python
code and while
reading the docs, I found that there is some thing in
common between the 2.
But one thing I did not understand is, when I create the
form using
tw.forms, how do I find an element using getElementById?
I don't see a place where I set an id for a widget in
tw.forms?
May be I am doing it the right way?
But just missing out some thing.
I want to use tw.forms along with webhelpers and want to
know if there
is a trick to find or guess the id of an widget generated
by tw.forms.

Happy hacking.
Krishnakant.



-- 
You received this message because you are subscribed to the Google

Groups pylons-discuss group.
To post to this group, send email to
pylons-discuss@googlegroups.com
mailto:pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscr...@googlegroups.com
mailto:pylons-discuss%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.


--
You received this message because you are subscribed to the Google 
Groups pylons-discuss group.

To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: is toscawidgets linked with webhelpers?

2010-08-08 Thread Krishnakant Mane

Hi Krish,
Actually even I had the same experience a while before but seems 
tw.forms has improved.
I got your point and I too generally prefer the plain html way, but at 
times tw.forms or formbuild comes handy.

What I particularly like is the dinforms library.
But still I don't know what are the ids of the widgets generated using 
tosca.
Since we just provide the name of the widgit while initialisation, I 
don't know what Ids are getting assigned to the widgets inside the form.

So I can't use getElementById.

Happy hacking.
Krishnakant.

On Sunday 08 August 2010 03:49 PM, karikris...@gmail.com wrote:

Hello Krishnakant,

Toscowidget instrument the form and generate the complete form through
python code. webhelpers just emit html code and it cannot be compared
to toscawidget approach. In toscawidget, form is an object and form
elements are like members of object just like python object model.

Webhelpers doesn't do object orientation, rather provide useful set of
APIs and utility class which are commonly used. I somehow don't like
the customization of toscawidget, then I use the plain form and
webhelper approach to generate the form using mako template. I have
explored toscawidget one and half years before now it could have been
improved.

In my opinion, toscawidget should never part of webhelpers library..

Regards,

Krish

On Aug 7, 10:01 pm, Krishnakant Manekrm...@gmail.com  wrote:
   

Hello all,
The question might sound beard, but I have a reason to ask it.

When we generate a form using webhelpers, its python code which creates
the widgets, and I know the ids of every widget.
So if I do document.getElementById it works fine.
I see that tw.forms also generates widgets using python code and while
reading the docs, I found that there is some thing in common between the 2.
But one thing I did not understand is, when I create the form using
tw.forms, how do I find an element using getElementById?
I don't see a place where I set an id for a widget in tw.forms?
May be I am doing it the right way?
But just missing out some thing.
I want to use tw.forms along with webhelpers and want to know if there
is a trick to find or guess the id of an widget generated by tw.forms.

Happy hacking.
Krishnakant.
 
   


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



is toscawidgets linked with webhelpers?

2010-08-07 Thread Krishnakant Mane

Hello all,
The question might sound beard, but I have a reason to ask it.

When we generate a form using webhelpers, its python code which creates 
the widgets, and I know the ids of every widget.

So if I do document.getElementById it works fine.
I see that tw.forms also generates widgets using python code and while 
reading the docs, I found that there is some thing in common between the 2.
But one thing I did not understand is, when I create the form using 
tw.forms, how do I find an element using getElementById?

I don't see a place where I set an id for a widget in tw.forms?
May be I am doing it the right way?
But just missing out some thing.
I want to use tw.forms along with webhelpers and want to know if there 
is a trick to find or guess the id of an widget generated by tw.forms.


Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: another setup issue, reportlab and pil can't be installed

2010-06-25 Thread Krishnakant Mane

Python dev libraries are indeed needed.
I fixt it by installing the libraries.
thanks every one.

Happy hacking.
Krishnakant.

On Friday 25 June 2010 03:14 AM, cd34 wrote:

If I recall, both of those require gcc to compile portions of the
package.  I believe the issue you are probably hitting is that the
python-dev libraries that match your version of python are not
installed.  The xcode libraries are not updated when the general
system is upgraded, so, you are probably running a different version
of python than the dev libraries.

http://developer.apple.com/technologies/xcode.html

You can become a developer at no cost, but, I believe xcode 3.2.3
contains the python dev that matches 10.6.4  I cannot find the release
notes for xcode 3.2.3, but, I believe that is the issue you're running
into.

   


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



another setup issue, reportlab and pil can't be installed

2010-06-24 Thread Krishnakant Mane

Hello,
This might be an issue related to the virtual environment I don't know.
In that case it is off topic.
But some how once I install Pylons inside a virtual environment, I can't 
install reportlab and pil using easy_install.
Actually I need these packages for generating reports for my web 
application in pdf.


Can any one guess what the problem could be?

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: another setup issue, reportlab and pil can't be installed

2010-06-24 Thread Krishnakant Mane

I get error gcc failed with exit status 1.
I can't figure out why would gcc have a problem when all the built tools 
are in place.

Happy hacking.
Krishnakant.

On Friday 25 June 2010 12:35 AM, Kevin J. Smith wrote:
I experienced an issue with installing PIL v.1.1.7 for py2.6 on mac 
osx 10.6.  The egg on pypi was mis-organized.  It installed fine but I 
would receive errors when I tried to import PIL.  It was easily 
rectified by adding a PIL directory below the installed egg 
directory.  Maybe you are experiencing the same problem?


Here is what PIL looked like straight from pypi:

Under the following directory was only one directory, EGG-INFO, and 
then all of the *.py files that make up the PIL library.


site-packages/PIL-1.1.7-py2.6-macosx-10.6-universal.egg/

But for the importer to properly recognize the package it should look 
like the following with all the *.py files in the PIL directory:


site-packages/PIL-1.1.7-py2.6-macosx-10.6-universal.egg/
/EGG-INFO
/PIL

Therefore, just create a PIL directory and move all the .py files there.

Cheers

On 24 June 2010 11:53, Krishnakant Mane krm...@gmail.com 
mailto:krm...@gmail.com wrote:


Hello,
This might be an issue related to the virtual environment I don't
know.
In that case it is off topic.
But some how once I install Pylons inside a virtual environment, I
can't install reportlab and pil using easy_install.
Actually I need these packages for generating reports for my web
application in pdf.

Can any one guess what the problem could be?

Happy hacking.
Krishnakant.

-- 
You received this message because you are subscribed to the Google

Groups pylons-discuss group.
To post to this group, send email to
pylons-discuss@googlegroups.com
mailto:pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscr...@googlegroups.com
mailto:pylons-discuss%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.




--
Never take life seriously. Nobody gets out alive anyway.
--
You received this message because you are subscribed to the Google 
Groups pylons-discuss group.

To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: can I use fileapp to render an ods file to the browser?

2010-06-14 Thread Krishnakant Mane

It is still unclear to me.
I just want to know if there are some content types associated with 
spreadsheets and particularly for ods?

Further should my action have a return render  or just return(file.ods)?
My understanding was that paste.fileapp() could do this just as it can 
for ods?


So my question is still the same?
An example would be highly appreciated on returning a response with an 
ods file.

Happy hacking.
Krishnakant.
On Monday 14 June 2010 09:33 AM, Mike Orr wrote:

On Sun, Jun 13, 2010 at 11:30 AM, Krishnakant Manekrm...@gmail.com  wrote:
   

hello all,
a few days back i had asked a doubt on this mailing list about rendering a
pdf file to the browser from a pylons control action.
The solution came in form of paste.fileapp() function which is to be
included before the return statement in a controler action.
I know it takes care of the return mime type etc.
While it was clear that pdf would work well, I am still unsure if it will do
the same for ODS files.
I don't want to render xls files because it is a proprietory format and can
be outdated any time.
So I wish to only make use of the odf format and will like to know How I can
return an ods spreadsheet using fileapp or any thing else.
I can make sure that my client has open office installed so that is no
problem.
the only issue is to render the file to the browser and set the correct
headers like content type.
 

If you pass a 'content_type' keyword arg to the constructor, it will
override the guessed type. Same for 'content_encoding'.  See
FileApp.__init__ .

   


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: trying to figure out the exact changes in the controlers and views for 1.0

2010-06-13 Thread Krishnakant Mane


On Wednesday 02 June 2010 04:04 AM, Shailesh Kochhar wrote:
I had to figure this out too and it keeps coming up as a question. The 
short answer is:


1. In controllers, add: from pylons import url and then use url(). 
You can add this to a central place and use it in all your controllers.

2. In templates, just use url(), it's available and works.


Hi Shailesh, are these the only 2 changes to majorly watch out?
Meaning, will these 2 changes ensure that my application will work 
properly with version 1.0?


Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



can I use fileapp to render an ods file to the browser?

2010-06-13 Thread Krishnakant Mane

hello all,
a few days back i had asked a doubt on this mailing list about rendering 
a pdf file to the browser from a pylons control action.
The solution came in form of paste.fileapp() function which is to be 
included before the return statement in a controler action.

I know it takes care of the return mime type etc.
While it was clear that pdf would work well, I am still unsure if it 
will do the same for ODS files.
I don't want to render xls files because it is a proprietory format and 
can be outdated any time.
So I wish to only make use of the odf format and will like to know How I 
can return an ods spreadsheet using fileapp or any thing else.
I can make sure that my client has open office installed so that is no 
problem.
the only issue is to render the file to the browser and set the correct 
headers like content type.

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: pylons 1.0 installation failes with easy_install

2010-05-30 Thread Krishnakant Mane

On Sunday 30 May 2010 11:21 AM, Mike Orr wrote:

All the files required by Pylons and a few extras are here:

http://pylonshq.com/download/1.0

So you can recursively download that page to make a local cache.

   


Thanks.
This works although I got a few warnings.
Thanks again all of you for the help.

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: what are the exact performance advantages of 1.0?

2010-05-30 Thread Krishnakant Mane

So has the getting started and related documentation ported to version 1.0?

Happy hacking.
Krishnakant.
On Sunday 30 May 2010 02:51 PM, Evgeny wrote:

As far as I read changelog, the point of 1.0 is not performance.
But rather cleaner architecture, decreased magic.

You can read changelogs here:
http://pylonshq.com/articles/archives/2010/5/pylons_10_released


On May 30, 10:41 am, Krishnakant Manekrm...@gmail.com  wrote:
   

Hello all.
I went through the news posting about the release of version 1.0 but did
not find any section describing the exact advantages of version 1 over
the previous versions.
I am particularly interested to know about the performance bennifits.
I understand that pylons uses many other components and thus performance
depends on those libraries/ packages.
but I am still missing the point about what has exactly improved in this
new version.
What reasons can be considered compeling for using pylons 1.0?

Besides, is the documentation upto date for version 1.0?
Happy hacking.
Krishnakant.
 
   


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



sqlalchemy 0.5.8 or 0.6.0?

2010-05-30 Thread Krishnakant Mane

Hello,
I am using pylons for my web application development.
Currently pylons is in version  1.0 and 0.9.7 is also going stable.
I want to know which is the correct version of sqlalchemy for both 
versions of Pylons.
I know it might not make that much of a difference but there are some 
changes in syntax, so I wonder if any of those changes affect the way 
sqlalchemy is used in Pylons.


Besides, I would like to know if the last release of version 0.6 
possesses any performance bennifits over 0.5.8 or is it just a release 
for cleanner syntax?


Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: trying to figure out the exact changes in the controlers and views for 1.0

2010-05-30 Thread Krishnakant Mane

On Sunday 30 May 2010 10:47 PM, Alexandre Conrad wrote:

Hello Krishnakant,

you will find answers to your questions by following the 1.0 upgrading
instructions:

http://pylonshq.com/docs/en/1.0/upgrading/
   


Thanks alexandre.
This really clears all things.  I just wanted to confirm one thin.
I understand that instead of h.url_for() I will need to use h.url().
Is that right?  I am confused because I did not see the reference to the 
webhelpers module aliased as h any where in the migration document.

so is the call h.url, or just url()?

Same confusion is regarding the redirect.
I see one line which refers to pylons.url.
So I wonder whether the webhelper aliased as h is used or not with 
reference to url()


Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: trying to figure out the exact changes in the controlers and views for 1.0

2010-05-30 Thread Krishnakant Mane

On Monday 31 May 2010 02:30 AM, Ben Bangert wrote:

On May 30, 2010, at 12:09 PM, Wyatt Baldwin wrote:

   

Pylons injects a few things into the template context for you along
with `h`, including (off the top of my head) `url`, `config`,
`request`, and `response`. You don't need to prefix any of those with
`h.`.
 


Thanks Ben.
I always used h. prefix so was confused if the same is needed in version 
1.0 like it was in 0.9.7


Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



pylons 1.0 installation failes with easy_install

2010-05-29 Thread Krishnakant Mane

hello all.
I am trying to install pylons 1.0 using easy_install in a vertual 
environment.

I get the error failed to download some packages
By the way can some one tell me where can I download all the 
dependencies for off-line installation.
I had success with pylons 0.9.7 where I used to do easy_install -i 
/home/user/Download/pylons_repo pylons.
I had all the dependencies including pylons itself downloaded in the 
said folder and every thing worked fine.
I would like this same to happen with version 1.0.  But since the direct 
installation itself is not working, I think there is or might be a 
mismatch with some packages and easy_install is not able to get the 
right one.


has any one faced this problem?

Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: Pylons 1.0 Released

2010-05-28 Thread Krishnakant Mane

This is a great news.
Congratulations to all the contributors, you all must be saluted for 
your tireless work and dedication for this amaisingly powerful and 
flexible web application framework.
I understand that many contributers are working full-time on another job 
and out of their precious spare time contribute to this framework.
Even then dedicated support is available, thanks to all who have given 
their best to pylons.
I would like to know if the pylons wiki and the pylons book is also 
going to be upgraded soon to version 1.0?
I was a newbie to web application development just 5 months ago.  Being 
a lead developer and principle investigator for a huge project for rural 
banking and micro finance, I had to take a decision to migrate our 
desktop based FOSS application to web based application.  Pylons is 
being used to develop the web app and it will become the part of the 
revolution which will happen after our software is released.  We are 
very very happy with Pylons and I look forward to develop more 
applications using Pylons.

Happy hacking.
Krishnakant.
On Friday 28 May 2010 09:53 PM, Ben Bangert wrote:

Pylons 1.0 has been released. Just 4 months after the first 1.0 beta was 
released we're pleased to have the final 1.0 out today. Pylons 0.10 has also 
been released to ease the transition for those migrating.

It's been quite a long road since Pylons was first released 5 years ago and 
there's been quite an evolution of paradigms used in Pylons since. The Pylons 
book came out last year and Pylons has seen increased use and a growing 
community.

Two of this year's PyCon talks highlighted how to scale Python web 
applications, both of them running Pylons. Millions of dollars in charter 
flights were processed through a high transaction value website running Pylons, 
tens of millions of website pages were served on Pylons driven websites, and 
TurboGears 2 was released (also built on Pylons!).

What's Changed?

Since Pylons itself is so small, most of the changes since the 0.9.7 release 
have come through in the way of the various packages Pylons requires. Beaker, 
Routes, SQLAlchemy, and WebHelpers have received a variety of updates. As a 
result, updates have been flowing out even though Pylons itself hasn't gotten 
many updates.

Pylons 1.0 finally drops all the legacy handlers from the 0.9 series, reducing 
the codebase from ~1300 lines of code, to 1080. Not many frameworks actually 
shed code between releases, and I'd like to be able to keep Pylons this small 
going forward as we've shrunk the code-base for almost every release of Pylons 
since the 0.8 series.

For those upgrading applications from 0.9.7, upgrade notes can be found here:
http://pylonshq.com/docs/en/1.0/upgrading/

The full changelog's from all the dependencies get a bit verbose, so some quick 
points:

* Pylon's Changelog http://bitbucket.org/bbangert/pylons/src/tip/CHANGELOG
* Beaker Changelog http://bitbucket.org/bbangert/beaker/src/tip/CHANGELOG
* Routes Changelog http://bitbucket.org/bbangert/routes/src/tip/CHANGELOG
* Webhelpers Changelog 
http://bitbucket.org/bbangert/webhelpers/src/tip/CHANGELOG

Thanks to all the contributors who have helped make this happen, and the Pylons 
community for helping to keep Pylons great!

   


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: application deployment question about nginx and pylons

2010-04-27 Thread Krishnakant Mane

Thanks, but what bennifit will we get by reverce proxy with nginx?
Isn't there a way like apache uses mod_python?
Happy hacking.
Krishnakant.

On Tuesday 27 April 2010 11:36 PM, Weixi Yen wrote:
I actually did a ton of research before creating my pylons app, and 
the answers I got were more or less to use nginx as a reverse proxy to 
paster server.


This is the setup I'm using currently for my main application.

You don't have to change anything in your production.ini file.  You 
just need to know the port you are serving to and modify the 
nginx.conf file to match your paster port.


I would google Nginx reverse proxy for tutorials.

Hope that helps!


On Tue, Apr 27, 2010 at 10:59 AM, Krishnakant Mane krm...@gmail.com 
mailto:krm...@gmail.com wrote:


Hello all,
I want to know if I really can go with nginx for deployment of a
web app which might be exposed to high trafic?
Can any one suggest me a suitable tutorial on this issue?
The pylons book chapter 21 has only example of apache based
deployment, but I was told by some experts working under me that
they have previously deployed some medium scale php based
applications on nginx.
Secondly, I would like to know if I have to really will need to
put some lines in the production.ini for nginx or is it standard
for all web servers?

And my final question is if proxying request from nginx to paste
is a good choice?
Should I use fast cgi? and what are the steps to get fastcgi
configured with nginx (if it is recommended)?

happy hacking.
Krishnakant.

-- 
You received this message because you are subscribed to the Google

Groups pylons-discuss group.
To post to this group, send email to
pylons-discuss@googlegroups.com
mailto:pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscr...@googlegroups.com
mailto:pylons-discuss%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.


--
You received this message because you are subscribed to the Google 
Groups pylons-discuss group.

To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



any good tutorial for formalchemy?

2010-04-23 Thread Krishnakant Mane

Hello all,
I have been lerking around reading the thread on django.forms to be 
incorporated for pylons.
I wanted to know out of curiosity, is formalchemy good enough for a 
typicle application where forms are closely related to the table objects?
Perhaps the application needs to link 2 tables (parent and child using 
keys ).
And the interface will have 2 tabs, one for adding data and another for 
view/ edit.

Will formalchemy suit such a need?
is there a good getting started with formalchemy tutorial anywhere?

Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: any good tutorial for formalchemy?

2010-04-23 Thread Krishnakant Mane
I got the docs from the formalchemy website, but there was no getting 
started.

I will look at the pylons example.
Happy hacking.
Krishnakant.

On Friday 23 April 2010 08:17 PM, Gael Pasgrimaud wrote:

On Fri, Apr 23, 2010 at 4:32 PM, Krishnakant Manekrm...@gmail.com  wrote:
   

Hello all,
I have been lerking around reading the thread on django.forms to be
incorporated for pylons.
I wanted to know out of curiosity, is formalchemy good enough for a typicle
application where forms are closely related to the table objects?
Perhaps the application needs to link 2 tables (parent and child using keys
).
And the interface will have 2 tabs, one for adding data and another for
view/ edit.
Will formalchemy suit such a need?
is there a good getting started with formalchemy tutorial anywhere?

 

Not really. You can have a look at the docs:
http://docs.formalchemy.org/pylons_sample.html

There is also some templates in shabti:
http://bitbucket.org/gjhiggins/shabti/ not really stable at the
moment.

And the code of the demo app: http://www.gawel.org/docs/fa.demo/file/tip

--
Gael

   

Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.


 
   


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: any good tutorial for formalchemy?

2010-04-23 Thread Krishnakant Mane

On Friday 23 April 2010 08:17 PM, Gael Pasgrimaud wrote:

On Fri, Apr 23, 2010 at 4:32 PM, Krishnakant Manekrm...@gmail.com  wrote:
   

is there a good getting started with formalchemy tutorial anywhere?

 

Not really. You can have a look at the docs:
http://docs.formalchemy.org/pylons_sample.html

   
Hey, I just now tryed to read through the code.  I can't really 
understand a few things.
All I could really make out is that the model.foo table object is being 
bound to a form and a label is set in the configuration for a particular 
field.
I could also make out that the form is being sent across through the 
tmpl_context object.
Other than that I did not understand the code really.  it was not 
commented at any place.
Can any one give me a gentel introduction on how formalchemy works and 
how do I bind forms to tables and render them?
I guess, it is all about making an instance of a form and bind it with a 
class in the modles.



There is also some templates in shabti:
http://bitbucket.org/gjhiggins/shabti/ not really stable at the
moment.

   

I see.  So should the template not be used for production?

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: any good tutorial for formalchemy?

2010-04-23 Thread Krishnakant Mane

Hi Graham,
I am actually still looking at a good tutorial which can exactly explain 
formalchemy.
Template is good enough to use, but only if I understand how the library 
actually works.


Happy hacking.
Krishnakant.

On Friday 23 April 2010 09:11 PM, Graham Higgins wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 23 Apr 2010, at 16:10, Krishnakant Mane wrote:


I see.  So should the template not be used for production?



It should be good enough for government work. The instability is 
largely due to an elevated number of commits as I go through the code 
cleaning up in preparation for a new release.


Watch this space.

- -- 
Cheers,


Graham

http://www.linkedin.com/in/ghiggins






-BEGIN PGP SIGNATURE-

iEYEARECAAYFAkvRv5MACgkQOsmLt1NhivzGPgCfQxOr187oB6NgDN/q2ObviErq
fXUAoOfYSng7dLPAnrRYFOdQeyoD5CrqiQCVAgUBS9G/k1nrWVZ7aXD1AQLJ4wP/
eRbSWQXSJwOMsB6B55JmEPr0sCjVsL5rbErcRwN6jM+W8XvDb+SjJAXzzcgxZj2f
CYg4C81EoKfNg10BhHM5tVjA8rHQ8KJUPvq+3Hb9EGYLijKkdroXMUYbHP+VT4HU
UZnpQOZ9yWGj5jC/TT9GcQ9NsqAz74GZl+I0mQ5PV4s=
=lSNd
-END PGP SIGNATURE-



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: can any one recommend a good library for generating printable reports for my pylons web app?

2010-04-15 Thread Krishnakant Mane

Good, so now I am left to just hack out the ods related problem.
It will be great if I can send the spreadsheet across to browser.  The 
browser may inturn open calc and display the spreadsheet.


Happy hacking.

Krishnakant.

On Thursday 15 April 2010 02:14 PM, Michael Brickenstein wrote:

We also use reportlab in RUM to generate pdf's
with landscape tables of data.
No complaints.
It is a general pdf framework, so not always supereasy (was a little
bit difficult to
find out, how to register a specific font for bold text), but it also
seems quite mature.
Cheers,
Michael

On 15 Apr., 02:20, Mike Orrsluggos...@gmail.com  wrote:
   

By the way, my client is using ReportLab to generate PDFs, the same as
the other developer was.

--
Mike Orrsluggos...@gmail.com
 
   


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: can any one recommend a good library for generating printable reports for my pylons web app?

2010-04-14 Thread Krishnakant Mane

On Wednesday 14 April 2010 12:20 AM, Mike Orr wrote:

It's not off topic. I have a client who renders PDF in Pylons, and I
may have to do it myself someday. I don't remember offhand if he's
using ReportLab or some other library, but I'll check tonight.

   

I am already using reportlab and it works absolutely fine for me.
Infact if any one else needs any help with that library, I can certainly 
do my modest part.  But the bottom line is that reportlab is perfect.

I really need to know how I can get pdf rendered to the browser
 

You have to set the content type as Deron said.

   
yes, this was one thing pritty obvious I guess, I was too stupid to 
ignore that.



 response.content_type = application/pdf

As for rendering it in the browser window (rather than launching a
viewer application), that's totally up to the browser and plugin. You
have no control over it.

   
No, I am ok with the browser passing on the responsibility to another 
app such as evince in GNU/Linux or acrobad reader for windows.



By the way, if the PDF is already in a file with a .pdf extension, you
can use paste.fileapp to send it, which saves some work.

   



Thanks a lot!  the files are indeed getting saved as .pdf so I guess the 
fileapp will directly send out the file to the browser.

So do I use the paist.fileapp instead of return?
and to use fileapp do I still need to set the response header (content 
type ) or will that function handle the work?


Happy hacking.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: can any one recommend a good library for generating printable reports for my pylons web app?

2010-04-14 Thread Krishnakant Mane

On Wednesday 14 April 2010 01:17 AM, Deron Meranda wrote:

On Tue, Apr 13, 2010 at 2:55 PM, Krishnakant Manekrm...@gmail.com  wrote:
   

No, the pdf files are going to be 1 page or in rare cases at the most 2
pages.
 

Definitely no need to mess with byte-ranges then.  That's really only
something to look at once you're getting into the100 page
documents.

   

Thanks, I guessed so.

   

And by any chance is some thing similar possible for open office
spreadsheets?
 

If you don't need much except rows and columns, your easiest
choice is to just serve up CSV files.  Python even has a csv
module ... http://docs.python.org/library/csv.html

   
Ah, well, the problem here is that csv will not give me all the features 
i need.  I have to merge cells, and also have different formatting.  
What I am going to output as a spreadsheet is actually an accounting ledger.
In any case I have a python library to generate open office 
spreadsheet.  for the information of all those who would like to know, 
it is called odfpy and you can install it using easy_install.
My questions is, once we have created the ods file with all the data 
properly formatted, how do we send the ods to the browser.  Browser may 
at its disposal open the calc application to display the spreadsheet 
from the odf file.  But I want to send that file across in the first place.



You may also want to send a content-disposition header,
something like
   Content-Disposition: attachment; filename=data.csv

   

So I guess I will need to do some thing similar for ods?

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



can any one recommend a good library for generating printable reports for my pylons web app?

2010-04-13 Thread Krishnakant Mane

hello.
I have a requirement where I need to generate spreadsheet type reports 
as well as integrating pdf reports into my web app.

I should be able to print them from my browser.
Some of them are generated dynamically so I will jsonify my pylons 
method to give out the data, but are there some libraries which can help 
me generate spreadsheet kind of interface in the front-end.
I know this is a bit off topic, but I thought this could be asked here 
since there are experienced web developers.


happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: can any one recommend a good library for generating printable reports for my pylons web app?

2010-04-13 Thread Krishnakant Mane

On Tuesday 13 April 2010 11:13 PM, Thomas G. Willis wrote:

For server side, there's report lab

http://pypi.python.org/pypi/reportlab
I have used report lab before to generate pdf but I did not quite understand 
how it will help at the server side with my pylons app?
   
Is there a way to render pdf directly to a web browser (provided of 
course that the browser has the plugin for viewing pdf).



for client side, google visualization might work for you.



   

Surely will try that out.


thanks
Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: can any one recommend a good library for generating printable reports for my pylons web app?

2010-04-13 Thread Krishnakant Mane

On Tuesday 13 April 2010 11:48 PM, Thomas G. Willis wrote:

I'd have to look at the docs to be sure, but getting the browser to
pick it up as a pdf and use the associated application should be a
matter of setting the headers correctly on the response.

Hey Thomas,
   

Can you plese mail me off list with that info?
I am requesting you to do so because I can already see it is getting way 
too off topic for pylons mailing list.

I really need to know how I can get pdf rendered to the browser
And the google's visualisation api is certainly not free software which 
I can just incorporate on my client.


Happy hacking.
Krishnakant.



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: can any one recommend a good library for generating printable reports for my pylons web app?

2010-04-13 Thread Krishnakant Mane

On Tuesday 13 April 2010 11:59 PM, Deron Meranda wrote:

You can send the PDF just as you would any other type of
*binary* file, such as an imagedo not attempt to process
it as text.  Use the content-type header of application/pdf.

   

Where do I set this header in context to a pylons controller action?
Should I do it in the respective method from where the pdf file is to be 
rendered?
Another question is that should I use return render(/report.mako) or is 
there some thing different I will have to do once I set the response 
header to application/pdf?



Note if you have large reports, you may want to see if you
can support the HTTP byte-ranges protocol.  This is because
PDF files are read starting at the end of the file, and then
in a random-access manner on a page-by-page basis.
So if you have a 500 page report, a person can immediately
read page 1, or page 250, without waiting for the entire
PDF file to download.   
   



No, the pdf files are going to be 1 page or in rare cases at the most 2 
pages.
And by any chance is some thing similar possible for open office 
spreadsheets?

Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: which is the best ORM recommended?

2010-03-15 Thread Krishnakant Mane

On Monday 15 March 2010 01:01 AM, Mike Orr wrote:

It's a tradeoff between portability and performance. I prefer
portability because I've had to change db backends more than once. But
if the application is extremely calculation-intensive, the speed of
db-specific stored procedures may be an advantage.

   
Thanks mike.  A little more research reveals that SQLAlchemy with its 
query builder might suit the requirement.  Basically I had to find a 
mid-way between db independence and performance.  Surely after your 
explaination and what I read elsewhere, ORM might not be the best 
solution, although where bulk querys are not involved, I might still go 
with ORM.
 But the SQLAlchemy's query builder is the solution I was looking for.  
I can write queries and (almost) need not worry about what RDBMS is 
being used.




Free in terms of freedom refers to the license. Postgres, MySQL, and
SQLite are all free in that sense. (And Firebird?)


Well I was doing a pun on that word.  I know the licenses like GPL.  
What I intended to say is nothing to do with the copyright, but the fact 
that if I am forcing my user to *only* use one specific db software, 
then I am taking away freedom in another sence. :)



What you're
talking about is interoperability.  An application tied to one
database is not as interoperable as one that can use any SQLAlchemy
database.  But an admissions system inherently requires a large and
use-intensive database and a dedicated server. Thinking back to my
35,000 student university, where everybody registered during the same
week, any efficiency would be important, even if it tied the app to a
particular database.  And if they've already agreed to buy a dedicated
server, then the choice of database engine would be minor.  (Provided
it's a reputable engine, and they can figure out how to back it up.)

   
Well, it is a kind of agreement we have got into which is going to work 
very well.  They are going to fund the development of this project 
because their univercity needs it.  But they too are interested to 
release the product as free software under GPL.
So although they might buy a dedicated server, others might not agree 
with the decision regarding the choice of a particular engine like MySQL 
or Postgresql.


   
 

You'll probably want to define both the tables and the ORM objects at
the beginning, even if you don't end up using all of them.  That way
they'll always be ready to use if you do find a reason to.  For
relations, there is some work at both the table level and the ORM
level. At the table level, you'll define your foreign keys. At the ORM
level, you;ll define which subtables should be attached to which
attributes. It will automatically determine the relationship using the
foreign keys, although in complex cases you may have to give it some
hints.

   
Well, actually I am asking all these questions because this is a 
paradime shift for me and my team.  We have pritty good expertese on sql.

But for interoperability reasons we are shifting to ORM.
May I inform you that we are using the declarative syntax of 
SQLAlchemy.  So with reference to the pylons application, my model 
folder will have the classes which declare and map the tables at the 
same time.
Does this have any advantage or disadvantage that directly might impact 
the performance?



Then you can use either the SQL builder or the ORM whenever you wish.
   

Ok, so it comes down to combining both approaches.


With SQLAlchemy= 0.5, you can also do custom queries using ORM
syntax but with SQL builder speed. This happens when you Query on
specific columns rather than just a single ORM object, and it returns
a low-level result object.  Example:

 # Example 1: Normal ORM query -- result is a list of ORM Person objects
 q = Session.query(Person).filter(Person.last_name == Smith)
 q = q.order_by(Person.last_name, Person.first_name)
 result = q.all()

 # Example 2: SQL query using ORM syntax -- result is low-level row objects
 q = Session.query(Person.id, Person.first_name, Person.last_name)
 q = q.filter(Person.last_name == Smith)
 q = q.order_by(Person.last_name, Person.first_name)
 result = q.all()

 # Example 3: SQL query using SQL builder syntax
 # Execute the query in the ORM session so that it's within the transaction
 # Assuming SQLAlchemy Declarative, so the person table is
``Person.__table__``
 import sqlalchemy as sa
 tc = Person.__table__.columns
 sql = sa.select([tc.id, tc.first_name, tc.last_name], tc.last_name
== Smith,
 order_by=[tc.last_name, tc.first_name])
 result = Session.execute(sql).fetchall()

   

Thanks, that's a very good explaination.

Example 1 instantiates a Person object for every record. This has more
overhead, but is more convenient to use. It's good if you want to
display all the record's details, or if you plan to modify many
fields. It's also good if you want to add/modify a record but don't
know whether it 

Re: which is the best ORM recommended?

2010-03-14 Thread Krishnakant Mane

On Sunday 14 March 2010 11:08 PM, Mike Orr wrote:

On Sun, Mar 14, 2010 at 12:17 AM, Krishnakant Manekrm...@gmail.com  wrote:
   

Now since database is going to be hit by so many queries, having an ORM
tested and tryed to that extent is very crutial.
 

SQLAlchemy can handle it because the person who wrote SQLAlchemy
builds those kind of applications for a living.  But an ORM may not be
the best approach.  The more an application is calculation-intensive
and dealing with complex queries, the more it makes sense to push the
entire queries into the database behind stored procedure, and
input/output only the minimum necessary data.  The database can do
calculations much faster than Python can, and there's overhead in
bringing values out of the database, and even more overhead to convert
them to ORM instances. All that overhead is lost if you just use the
values for further queries.

   
Agreed, but there is a chance that we might make this application RDBMS 
independent.  I would surely be releasing the web application as free 
software and making it depend on One database software is not really 
free in terms of freedom.
And as you know many people have there database choices and I don't want 
to make my software a reason for another flame war.


So I don't want to use stored procedures specific to any RDBMS.
But since sqlalchemy as I can see from some research is used on pritty 
heavy applications, they might be doing some thing similar like what you 
mentioned about the sql builder.



SQLAlchemy has a SQL builder level for composing queries directly, and
a low-impact result object that's less overhead than creating ORM
instances. This is the way to go for bulk processing lots of data;
e.g., to insert thousands of records at once, or to iterate through a
large result set. Most ORMs do not have this lower level, which is one
reason why SQLAlchemy is so popular.  The ORM level is really only
suited for dealing with a few records at a time.

   
IC, so to keep the software db neutral and still have good performance, 
using the sql builder will be the way to go.



The first is to try to do only a few queries per request. If you're
performing a dozen queries or more, try to combine them into fewer
queries because each query adds overhead. If you need a result from
several related tables and you've set up the relations in SQLAlchemy's
ORM, you can use SQLAlchemy's eager join option to get the whole
thing with one join query rather than issuing a separate query for
each subtable as it's needed.  (But if you *don't* need the data in
the subtables, leave eagerjoin off so that it only queries the main
table.)

   

I am confused on this.
So should I not have relations setup in the ORM or should I set up those 
relations in the ORM and then use the query builder?


And yes, I will have to compromise on stored procedures for making my 
application DB Neutral.

SO I think I must do a bit more reading on the SQLAlchemy docs.
correct me if I am wrong, but my conclusion right now is to use a 
combination of ORM based mapped classes and low level query builder in 
the right places.


happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



which is the best ORM recommended?

2010-03-13 Thread Krishnakant Mane

Hello all,
I know that people might say this is a stupid question given that pylons 
comes with settings for SQLAlchemy by default, although sqlalchemy is 
not installed.
but still, If I want to use pylons for a big web application on 
production, which is the right ORM that can be relied upon?
Currently I am Building a free web based accounting and inventory system 
which is already a heavy web application with lot of manipulations and 
calculations at the server side and also serving 100s of requests per 
second with dynamic data.
I had previously asked on this mailing list if pylons is the right 
choice for ERP type solutions.
Now the requirement is different.  It is an on-line admission system 
which is going to face heavy trafic and will almost always need to send 
complex queries to the database and then calculate results, crunch 
values and finally send the output.
Now since database is going to be hit by so many queries, having an ORM 
tested and tryed to that extent is very crutial.
So Is it better to stick with Pylons and alchemy combination, or will 
some other ORM perform better?
I am sure that there are some people on this list who have deployed 
pylons based applications which are heavy in terms of trafic and do lot 
of calculations and still perform good.

So I will like to go be the experiences.
Happy hacking.
Krishnakant.




--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: any thing new in the latest RC for pylons?

2010-03-13 Thread Krishnakant Mane

On Saturday 13 March 2010 02:12 AM, Mike Orr wrote:

I'm actually just about to write the upgrading doc and high-level list
of changes so I can make the final release. (Which means everything
that's not done yet will have to wait till after the release,
including fixing convert_misc_characters(), finishing Grid, and the
enhancements in the bugtracker.)

   

So are we expecting to have a final release of pylons 1.0 soon?
Is there a document listing of exact changes I need to do if at all I 
plan to upgrade my old application?


I am thinking of writing all my newer apps using 1.0 release.
In any case testing with the beta is not a bad idea.

happy hacking.
Krishnakant.



--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: any thing new in the latest RC for pylons?

2010-03-12 Thread Krishnakant Mane

On Friday 12 March 2010 12:32 AM, Mike Orr wrote:

If you're starting a new application, I would create it from the 1.0
beta. That way the changes are already made in the application
template, and you won't have to change them later. You'll also
remember to use 'url' instead of 'h.url_for', 'pylons.app_globals'
instead of 'pylons.g', 'pylons.tmpl_context' instead of 'pylons.c',
because the latter ones won't exist.

IC, but Beta?  can I develop an application using the beta version?  Is it 
stable enough?

Pylons 0.10 is mainly for existing applications.  It's like 1.0 but
doesn't still has the deprecated features, so 0.9.7 applications won't
require as many changes.


So will i have to change the parts of the code manually for using the 
latest features?

isn't RC more stable to be used rather than beta?
And can I use the easy_install command to install pylons 1 beta in a 
vertual environment?


Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: any thing new in the latest RC for pylons?

2010-03-12 Thread Krishnakant Mane

On Friday 12 March 2010 11:44 PM, Mike Orr wrote:

On Fri, Mar 12, 2010 at 9:28 AM, Krishnakant Manekrm...@gmail.com  wrote:
   

IC, but Beta?  can I develop an application using the beta version?  Is it
stable enough?
 

When I said beta I meant the latest prerelease version, which is RC1
   

Ic, this means even pylons 1.0 is RC just like 0.10.


now. It normally takes a month or two to write an application and get
it ready for production. By that time, 1.0 final will almost certainly
be released, and it will be almost identical to RC1.

   

That's true, but my question was probably unclear.
I did not ask about the stability with respect to deployment.  My 
question was regarding consistency during development.
I wan't like to have some unpredictible problems during development, 
just to know that its a bug to be resolved in the final release or even 
worst, I might discover a so far unknown problem and it might stop the 
development of that module or any further dependent modules which needed 
that broken feature.  If the Pylons development team does not fear any 
such major show-stopper with the RC, I think I don't mind.  As you 
rightly said, an application won't go live on production server till it 
is completely tested in terms of its functinality.  So if pylons version 
1 is not recommended for production now, I am ok with it.




Pylons 0.10 is mainly for existing applications.  It's like 1.0 but
doesn't still has the deprecated features, so 0.9.7 applications won't
require as many changes.


So will i have to change the parts of the code manually for using the latest
features?
 

If you create an 0.9.7 application, you will have to modify it for
1.0. If you run it under 0.10, it should work but you'll get
deprecation warnings. You may also have to stick to an older version
of WebHelpers (0.6.4).

   
So, right now if I use 1.0 beta, does it come with the correct version 
of webhelpers?
And is there a one-stop list of what I should change in my controls or 
mako templates (which I any ways intend to use against any other 
templating module )?



If you create an 0.10 application, the structure should be the same as
a 1.0 application.  But 0.10 will allow you to use old features that
1.0 won't, so the burden will be on you to use only 1.0-compatible
features if you want to avoid having to make changes later.

The easiest way to upgrade an application is to run paster create -t
pylons AppName on top of the existing application. It will notice the
differences between your actual files and the application template,
and offer to make the changes automatically, write the changes to
backup files, or show you a diff.  In any case you'll have to review
the changes manually and make sure your customizations remain intact,
but it may save some typing and errors vs making all the changes
manually.

   

Ah, that's a very nice feature indeed.
So what I do is install Pylons 1.0 beta in a virtual environment and 
then drop the folder containing the older app in there.

Then run paster create -t pylons appname
is that correct?


And can I use the easy_install command to install pylons 1 beta in a vertual
environment?
 

RC1 is on PyPI as of this moment, so you should be able to easy_install it.

   


I did easy_install pylons and it took 0.10 RC.
What should I do for the beta for 1.0?



Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



any thing new in the latest RC for pylons?

2010-03-11 Thread Krishnakant Mane

Hello,
I just downloaded the latest rc for pylons (rc1 for 0.10).
are there new features which I should concentrate for developing a 
commertial web application?
are there some things which might make my previous projects incompatible 
with the current RC?
Are there any changes which will render some code written with 0.9.7 
unusable?


Happy hacking.
Krishnakant.


--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: Installing Pylons without an Internet connection

2010-02-07 Thread Krishnakant Mane

On Sunday 07 February 2010 04:07 AM, Matthew Burgess wrote:

Hi,

The Subject: may seem odd, given that Pylons is a Web Framework :-) 
However, what I'm trying to achieve is a 100% repeatable installation, 
which is oblivious to any updated packages on PyPi, etc.  I'm trying 
to ensure that if I run 'go-pylons.py' on a development machine, then 
repeat the same thing on a production machine, say 3 months later, the 
same package versions will be installed regardless of if any updates 
have been pushed to PyPi.



My simple method is to carry all the packages including pylons and all 
other dependencies into a men drive or cd rom and use the  easy_install 
-i path-to-the-repo which could be the path to cd rom or even your 
folder on a local hdd.


Happy hacking.
Krishnakant.

--
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.