[google-appengine] Re: about error django 1.2 was requested, but 0.96.4.None is already in use
Another alternative that worked for me, that did not require the import django, is by putting the following line: os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' right above these lines from google.appengine.dist import use_library use_library('django', '1.2') I think it's also important for these lines to be put before any other import that uses django. For example, if you put them after the from google.appengine.ext.webapp import template, it will probably draw the error because the template import will have already imported the . 96 version. -Gil On Sep 18, 9:41 am, saintthor saintt...@gmail.com wrote: i have added such code: == t from google.appengine.dist import use_library use_library('django', '1.2') webapp_django_version = '1.2' == but the error raised in use_library() == 2011-09-19 00:20:02.722 class 'google.appengine.dist._library.UnacceptableVersionError':django1.2 was requested, but 0.96.4.None is already in use Traceback (most recent call last): File /base/data/home/apps/djdqbbs/d1.353358444069227713/2.py, line 8, in module from List import ListPg, PostPg, UserPg, InputPg, TreePg, WithChatPg, TestPg, MinePg, VerifyPage, OldPg, CssPg File /base/data/home/apps/djdqbbs/d1.353358444069227713/List.py, line 10, in module from google.appengine.ext.webapp.template import render File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/webapp/template.py, line 66, in module webapp._config_handle.django_setup() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/lib_config.py, line 352, in __getattr__ self._update_configs() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/lib_config.py, line 289, in _update_configs self._registry.initialize() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/lib_config.py, line 164, in initialize import_func(self._modname) File /base/data/home/apps/djdqbbs/d1.353358444069227713/ appengine_config.py, line 41, in module use_library('django', '1.2') File /base/python_runtime/python_lib/versions/1/google/appengine/ dist/_library.py, line 414, in use_library InstallLibrary(name, version, explicit=True) File /base/python_runtime/python_lib/versions/1/google/appengine/ dist/_library.py, line 367, in InstallLibrary CheckInstalledVersion(name, version, explicit=True) File /base/python_runtime/python_lib/versions/1/google/appengine/ dist/_library.py, line 300, in CheckInstalledVersion (name, desired_version, installed_version)) -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: about error django 1.2 was requested, but 0.96.4.None is already in use
You don't want to rely on this as with py27 os.environ will be thread local... On Oct 4, 2:25 am, Gillwill gillwill2...@yahoo.com wrote: Another alternative that worked for me, that did not require the import django, is by putting the following line: os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' right above these lines from google.appengine.dist import use_library use_library('django', '1.2') I think it's also important for these lines to be put before any other import that uses django. For example, if you put them after the from google.appengine.ext.webapp import template, it will probably draw the error because the template import will have already imported the . 96 version. -Gil On Sep 18, 9:41 am, saintthor saintt...@gmail.com wrote: i have added such code: == t from google.appengine.dist import use_library use_library('django', '1.2') webapp_django_version = '1.2' == but the error raised in use_library() == 2011-09-19 00:20:02.722 class 'google.appengine.dist._library.UnacceptableVersionError':django1.2 was requested, but 0.96.4.None is already in use Traceback (most recent call last): File /base/data/home/apps/djdqbbs/d1.353358444069227713/2.py, line 8, in module from List import ListPg, PostPg, UserPg, InputPg, TreePg, WithChatPg, TestPg, MinePg, VerifyPage, OldPg, CssPg File /base/data/home/apps/djdqbbs/d1.353358444069227713/List.py, line 10, in module from google.appengine.ext.webapp.template import render File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/webapp/template.py, line 66, in module webapp._config_handle.django_setup() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/lib_config.py, line 352, in __getattr__ self._update_configs() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/lib_config.py, line 289, in _update_configs self._registry.initialize() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/lib_config.py, line 164, in initialize import_func(self._modname) File /base/data/home/apps/djdqbbs/d1.353358444069227713/ appengine_config.py, line 41, in module use_library('django', '1.2') File /base/python_runtime/python_lib/versions/1/google/appengine/ dist/_library.py, line 414, in use_library InstallLibrary(name, version, explicit=True) File /base/python_runtime/python_lib/versions/1/google/appengine/ dist/_library.py, line 367, in InstallLibrary CheckInstalledVersion(name, version, explicit=True) File /base/python_runtime/python_lib/versions/1/google/appengine/ dist/_library.py, line 300, in CheckInstalledVersion (name, desired_version, installed_version)) -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: about error django 1.2 was requested, but 0.96.4.None is already in use
i put the code in handler file. and the same error occurs in use_library(). On 9月21日, 上午10时24分, roberto.cr roberto...@gmail.com wrote: as Jose has said, put the code you pasted here in the beginning of the script some stuff load django code without you knowing, like some stuff from google.appengine.ext.webapp if I remember correctly On Sep 20, 8:31 pm, Jose Montes de Oca jfmontesde...@google.com wrote: Are you adding that code in the beginning of your script handler your application use? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: about error django 1.2 was requested, but 0.96.4.None is already in use
There's an undocumented way to do this: http://stackoverflow.com/questions/4994913/app-engine-default-django-version-change/6289004#6289004 On Wed, Sep 21, 2011 at 1:59 AM, saintthor saintt...@gmail.com wrote: i put the code in handler file. and the same error occurs in use_library(). On 9月21日, 上午10时24分, roberto.cr roberto...@gmail.com wrote: as Jose has said, put the code you pasted here in the beginning of the script some stuff load django code without you knowing, like some stuff from google.appengine.ext.webapp if I remember correctly On Sep 20, 8:31 pm, Jose Montes de Oca jfmontesde...@google.com wrote: Are you adding that code in the beginning of your script handler your application use? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: about error django 1.2 was requested, but 0.96.4.None is already in use
I described here how I solved this problem. It works fine for me in production, ubuntu and macos: http://www.gae123.com/articles/dpwf/djgae1x.html Good luck, PK -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/mA5YEYERaVoJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: about error django 1.2 was requested, but 0.96.4.None is already in use
An alternative to what Jose says whould be to create a file named appengine_config.py in the same directory as your app.yaml and add the folowing line: webapp_django_version = '1.2' On Sep 18, 7:41 pm, saintthor saintt...@gmail.com wrote: i have added such code: == from google.appengine.dist import use_library use_library('django', '1.2') webapp_django_version = '1.2' == but the error raised in use_library() == 2011-09-19 00:20:02.722 class 'google.appengine.dist._library.UnacceptableVersionError': django 1.2 was requested, but 0.96.4.None is already in use Traceback (most recent call last): File /base/data/home/apps/djdqbbs/d1.353358444069227713/2.py, line 8, in module from List import ListPg, PostPg, UserPg, InputPg, TreePg, WithChatPg, TestPg, MinePg, VerifyPage, OldPg, CssPg File /base/data/home/apps/djdqbbs/d1.353358444069227713/List.py, line 10, in module from google.appengine.ext.webapp.template import render File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/webapp/template.py, line 66, in module webapp._config_handle.django_setup() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/lib_config.py, line 352, in __getattr__ self._update_configs() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/lib_config.py, line 289, in _update_configs self._registry.initialize() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/lib_config.py, line 164, in initialize import_func(self._modname) File /base/data/home/apps/djdqbbs/d1.353358444069227713/ appengine_config.py, line 41, in module use_library('django', '1.2') File /base/python_runtime/python_lib/versions/1/google/appengine/ dist/_library.py, line 414, in use_library InstallLibrary(name, version, explicit=True) File /base/python_runtime/python_lib/versions/1/google/appengine/ dist/_library.py, line 367, in InstallLibrary CheckInstalledVersion(name, version, explicit=True) File /base/python_runtime/python_lib/versions/1/google/appengine/ dist/_library.py, line 300, in CheckInstalledVersion (name, desired_version, installed_version)) -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: about error django 1.2 was requested, but 0.96.4.None is already in use
Are you adding that code in the beginning of your script handler your application use? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/AEteuU1eg70J. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: about error django 1.2 was requested, but 0.96.4.None is already in use
as Jose has said, put the code you pasted here in the beginning of the script some stuff load django code without you knowing, like some stuff from google.appengine.ext.webapp if I remember correctly On Sep 20, 8:31 pm, Jose Montes de Oca jfmontesde...@google.com wrote: Are you adding that code in the beginning of your script handler your application use? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.