python - django registration not working on heroku -
i have issue django-registration working fine on development environment not on heroku. registration view.
here heroku logs, find hard make sense of
2013-08-15t18:14:38.741579+00:00 heroku[router]: at=info method=post path=/accounts/register/acme/ host=inspire-dev.herokuapp.com fwd="86.183.78.102" dyno=web.1 connect=2ms service=267ms status=500 bytes=59 2013-08-15t18:14:38.739922+00:00 app[web.1]: traceback (most recent call last): 2013-08-15t18:14:38.740194+00:00 app[web.1]: self.result = application(self.environ, self.start_response) 2013-08-15t18:14:38.740621+00:00 app[web.1]: response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) 2013-08-15t18:14:38.740194+00:00 app[web.1]: file "/app/.heroku/python/lib/python2.7/wsgiref/handlers.py", line 85, in run 2013-08-15t18:14:38.740412+00:00 app[web.1]: response = self.get_response(request) 2013-08-15t18:14:38.740621+00:00 app[web.1]: file "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py", line 224, in handle_uncaught_exception 2013-08-15t18:14:38.741122+00:00 app[web.1]: [15/aug/2013 19:14:38] "post /accounts/register/acme/ http/1.1" 500 59 2013-08-15t18:14:38.740412+00:00 app[web.1]: file "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py", line 178, in get_response 2013-08-15t18:14:38.740194+00:00 app[web.1]: file "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 255, in __call__ 2013-08-15t18:14:38.740621+00:00 app[web.1]: return callback(request, **param_dict) 2013-08-15t18:14:38.740621+00:00 app[web.1]: typeerror: 'str' object not callable
my url pattern is:
url(r'^register/(?p<organization>[\w-]+)/$', registrationview.as_view(),
and view (modified django-registration)
def register(self, request, **cleaned_data): """ ... """ organization = organization.objects.filter(slug=slugify( request.post['organization'])) username, email, password = cleaned_data['username'], cleaned_data['email'], cleaned_data['password1'] if site._meta.installed: site = site.objects.get_current() else: site = requestsite(request) new_user = registrationprofile.objects.create_inactive_user(username, email, password, site) new_member = inspiremember.objects.create(author=new_user, organization=organization.get()) print "new_member", new_member signals.user_registered.send(sender=self.__class__, user=new_user, request=request) return new_user
any pointers appreciated
update
ok dug little deeper, putting print statements on place. app breaks on statement:
print "new user", registrationprofile.objects.create_inactive_user(username, email, password, site)
all data post passed fine have verified have username, email, password , site. error traceback still same above, , keeps working fine on dev machine.
Comments
Post a Comment