django-dajaxice icon indicating copy to clipboard operation
django-dajaxice copied to clipboard

updatecombo() takes exactly 2 arguments (1 given)

Open sergey-zakharov opened this issue 11 years ago • 1 comments

I encountered the same problem in the current build with an example from the site! http://www.dajaxproject.com/fullform/

my code http://pastie.org/7721130

error: Internal Server Error: /dajaxice/teacher_constructor.updatecombo/ Traceback (most recent call last): File "/usr/local/lib/python3.2/dist-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, _callback_args, *_callback_kwargs) File "/usr/local/lib/python3.2/dist-packages/django/views/generic/base.py", line 68, in view return self.dispatch(request, _args, *_kwargs) File "/usr/local/lib/python3.2/dist-packages/dajaxice/views.py", line 52, in dispatch response = function.call(request, *_data) File "/usr/local/lib/python3.2/dist-packages/dajaxice/core/Dajaxice.py", line 18, in call return self.function(_args, **kwargs) TypeError: updatecombo() takes exactly 2 arguments (1 given)

but LOCALE_INDEPENDENT_PATHS = ( compile('^/dajaxice/'), ) doesn't help File "/usr/local/lib/python3.2/dist-packages/django/conf/init.py", line 47, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python3.2/dist-packages/django/conf/init.py", line 130, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python3.2/dist-packages/django/utils/importlib.py", line 35, in import_module import(name) File "/media/D/projects/InnoPract/workrepo/edplatform/edplatform/settings.py", line 170, in compile('^/dajaxice/'), TypeError: Required argument 'filename' (pos 2) not found

And such problem appers not only with this example! python3, django 5, the last dajax

Please, explain why it happens and what to do!

sergey-zakharov avatar Apr 25 '13 22:04 sergey-zakharov

I found this issue googling for "TypeError: Required argument 'filename' (pos 2) not found", when calling compile() outside a Django project, ie. with the compile() function from Python's builtin functions. You should probably fix your import to use Django's compile instead of the default one.

progval avatar Jul 28 '13 11:07 progval