praekeltfoundation / vumi-go

BSD 3-Clause "New" or "Revised" License
16 stars 20 forks source link

Fix registration so that it at least records people who are interested. #185

Open hodgestar opened 11 years ago

hodgestar commented 11 years ago

Current attempting to registered raises an error:

Traceback (most recent call last):

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/registration/views.py", line 187, in register
    new_user = backend.register(request, **form.cleaned_data)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/registration/backends/default/__init__.py", line 79, in register
    password, site)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/db/transaction.py", line 209, in inner
    return func(*args, **kwargs)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/registration/models.py", line 82, in create_inactive_user
    registration_profile = self.create_profile(new_user)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/registration/models.py", line 106, in create_profile
    activation_key=activation_key)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/db/models/manager.py", line 137, in create
    return self.get_query_set().create(**kwargs)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/db/models/query.py", line 377, in create
    obj.save(force_insert=True, using=self.db)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/db/models/base.py", line 463, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/db/models/base.py", line 551, in save_base
    result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/db/models/manager.py", line 203, in _insert
    return insert_query(self.model, objs, fields, **kwargs)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/db/models/query.py", line 1593, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 910, in execute_sql
    cursor.execute(sql, params)

  File "/var/praekelt/vumi-go/ve/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
    return self.cursor.execute(query, args)

DatabaseError: relation "registration_registrationprofile" does not exist
LINE 1: INSERT INTO "registration_registrationprofile" ("user_id", "...
                    ^
hodgestar commented 11 years ago

It looks like support was added via the Django registrations extension. Perhaps the production DB just needs be updated? Also, we need a link somewhere on the front page that directs people to the registration page.