I feel like a broken record but I have another bug.

With the newest versions of jythin, modjy, and django-jython from svn, I was able to get the system working by using Jason LeBrun's checklist. I still had to perform steps 6, 7, and 9 to deploy the system to my servlet and load the site.

Once I get the system up I can open most of my views that involve get, but once I have to use POST I have a problem. For instance, I can load one of my generic update views, but when I try to submit data, I get this error:

AttributeError at /companies/update/1/

'str' object has no attribute 'read'

Request Method:     POST
Request URL:     http://localhost:8080/companies/update/1/
Exception Type:     AttributeError
Exception Value:    

'str' object has no attribute 'read'

Exception Location:     /usr/local/tomcat/webapps/catwash/WEB-INF/lib-python/django/django/core/handlers/wsgi.py in safe_copyfileobj, line 69
Python Executable:     None



I don't know what this means, but it appears there are problems at the level of wsgi with how it deals with strings.

I'll try to debug it more myself later but I thought I'd put it out there in case someone has some insight into what's going on.

Jacob


On Fri, Jan 9, 2009 at 9:12 PM, Jacob Fenwick <jacob.fenwick@gmail.com> wrote:
I checked out the most recent version of jython and downloaded the newest modjy, and I tried to run the war tool from django-jython, and I got this error:

IOError: [Errno 2] No such file or directory: '/Users/jacob/djython/jython-d/dist/jython.jar'

Solution: The name for the jython jar file has changed to jython-dev.jar. This needs to be fixed in django-jython/doj/management/commands/war.py.


On Fri, Jan 9, 2009 at 7:12 PM, Jacob Fenwick <jacob.fenwick@gmail.com> wrote:
How silly of me, I forgot to include doj in my INSTALLED_APPS in my settings.py for this existing project.

But now I have a new problem, this time with authentication.

My project requires that users be authenticated. When I try to login to my project at http://localhost:8080/foo, I get redirected to the url http://localhost:8080/accounts/login/?next=/foo/ and I get this error:

HTTP Status 404 - /accounts/login/
type Status report
message /accounts/login/
description The requested resource (/accounts/login/) is not available.
Apache Tomcat/6.0.18

If I change my url to http://localhost:8080/foo/accounts/login/?next=/foo/  I get the right page, but this is clearly a bug that needs to be fixed with how jython deals with authorization.




On Fri, Jan 9, 2009 at 2:28 PM, Jacob Fenwick <jacob.fenwick@gmail.com> wrote:
Thanks Josh, that got my runserver working.

Now if only I could fix this problem where I can't build a war from an existing, non-jython based django project...


On Fri, Jan 9, 2009 at 7:27 AM, Josh Juneau <juneau001@gmail.com> wrote:
Jacob-

Glad to hear that it is going well for you.  I also received a similar
error to the one that you are writing about when I started out with
Oracle.  I was able to resolve the error by adding the Oracle jar file
to my CLASSPATH.  I am on OS X, so I'm not sure if this will make a
difference if you are using a different platform.

Thanks, and I hope this helps you out.
On Fri, Jan 9, 2009 at 2:18 AM, Jacob Fenwick <jacob.fenwick@gmail.com> wrote:
> It's great to see this kind of responsiveness to the community from the
> makers of these tools. So far I love the Python community!
>
> I think I almost have everything working, but I have one small problem.
>
> How can I compile a war for an existing django project? When I try to run
> jython25 manage.py war it says: Unknown command: 'war'
>
> Does this mean I have to build every project from scratch as a jython
> project? Or is there something special I can do to my old projects to make
> them able to compile into a war?
>
> I noticed I can at least run jython25 manage.py runserver, but when I load
> the site it says:
>
> Exception Type:      DatabaseError
> Exception Value:
>
> driver [org.mysql.Driver] not found
>
> Exception Location:
> /Users/jacob/djython/jython-d/dist/Lib/site-packages/doj/backends/zxjdbc/mysql/base.py
> in _cursor, line 167
>
> Thanks,
>
> Jacob
>
>
> On Thu, Jan 8, 2009 at 10:41 AM, Leo Soto M. <leo.soto@gmail.com> wrote:
>>
>> On Thu, Jan 8, 2009 at 12:12 PM, Alan Kennedy <jython-dev@xhaus.com>
>> wrote:
>> > [Leo]
>> >> I definitely have to integrate django-jython with the latest modjy
>> >> release. It's a long overdue issue, but I have been really sucked up
>> >> on many life issues which forced me to put this work aside for a
>> >> while. I'm almost back now, so expect an updated[*] release of
>> >> django-jython by the next weekend.
>> >>
>> >> [*] Actually, it will be the first release ever, but I think the point
>> >> is clear.
>> >
>> > Hi Leo,
>> >
>> > I've just checked out the latest django-jython, and come to the same
>> > conclusion.
>> >
>> > It would be *really* *nice* to get this resolved sooner rather than
>> > later; people are tripping over the problems; it looks messy.
>> >
>> > I could make the relevant changes to a django-jython SVN checkout, and
>> > either you or I could check them in?
>>
>> Sure, please give me your google code account name and I'll add you to
>> the project members.
>>
>> --
>> Leo Soto M.
>> http://blog.leosoto.com
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It is the best place to buy or sell services for
>> just about anything Open Source.
>> http://p.sf.net/sfu/Xq1LFB
>> _______________________________________________
>> Jython-users mailing list
>> Jython-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jython-users
>
>
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> Jython-users mailing list
> Jython-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jython-users
>
>