It took me a minute to see it, but "str object not callable" is referring to the fact that your URL pattern is providing a string as its 2nd argument and "delete_object" (the string) cannot be imported and called.
You can either: 1) Use the actual view you imported (i.e. remove the single quotes). 2) Specific the 2nd argument in the URL pattern as the full path to the delete view: "django.views.generic.create_update.delete_object" I saw a reference on Django devs mailing list that these will be updated *very soon* to use newforms. -Rob On Jul 8, 7:14 pm, William <[EMAIL PROTECTED]> wrote: > Hi, I'm having a bit of trouble using the delete generic view in > Django SVN. I have the following entry in my urlpatterns: > from django.views.generic.create_update import * > urlpatterns = patterns('', > ... > (r'^calendar/delete/(?P<object_id>\d+)/$','delete_object', > {'model':Event,'post_delete_redirect':'/calendar/'}), > ... > ) > > And in a template, I have the following hyperlink: > <a href="/calendar/delete/{{event.id}}">Delete Event</a> > > When I click on the link in the above template, I get the following: > TypeError at /calendar/delete/1/ > 'str' object is not callable > /usr/lib/python2.5/site-packages/django/core/handlers/base.py in > get_response, line 86 > > I've tried various different ways of calling this generic view, but > none seem to work. > As a side note, is it worth using generic views such as create and > update since they still use oldforms? > > Thanks for any help. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---