On Thu, Sep 11, 2008 at 9:17 AM, AZMel <[EMAIL PROTECTED]> wrote:
>
>
>
> On Sep 11, 6:44 am, "Lukasz Szybalski" <[EMAIL PROTECTED]> wrote:
>> On Wed, Sep 10, 2008 at 6:45 PM, AZMel <[EMAIL PROTECTED]> wrote:
>>
>> > On Sep 10, 12:44 pm, AZMel <[EMAIL PROTECTED]> wrote:
>> >> On Sep 10, 12:21 pm, "Lukasz Szybalski" <[EMAIL PROTECTED]> wrote:
>>
>> >> > > Ok, we are almost there.
>>
>> >> > > I found a type in the myfirstapp.wsgi script provided in the wiki.
>>
>> >> > > #For root mounted app
>> >> > > #application = cherrypy._cpwsgi.wsgiAppi
>>
>> >> > fixed.
>>
>> >> > > should be
>>
>> >> > > #For root mounted app
>> >> > > #application = cherrypy._cpwsgi.wsgiApp
>>
>> >> > > Once I enabled that and disabled the lines as instructed my web site
>> >> > > came up and I was able to fully navigate it.
>>
>> >> > > However, when I try run my reports, which passes a pdf back to the
>> >> > > client, I get a 500 error. We have come full circle but now I am
>> >> > > running wsgi as was requested. And yes, there are no tracebacks in
>> >> > > the apache error.log
>>
>> >> > > Now maybe we can move on and fix the 500 error since wsgi is now
>> >> > > working.
>>
>> >> > In the instruction I had disabled the server.log. IF you did too then
>> >> > re enable it, and make sure it has a full path
>>
>> >> > args="('/usr/local/..morepath....server.log',)
>> >> > (restart apache)
>>
>> >> > and check if you get the error there.
>>
>> >> > If not then how are you generating the reports? Is that a tg app that
>> >> > sends it back or you are just passing a url to a file?
>>
>> >> > if not working still
>>
>> >> > stop apache and run
>>
>> >> > start-myapp prod.cfg
>> >> > and see if you get the error. Check the logs.
>>
>> >> > Lucas
>>
>> >> Nothing in the log except this:
>>
>> >> - mel "POST /myclient/reports/BidVSJobDetailReport HTTP/1.1" 500 791
>> >> "http://192.168.1.9/myclient/reports/BidVSJobDetailInfo" "Mozilla/5.0
>> >> (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/20080702 F
>> >> irefox/2.0.0.16"
>>
>> >> Otherwise it works fine if I use start-myapp prod.cfg
>>
>> >> This part of the code is creating a pdf report using reportlab and
>> >> using StringIO to buffer the report before sending it to the client
>> >> with an application/pdf header. I don't think its making it into the
>> >> actual code though because all the log.debug() logic is being
>> >> skipped. Going to try opening an empty template first then move on
>> >> from there. Let you know whats up when I know more.
>>
>> >> Mel
>>
>> > The only thing I can see with now is that in my templates are not
>> > processing javascript.
>>
>> > This is what I get when I look at the generated source:
>>
>> > <link media="screen" href="/tg_widgets/fancyflash/css/fancyflash.css"
>> > type="text/css" rel="stylesheet">
>> > <link media="all" href="/tg_widgets/turbogears.widgets/calendar/
>> > calendar-system.css" type="text/css" rel="stylesheet">
>> > <script src="/tg_widgets/jslibs/javascript/MochiKit.js" type="text/
>> > javascript"></script>
>> > <script src="/tg_widgets/jslibs/javascript/events.js" type="text/
>> > javascript"></script>
>> > <script src="/tg_widgets/fancyflash/javascript/fancyflash.js"
>> > type="text/javascript"></script>
>> > <script type="text/javascript">write_stylesheet();</script>
>> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar.js"
>> > type="text/javascript"></script>
>> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar-
>> > setup.js" type="text/javascript"></script>
>> > <script src="/tg_widgets/turbogears.widgets/calendar/lang/calendar-
>> > en.js" charset="utf-8" type="text/javascript"></script>
>> > <title>Bid vs Job Detail</title>
>> > <script src="/tg_js/MochiKit.js" type="text/javascript"></script>
>> > <script type="text/javascript">
>>
>> > This is in the error.log
>>
>> > [Wed Sep 10 16:37:09 2008] [error] [client 192.168.1.124] File does
>> > not exist: /var/www/tg_widgets, referer:http://192.168.1.
>> > 9/myclient/reports/BidVSJobDetailInfo
>>
>> > CSS and images are working fine:
>>
>> > - - "GET /myclient/static/css/style.css HTTP/1.1" 304 - "http://
>> > 192.168.1.9/myclient/" "Mozilla/5.0 (Windows; U; Windows NT
>> > 5.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16"
>> > - - "GET /myclient/static/images/WebBanner.png HTTP/1.1" 304 -
>> > "http://192.168.1.9/myclient/static/css/style.css"
>> > "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/
>> > 20080702 Firefox/2.0.0.16"
>>
>> > Is there a variable I need to set?
>>
>> Can you access you java script code? If not have you setup an alias?
>>
>> Lucas
>
> I can access my own JS code but not the ones for TG, nor the widgets.
>
> The only alias I have is
>
> Alias /static /usr/local/turbogears/myclient/myclient/static.
That is all you need.
what I ment is you go to http://localhost/myclient/.......somefile.js
can you access it through here. Read the source of html, find the
link to java source file and see if you can access it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---