Using ubernostroms Django Registration app coupled with his Profile
app, both highly recommended, got the default app up and running no
problems at all.
I'm unable to override any default behaviour the proper way, as I
can't seem to pass any extra parameters through the urls.py file. Here
is my urls:

from django.conf.urls.defaults import *
from profiles import views
from django.contrib.auth.decorators import login_required
from userinfo.forms import ProfileForm

urlpatterns = patterns('',
                       url(r'^edit/$',
                           login_required(views.edit_profile),
{'form_class' : ProfileForm},
                           name='profiles_edit_profile'),
                       url(r'^(?P<username>\w+)/$',
                           login_required(views.profile_detail),
                           name='profiles_profile_detail'),
                       )

I have my custom form class ProfileForm. When I try this I get a
stack:

Original Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/django/template/debug.py",
line 71, in render_node
    result = node.render(context)
  File "/Library/Python/2.5/site-packages/django/template/
defaulttags.py", line 155, in render
    nodelist.append(node.render(context))
  File "/Library/Python/2.5/site-packages/django/template/debug.py",
line 87, in render
    output = force_unicode(self.filter_expression.resolve(context))
  File "/Library/Python/2.5/site-packages/django/utils/encoding.py",
line 71, in force_unicode
    s = unicode(s)
TypeError: unbound method __unicode__() must be called with
ProfileForm instance as first argument (got nothing instead)


Now, the docs say to pass in the Class name, and the stack seems to be
saying I need an Instance? Whatever extra parameter I pass I get the
same error.

What am I doing wrong?

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

Reply via email to