Re: Internal server error upgarding from 0.97 to 1.0

2008-09-09 Thread David Zhou

On Sep 9, 2008, at 11:39 AM, Haku wrote:

>
> Hello, i'm quite frustrated by this problem.
> Today i had the  idea to update my svn from the old 0.97 to the 1.0
> release, and now nothing is working anymore.
>
> I always get an anonymous "Internal Server Error"
> Maybe because my project included mptt, but the fact is that i cant
> figure out why it is crashing. Seems like it's the slug fields but i
> don't really know.
>
> Is there a solution? Or maybe, how can i return to my loved 0.97
> version?

Looks like it's because of newforms-admin.

> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython: TypeError: __init__()
> got an unexpected keyword argument 'prepopulate_from'


See:

http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Mergednewforms-adminintotrunk

Specifically, the "Changed prepopulate_from to be defined in the Admin  
class, not database field classes" section.

---
David Zhou
[EMAIL PROTECTED]




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Internal server error upgarding from 0.97 to 1.0

2008-09-09 Thread Karen Tracey
On Tue, Sep 9, 2008 at 11:39 AM, Haku <[EMAIL PROTECTED]> wrote:

>
> Hello, i'm quite frustrated by this problem.
> Today i had the  idea to update my svn from the old 0.97 to the 1.0
> release, and now nothing is working anymore.
>

0.97 was never an official release.  So, you were running some revision
pulled from SVN.  Before upgrading it would have been helpful if you noted
the specific revision reported by 'svn info'.  That would have given you the
ability to svn up -r back to that revision in case of any migration
difficulties.


> I always get an anonymous "Internal Server Error"
> Maybe because my project included mptt, but the fact is that i cant
> figure out why it is crashing. Seems like it's the slug fields but i
> don't really know.
>

The error is not so anonymous.  You include the traceback below.  For easier
debug on the upgrade, you might want to consider setting DEBUG to True until
you complete the migration  to 1.0.  That way you will get pretty debug
pages instead of the basic Internal Error page with the actual traceback
hidden in a logfile.


>
> Is there a solution? Or maybe, how can i return to my loved 0.97
> version?


You need to update your code to account for the backwards-incompatible
changes made between whatever version you had and the 1.0 code.  You
probably want to read:

http://docs.djangoproject.com/en/dev/releases/1.0-porting-guide

as a start.


> [snip]

[Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython: TypeError: __init__()
> got an unexpected keyword argument 'prepopulate_from'
>

For this particular error, search for 'prepopulate_from' on that page I
pointed to above and you'll see this is related to the new admin in 1.0.
There are going to be other things you will need to change as well to get
admin working on 1.0, follow the porting guide though and you should be able
to get things running again with relatively little pain.

Karen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Internal server error upgarding from 0.97 to 1.0

2008-09-14 Thread Fangzx

hi,Haku,I have solved the problem:

 old code 
from django.newforms.fields import Field

--- change to new code ---
from django.forms.fields import Field

search all code, replace django.newforms with django.forms!

On 9月9日, 下午11时39分, Haku <[EMAIL PROTECTED]> wrote:
> Hello, i'm quite frustrated by this problem.
> Today i had the  idea to update my svn from the old 0.97 to the1.0
> release, and now nothing is working anymore.
>
> I always get an anonymous "InternalServerError"
> Maybe because my project included mptt, but the fact is that i cant
> figure out why it is crashing. Seems like it's the slug fields but i
> don't really know.
>
> Is there a solution? Or maybe, how can i return to my loved 0.97
> version?
>
> Sorry for the dumb questions and the bad english!
>
> --- IF THIS CAN HELP, THIS IS THE ERRORS I GET FROM THE LOG FILE
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython: Traceback (most recent
> call last):
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/mod_python/apache.py", line 299, in
> HandlerDispatch\nresult = object(req)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/core/handlers/modpython.py", line 222,
> in handler\nreturn ModPythonHandler()(req)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/core/handlers/modpython.py", line 195,
> in __call__\nresponse = self.get_response(request)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/core/handlers/base.py", line 67, in
> get_response\nresponse = middleware_method(request)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/home/django/
> intranet_pini/../intranet_pini/middleware/threadlocals.py", line 12,
> in process_request\n_thread_locals.user = getattr(request, 'user',
> None)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/contrib/auth/middleware.py", line 5, in
> __get__\nrequest._cached_user = get_user(request)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/contrib/auth/__init__.py", line 83, in
> get_user\nuser_id = request.session[SESSION_KEY]
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/contrib/sessions/backends/base.py",
> line 46, in __getitem__\nreturn self._session[key]
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/contrib/sessions/backends/base.py",
> line 172, in _get_session\nself._session_cache = self.load()
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/contrib/sessions/backends/db.py", line
> 16, in load\nexpire_date__gt=datetime.datetime.now()
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/db/models/manager.py", line 93, in get
> \nreturn self.get_query_set().get(*args, **kwargs)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/db/models/query.py", line 297, in get
> \nclone = self.filter(*args, **kwargs)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/db/models/query.py", line 483, in filter
> \nreturn self._filter_or_exclude(False, *args, **kwargs)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/db/models/query.py", line 501, in
> _filter_or_exclude\nclone.query.add_q(Q(*args, **kwargs))
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/db/models/sql/query.py", line 1224, in
> add_q\ncan_reuse=used_aliases)
> [Tue Sep 09 19:35:43 2008] [error] [client 192.168.0.101]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.4/site-packages/django/db/models/sql/query.py", line 1099, in

Re: Internal server error upgarding from 0.97 to 1.0

2008-09-14 Thread Martin Diers

On Sep 9, 2008, at 10:39 AM, Haku wrote:

>
> Hello, i'm quite frustrated by this problem.
> Today i had the  idea to update my svn from the old 0.97 to the 1.0
> release, and now nothing is working anymore.
>
> I always get an anonymous "Internal Server Error"
> Maybe because my project included mptt, but the fact is that i cant
> figure out why it is crashing. Seems like it's the slug fields but i
> don't really know.
>

Mptt has not been updated to work with 1.0, as it relies upon signals,  
which were changed in 1.0. If you want to use mptt, you will need to  
examine the new signals API, and update a local copy of the mptt  
codebase to use it. It's not that hard - The signals are just declared  
differently.

Mptt needs a refactor anyway. It would be ideal if it dropped the  
dynamic Model alterations, and utilized the new Model inheritance  
features introduced in 1.0. I re-implemented mptt this way for my own  
uses - but other customizations I made to it make it inappropriate for  
a patch.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---