Djapian on Django Trunk (Newforms-Admin)

2 views
Skip to first unread message

Michael Ellis

unread,
Aug 7, 2008, 10:09:53 PM8/7/08
to Djapian Users
Does anyone have Djapian working on the latest Django trunk (rev. 8226
-- post newforms-admin merge)? I'm attempting to migrate from rev.
7519 to trunk and Djapian seems to be the show-stopper.

Here's the result of "python manage.py runserver":

Validating models...
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/djapian/backend/base.py:171: DeprecationWarning:
dispatcher.connect() is deprecated; use Signal.connect() instead.
dispatcher.connect(receiver=post_save, signal=signals.post_save,
sender=self.model)
Unhandled exception in thread started by <function inner_run at
0x15b3670>
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/management/commands/runserver.py",
line 47, in inner_run
self.validate(display_num_errors=True)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/management/base.py", line 117, in
validate
num_errors = get_validation_errors(s, app)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/management/validation.py", line
28, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/db/models/loading.py", line 128, in
get_app_errors
self._populate()
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/db/models/loading.py", line 57, in
_populate
self.load_app(app_name, True)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/db/models/loading.py", line 72, in
load_app
mod = __import__(app_name, {}, {}, ['models'])
File "/home/mysite/Catalog/models.py", line 161, in <module>
'active':'Product.active',
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/djapian/backend/base.py", line 171, in
__init__
dispatcher.connect(receiver=post_save, signal=signals.post_save,
sender=self.model)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/dispatch/dispatcher.py", line 210, in
connect
return signal.connect(receiver, sender, weak)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/dispatch/dispatcher.py", line 70, in
connect
"Signal receivers must accept keyword arguments (**kwargs)."
AssertionError: Signal receivers must accept keyword arguments
(**kwargs).

Thanks!
ME

Michael Ellis

unread,
Aug 7, 2008, 11:05:02 PM8/7/08
to Djapian Users
OK. I got it to work by adding "**kwargs" to the post_save and
pre_delete defined in /djapian/signals.py, but not without deprecation
warnings:

---------------------
Validating models...
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/djapian/backend/base.py:171: DeprecationWarning:
dispatcher.connect() is deprecated; use Signal.connect() instead.
dispatcher.connect(receiver=post_save, signal=signals.post_save,
sender=self.model)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/djapian/backend/base.py:172: DeprecationWarning:
dispatcher.connect() is deprecated; use Signal.connect() instead.
dispatcher.connect(receiver=pre_delete, signal=signals.pre_delete,
sender=self.model)
---------------------

I'm thinking someone smarter than me could fix this in a jiffy :)

http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Signalrefactoring

ME

Rafael "SDM" Sierra

unread,
Aug 9, 2008, 10:07:14 AM8/9/08
to djapia...@googlegroups.com

There were some changes in the way signals work in Django, I'll fix that :)

--
Rafael Sierra
http://blog.stiod.com
http://www.plurk.com/user/stiod
2008/3/10 Irapuan Martinez <xx...@gmail.com>:
> Se baixar música ilegal prejudicasse os artistas, meu HD estaria
> repleto de música sertaneja.

Michael Ellis

unread,
Aug 12, 2008, 9:43:01 AM8/12/08
to Djapian Users
Thanks, Raphael!

I'm really looking forward to your fixes because Djapian is now
keeping me from keeping up with Django trunk. Changeset 8291
completely broke Djapian as the deprecated dispatcher.connect function
is now backwards incompatible.

http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Removedseveralmoredeprecatedfeaturesfor1.0

ME

Michael Ellis

unread,
Aug 15, 2008, 4:47:58 PM8/15/08
to Djapian Users
In the Djapian Issues section of Google Code –
http://code.google.com/p/djapian/issues/detail?id=19 – jbmendelson
provided the Signals fix that has Djapian working with today's latest
trunk: Django r8391.

Alex Koshelev

unread,
Aug 19, 2008, 6:22:32 AM8/19/08
to Djapian Users
Just now i have ported current djapian trunk to django trunk. Enjoy!

Kevin.howerton

unread,
Aug 19, 2008, 5:56:28 PM8/19/08
to Djapian Users
hey

the current version in trunk is not building..

error: file 'src/scripts/run_djapian.py' does not exist

thanks
-k

Alex Koshelev

unread,
Aug 20, 2008, 3:34:50 AM8/20/08
to Djapian Users
Oh, thanks.

I forget to patch setup.py.

Note that run_djapian.py does not exist now and its functionality
moved to `index` ./manage.py command
Reply all
Reply to author
Forward
0 new messages