Git Product home page Git Product logo

django-inspectional-registration's Introduction

django-inspectional-registration

Build status Coverage Requirements Status Code Health Inspection
Author
Alisue <[email protected]>
Supported python versions
2.6, 2.7, 3.2, 3.3, 3.4, 3.5
Supported django versions
1.5 - 1.10

django-inspectional-registration is a enhanced application of django-registration. The following features are available

  • Inspection steps for registration. You can accept or reject the account registration before sending activation key to the user.
  • Password will be filled in after the activation step to prevent that the user forget them previously filled password in registration step (No password filling in registration step)
  • Password can be generated programatically and force to activate the user. The generated password will be sent to the user by e-mail.
  • Any Django models are available to use as supplemental information of registration if the models are subclasses of registration.supplements.RegistrationSupplementBase. It is commonly used for inspection.
  • You can send any additional messages to the user in each steps (acceptance, rejection and activation)
  • The behaviors of the application are customizable with Backend feature.
  • The E-mails or HTMLs are customizable with Django template system.
  • Can be migrated from django-registration simply by south
  • django-mailer compatible. Emails sent from the application will use django-mailer if 'mailer' is in your INSTALLED_APPS

The difference with django-registration

While django-registration requires 3 steps for registration, django-inspectional-registration requires 5 steps and inspector for registration.

Online documentation

See django-inspectional-registration official documents for more detail

For translators

To create a message file, execute the following command (with your language)

$ python manage.py makemessages -l ja

You can compile the latest message files with the following command

$ python setup.py compile_messages

The command above is automatically called before sdist command if you call python manage.py sdist.

Email

REGISTRATION_FROM_EMAIL is used as the FROM email address emails send by django-inspectional-registration. If REGISTRATION_FROM_EMAIL is not set the Django setting _DEFAULT_FROM_EMAIL: <https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email/> will be used instead.

To set REGISTRATION_FROM_EMAIL add REGISTRATION_FROM_EMAIL to your settings file.

Example:

REGISTRATION_FROM_EMAIL = '[email protected]'

Backward incompatibility

Because of an issue#24, django-inspectional-registration add the following three new options.

  • REGISTRATION_DJANGO_AUTH_URLS_ENABLE If it is False, django-inspectional-registration do not define the views of django.contrib.auth. It is required to define these view manually. (Default: True)
  • REGISTRATION_DJANGO_AUTH_URL_NAMES_PREFIX It is used as a prefix string of view names of django.contrib.auth. For backward compatibility, set this value to 'auth_'. (Default: '')
  • REGISTRATION_DJANGO_AUTH_URL_NAMES_SUFFIX It is used as a suffix string of view names of django.contrib.auth. For backward compatibility, set this value to ''. (Default: '')

This changes were introduced from version 0.4.0, to keep the backward compatibility, write the following in your settings module.

REGISTRATION_DJANGO_AUTH_URLS_ENABLE = True
REGISTRATION_DJANGO_AUTH_URL_NAMES_PREFIX = 'auth_'
REGISTRATION_DJANGO_AUTH_URL_NAMES_SUFFIX = ''

Because of an issue#36, django-inspectional-registration add the following new option.

  • REGISTRATION_USE_OBJECT_PERMISSION If it is True, django-inspectional-registration pass obj to request.user.has_perm in RegistrationAdmin.has_*_permission() methods. A default permission backend of Django does not support object permission thus it should be False if you don't use extra permission backends such as django-permission.

This change was introduced from version 0.4.7. To keep backward compatibility, write the following in your settings module.

REGISTRATION_USE_OBJECT_PERMISSION = True

django-inspectional-registration's People

Contributors

ckirby avatar funkybob avatar giginet avatar lambdalisue avatar luzfcb avatar mick-t avatar ryanjdillon avatar saex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-inspectional-registration's Issues

Small bug with debug server

Again...
When I went through all the steps of registering, I go to http://127.0.0.1:8000/admin/auth/user/26/ and get this

Request Method: GET
Request URL: http://127.0.0.1:8000/admin/auth/user/26/

Environment:

Django Version: 1.5.1
Python Version: 2.7.3
Installed Applications:
('admin_tools',
'admin_tools.theming',
'admin_tools.menu',
'admin_tools.dashboard',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'registration',
'supplementtut',
'katdata')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in wrapper
  2.             return self.admin_site.admin_view(view)(_args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
  3.                 response = view_func(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
  4.     response = view_func(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in inner
  5.         return view(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  6.         return bound_func(_args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
  7.                 response = view_func(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  8.             return func(self, _args2, *_kwargs2)
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py" in inner
  9.             return func(_args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in change_view
  10.         for FormSet, inline in zip(self.get_formsets(request, obj), inline_instances):
    
    File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in get_formsets
  11.         yield inline.get_formset(request, obj)
    
    File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in get_formset
  12.     return inlineformset_factory(self.parent_model, self.model, **defaults)
    
    File "/usr/local/lib/python2.7/dist-packages/django/forms/models.py" in inlineformset_factory
  13. fk = _get_foreign_key(parent_model, model, fk_name=fk_name)
    
    File "/usr/local/lib/python2.7/dist-packages/django/forms/models.py" in _get_foreign_key
  14.         raise Exception("%s has no ForeignKey to %s" % (model, parent_model))
    

Exception Type: Exception at /admin/auth/user/26/
Exception Value: <class 'supplementtut.models.MyRegistrationSupplement'> has no ForeignKey to <class 'django.contrib.auth.models.User'>

After restart server - OK, but after create another user - again...

Thanks.

Accepting a user raises TransactionManagementError

I get this error when I try to accept a user. I am up to step 2 here.

TransactionManagementError at /admin/registration/registrationprofile/4/ This is forbidden when an 'atomic' block is active.

It happens at L173 of ``registration/backends/default/init.py` when selecting the "accept" or "force" options.

I'm using Django 1.6 on postgres.

Any ideas?

Notification error

Oh... :)
When I added 'registration.contrib.notification' in INSTALLED_APP, I get this:

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/registration/register/

Django Version: 1.5.1
Python Version: 2.7.3
Installed Applications:
('admin_tools',
'admin_tools.theming',
'admin_tools.menu',
'admin_tools.dashboard',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'registration',
'registration.contrib.notification',
'supplementtut',
'katdata')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  2.         return self.dispatch(request, _args, *_kwargs)
    
    File "/home/djfile/django-inspectional-registration-master/registration/views.py" in dispatch
  3.     return super(RegistrationView, self).dispatch(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  4.     return handler(request, _args, *_kwargs)
    
    File "/home/djfile/django-inspectional-registration-master/registration/views.py" in post
  5.         return self.form_valid(form, supplement_form)
    
    File "/home/djfile/django-inspectional-registration-master/registration/views.py" in form_valid
  6.     self.new_user = self.backend.register(username, email, self.request)
    
    File "/home/djfile/django-inspectional-registration-master/registration/backends/default/init.py" in register
  7.             request=request,
    
    File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py" in send
  8.         response = receiver(signal=self, sender=sender, **named)
    
    File "/home/djfile/django-inspectional-registration-master/registration/contrib/notification/init.py" in send_notification_email_reciver
  9. send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, recipients)
    
    File "/home/djfile/django-inspectional-registration-master/registration/utils.py" in send_mail
  10. return django_send_mail(subject, message, from_email, recipients)
    
    File "/usr/local/lib/phon2.7/dist-packages/django/core/mail/init.py" in send_mail
  11.                     connection=connection).send()
    
    File "/usr/local/lib/python2.7/dist-packages/django/core/mail/message.py" in send
  12.     return self.get_connection(fail_silently).send_messages([self])
    
    File "/usr/local/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py" in send_messages
  13.             sent = self._send(message)
    
    File "/usr/local/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py" in _send
  14.                 force_bytes(message.as_string(), charset))
    
    File "/usr/lib/python2.7/smtplib.py" in sendmail
  15.         raise SMTPRecipientsRefused(senderrs)
    

Exception Type: SMTPRecipientsRefused at /registration/register/
Exception Value: {u'a': (553, "5.1.2 We weren't able to find the recipient domain. Please check for any\n5.1.2 spelling errors, and make sure you didn't enter any spaces, periods,\n5.1.2 or other punctuation after the recipient's email address. 3sm8467822lbr.0 - gsmtp"), u'o': (553, "5.1.2 We weren't able to find the recipient domain. Please check for any\n5.1.2 spelling errors, and make sure you didn't enter any spaces, periods,\n5.1.2 or other punctuation after the recipient's email address. 3sm8467822lbr.0 - gsmtp")}yt

Can not override __str__ in RegistrationSupplementBase

When trying to override the __str__ function

class RegistrationSupplement(RegistrationSupplementBase):
    firstname = models.CharField("First name", max_length=100, help_text="Please fill in your first name")
    lastname = models.CharField("Last name", max_length=100, help_text="Please fill in your last name")
    affiliation = models.CharField("Affiliation", max_length=100, help_text="Please fill in your affiliation")
    pi = models.CharField("Principal Investigator", max_length=100,
                          help_text="Please fill in your Principal Investigator")
    remarks = models.TextField("Remarks", blank=True)

    def __str__(self):
        return "%s %s, %s".format(self.firstname, self.lastname, self.affiliation)

I get the exception raised from the Base class.
I have set the REGISTRATION_SUPPLEMENT_CLASS in settings.py and can see the additional supplement fields on the register page.

When I want to see the Registration Profiles on the admin page, I get the exception

NotImplementedError at /admin/registration/registrationprofile/
You must define '__str__' method and return summary of the supplement
Request Method: GET
Request URL:    http://127.0.0.1:8000/admin/registration/registrationprofile/
Django Version: 1.9.7
Exception Type: NotImplementedError
Exception Value:    
You must define '__str__' method and return summary of the supplement
Exception Location: /usr/local/lib/python2.7/site-packages/registration/supplements/base.py in __str__, line 64
Python Executable:  /usr/local/bin/python
Python Version: 2.7.11
Python Path:    
['/code',
 '/usr/local/lib/python27.zip',
 '/usr/local/lib/python2.7',
 '/usr/local/lib/python2.7/plat-linux2',
 '/usr/local/lib/python2.7/lib-tk',
 '/usr/local/lib/python2.7/lib-old',
 '/usr/local/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/site-packages']
Server time:    Thu, 23 Jun 2016 13:42:12 +0200

Raise `AppRegistryNotReady` on Django1.9

Traceback (most recent call last):
  File "runtests.py", line 55, in <module>
    run_tests(base_dir)
  File "runtests.py", line 36, in run_tests
    django.setup()
  File "/Users/giginet/.ghq/github.com/lambdalisue/django-inspectional-registration/.tox/py34-django19/lib/python3.4/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/giginet/.ghq/github.com/lambdalisue/django-inspectional-registration/.tox/py34-django19/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/Users/giginet/.ghq/github.com/lambdalisue/django-inspectional-registration/.tox/py34-django19/lib/python3.4/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/Users/giginet/.ghq/github.com/lambdalisue/django-inspectional-registration/.tox/py34-django19/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2212, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "src/registration/supplements/__init__.py", line 11, in <module>
    from registration.supplements.base import RegistrationSupplementBase
  File "src/registration/supplements/base.py", line 14, in <module>
    class RegistrationSupplementBase(models.Model):
  File "/Users/giginet/.ghq/github.com/lambdalisue/django-inspectional-registration/.tox/py34-django19/lib/python3.4/site-packages/django/db/models/base.py", line 94, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/Users/giginet/.ghq/github.com/lambdalisue/django-inspectional-registration/.tox/py34-django19/lib/python3.4/site-packages/django/apps/registry.py", line 239, in get_containing_app_config
    self.check_apps_ready()
  File "/Users/giginet/.ghq/github.com/lambdalisue/django-inspectional-registration/.tox/py34-django19/lib/python3.4/site-packages/django/apps/registry.py", line 124, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

It seems to be same with this issue.
jazzband/django-permission#48

Wrapping django-inspectional-registration functions

Hello lambdalisue,

Thanks for the awesome application. I will request a small clarification.

I would like to wrap RegistrationView in order to pass firstname and username from supplement if exist to the user object in order to use {{ user.get_full_name }} in the registration completed email.

I opened a somehow more general question in Stackoverflow. If you have some time please let me know for a solution.

http://stackoverflow.com/questions/19187539/extend-a-view-in-django-inspectional-registration

Thanks once again

Travis fail to install django-inspectional-registration

Travis CI fail to install django-inspectional-registration, due to the additional code in setup.py.
It is happened because Travis CI try to install all requirements at once.

The additional code does compile .po files into .mo files and this kind of functions are required to make sure the message files are latest, but it not required in installation.

Thus the additional code should be move on to the sdist block so the message files are forced to be latest before the publication to PyPI.

ValidationError at /admin/registration/registrationprofile/6/

Hello,

Thanks for closing old issues, but I have new :(

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/registration/registrationprofile/6/

Django Version: 1.5.1
Python Version: 2.7.3
Installed Applications:
('admin_tools',
'admin_tools.theming',
'admin_tools.menu',
'admin_tools.dashboard',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'registration',
'supplementtut',
'katdata')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in wrapper
  2.             return self.admin_site.admin_view(view)(_args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
  3.                 response = view_func(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
  4.     response = view_func(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in inner
  5.         return view(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  6.         return bound_func(_args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
  7.                 response = view_func(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  8.             return func(self, _args2, *_kwargs2)
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py" in inner
  9.             return func(_args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/registration/admin/init.py" in change_view
  10.             request, object_id, form_url, extra_context)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  11.         return bound_func(_args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
  12.                 response = view_func(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  13.             return func(self, _args2, *_kwargs2)
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py" in inner
  14.             return func(_args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in change_view
  15.                               queryset=inline.queryset(request))
    
    File "/usr/local/lib/python2.7/dist-packages/django/forms/models.py" in init
  16.                                             queryset=qs, **kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/forms/models.py" in init
  17.     super(BaseModelFormSet, self).**init**(**defaults)
    
    File "/usr/local/lib/python2.7/dist-packages/django/forms/formsets.py" in init
  18.     self._construct_forms()
    
    File "/usr/local/lib/python2.7/dist-packages/django/forms/formsets.py" in _construct_forms
  19.     for i in xrange(min(self.total_form_count(), self.absolute_max)):
    
    File "/usr/local/lib/python2.7/dist-packages/django/forms/formsets.py" in total_form_count
  20.         return self.management_form.cleaned_data[TOTAL_FORM_COUNT]
    
    File "/usr/local/lib/python2.7/dist-packages/django/forms/formsets.py" in management_form
  21.             raise ValidationError('ManagementForm data is missing or has been tampered with')
    

Exception Type: ValidationError at /admin/registration/registrationprofile/6/
Exception Value: [u'ManagementForm data is missing or has been tampered with']

Thanks.

Django 1.8: django.contrib.admin.util is deprecated

In Django 1.8, django-inspectional-registration's use of django.contrib.admin.util triggers a deprecation warning. Instead, registration/admin/__init__.py should be using django.contrib.admin.utils (notice the "s" at the end.

Since this is a one-character fix, I figured doing a pull request was overkill. The only place this needs to be fixed is registration/admin/__init__.py.

How can I bypass the admin accepting/rejecting step in the user registration process?

I am developing an application where an admin invites a user. The user opens the same registration page provided by this package. When he registers, I don't want the admin to accept/reject his request and don't want to send the verification email (since admin is requesting him to sign up). How can I avoid these three steps from the 5-step process provided by this application?

I greatly appreciate your help.
Thanks.

Unexpected circular reference is caused by using supplement feature

Because of the line here, unexpected circular reference is caused by using supplement feature.
The problem of this is that this unexpected circular reference is quite difficult to notice, due to the error message.

This kind of circular reference can be easily ignored by using property thus the line should be replaced with the code using property

Use email other than settings.DEFAULT_FROM_EMAIL

Hi,

I don't want to use settings.DEFAULT_FROM_EMAIL as the email address that emails are sent from. I propose adding a settings option called REGISTRATION_FROM_EMAIL and if it exists RegistrationProfile._send_mail() & send_notification_email_reciver() will use settings.REGISTRATION_FROM_EMAIL and if it doesn't exist they will use settings.DEFAULT_FROM_EMAIL.

I will make the code changes and test and will do a pull request later today.

Thanks
--Mick

Not all template files are copied when I install this package

When I install this package (tried both ways pip and by git), it does not copies some files like registration_email_subject.txt. I am using ubuntu and I am looking in this location

Using loader django.template.loaders.app_directories.Loader:
/home/myname/.virtualenvs/envname/local/lib/python2.7/site-packages/registration/templates/registration/registration_email_subject.txt (File does not exist).

When I copy these files from GIT to this directory above, it works. But it shouldn't be the case. Installation just copies 8 files. However, template in github have a total of 16 files.

Save Supplemental Information as User Profile

First off thanks for such a great package! I am having some issues with the supplemental information. I have created my own Registration Supplement and it is working great. However, I want this information to remain linked with the User as profile information and not get deleted when the RegistrationProfile gets deleted due to the OneToOne registration_profile field. I have tried a few different ways but continually run into issues. I wanted to know if there was an easy built in way that I am missing. Thanks!

Inject values from supplement form in the User model

I've implemented a Supplement Form as explained here:

http://django-inspectional-registration.readthedocs.org/en/latest/about_registration_supplement.html

These 3 new fields are correctly presented in the registration form and also in the admin site. But when the account is accepted this information is lost (as far as I know)

What I want to do is use the Supplement Form to include there information fields like the first_name and the last_name and once the admin approve the activation, store that information in the basic django.contrib.auth User model.

Is that possible?

Following Registration Supplement Tutorial and I'm getting a error

Im following the tutorial and I've got a error.

registration.defaultregistrationsupplement: Accessor for field 'registration_profile' clashes with related field 'RegistrationProfile._supplement'. Add a related_name argument to the definition for 'registration_profile'.
registration.defaultregistrationsupplement: Reverse query name for field 'registration_profile' clashes with related field 'RegistrationProfile._supplement'. Add a related_name argument to the definition for 'registration_profile'.
supplementtut.myregistrationsupplement: Accessor for field 'registration_profile' clashes with related field 'RegistrationProfile._supplement'. Add a related_name argument to the definition for 'registration_profile'.
supplementtut.myregistrationsupplement: Reverse query name for field 'registration_profile' clashes with related field 'RegistrationProfile._supplement'. Add a related_name argument to the definition for 'registration_profile'.

Inspector notification e-mail not working

Hi,
I'm using django-inspectional-registration and have e-mail notification working for user registration but I can't get the "inspector" e-mail notification working.

In the docs there is a short section http://django-inspectional-registration.readthedocs.org/en/latest/faq.html#how-can-i-get-notification-email-when-new-user-has-registered-in-the-site but it doesn't have much info.

I have done the following steps:

  1. Added 'registration.contrib.notification' to INSTALLED_APPS in settings.
  2. Created registration/notification_email.txt and registration/notification_email_subject.txt

Is there some other setting that I need?

Leaking of password reset token through the reset url

I think it is possible to leak the password reset token since it is left in the url. In Django 1.11 the token is stripped during a redirect (docs, code) to prevent the token from being taken in the referrer header from 3rd party apps on the page. I haven't dug too deeply into the source for this project but at a first glance it seems that the vulnerability exists. If this is the case would be happy to help fix similar to django-registration-redux, or at the very least alert you to the issue. Let me know if you guys need any help!

Additional migration created if using registration supplement

The manage.py makemigrationscommand created an additional migration in the registration app. This is annoying for deploying and I'm not sure if this is the expected behavior.

Migrations for 'gtaccess':
  0064_auto_20160621_1643.py:
    - Create model RegistrationSupplement
Migrations for 'registration':
  0002_auto_20160621_1643.py:
    - Remove field registration_profile from defaultregistrationsupplement
    - Delete model DefaultRegistrationSupplement

In the settings I added REGISTRATION_SUPPLEMENT_CLASS='package.to.RegistrationSupplement' but I didn't add the registration.supplements.default to my INSTALLED_APPS of settings.py because I thought the DefaultRegistrationSupplementmodel is not nedded.

But exactly that was my problem. If I add the registration.supplements.default to my INSTALLED_APPS the problem does not occur.

Long story short I'm happy now but as I mentioned I'm not sure if this is that expected behavior. I just want let you know about that.

By the way thanks for this excellent lib.

Using the Registration Backend Base

Hi,

I need to have a custom view where a user of my website can accept and manage the registrations without going into the Django admin.

I see that there is class registration.backends.RegistrationBackendBase and accept -- accept a registration. How do i go about using this? Do i do a url or extend it?

password_reset_done view has bad name

Password reset done view is named auth_password_reset_done on urls.py.

https://github.com/lambdalisue/django-inspectional-registration/blob/master/src/registration/urls.py#L48

However, django seems to recommend to name password_reset_done.

https://github.com/django/django/blob/1.6.5/django/contrib/auth/views.py#L142

Therefore, we will cause following errors when users access to Password change view.

django.core.urlresolvers.NoReverseMatch: Reverse for 'password_reset_done' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

Form validation

Hello. Could you help me with the form validation and Supplement form validation. How could I do that ? My full question on stackoverflow. Thank you.

Remove dependency on 'username' field

Hi,

I've just looked into the code and found that there is a wired in dependency on the username field of the user model. However, it may not be there. You should use get_user_model().USERNAME_FIELD to refer to it, but for example for creating a user, you don't even have to name it. Just pass in a **kwargs .

Registration Supplement in django 1.7.5

When following your instructions on supplemental information on registration I get the following errors.

Django = 1.7.5
Python = 3.4.2

core.MyRegistrationSupplement.registration_profile: (fields.E304) Reverse accessor for 'MyRegistrationSupplement.registration_profile' clashes with reverse accessor for 'DefaultRegistrationSupplement.registration_profile'.
HINT: Add or change a related_name argument to the definition for 'MyRegistrationSupplement.registration_profile' or 'DefaultRegistrationSupplement.registration_profile'.
core.MyRegistrationSupplement.registration_profile: (fields.E305) Reverse query name for 'MyRegistrationSupplement.registration_profile' clashes with reverse query name for 'DefaultRegistrationSupplement.registration_profile'.
HINT: Add or change a related_name argument to the definition for 'MyRegistrationSupplement.registration_profile' or 'DefaultRegistrationSupplement.registration_profile'.
registration.DefaultRegistrationSupplement.registration_profile: (fields.E304) Reverse accessor for 'DefaultRegistrationSupplement.registration_profile' clashes with reverse accessor for 'MyRegistrationSupplement.registration_profile'.
HINT: Add or change a related_name argument to the definition for 'DefaultRegistrationSupplement.registration_profile' or 'MyRegistrationSupplement.registration_profile'.
registration.DefaultRegistrationSupplement.registration_profile: (fields.E305) Reverse query name for 'DefaultRegistrationSupplement.registration_profile' clashes with reverse query name for 'MyRegistrationSupplement.registration_profile'.
HINT: Add or change a related_name argument to the definition for 'DefaultRegistrationSupplement.registration_profile' or 'MyRegistrationSupplement.registration_profile'.

Your quick tutorial is very sparse and does not mention the files you have to add manually to your setup to get things working. Nor how to integrate your forms into a sites design, I am new to django, so I understand I may be missing things. But you should help the new guys out!

So is this a incompatible version? More documentation is always desired.

django-inspectional-registration and custom_user

Hi.

I am using django-inspectional-registration with django 1.8 (previously 1.7). It seems that django-inspectional-registration uses south which is incompatible out of the box with django migrations.

The problem is that I am user custom user model. The django-inspectional-registration become "unmigrated app" and thus django tries create django-inspectional-registration before my user model.

Note that I have tried to apply migration onto new database

Cause RemovedInDjango18Warning on django1.7

On Django1.8, ModelForm.Meta must contain fields or exclude fields

yourlabs/django-autocomplete-light#257

so warnings are caused in RegistrationSupplementForm or other forms on django 1.7.

/Users/giginet/.pyenv/versions/third1.7/lib/python3.3/site-packages/registration/supplements/base.py:76: RemovedInDjango18Warning: Calling modelform_factory without defining 'fields' or 'exclude' explicitly is deprecated
  setattr(cls, 'form_class', modelform_factory(cls))

/Users/giginet/.pyenv/versions/third1.7/src/django/django/forms/models.py:541: RemovedInDjango18Warning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form RegistrationSupplementForm needs updating
  return type(form)(class_name, (form,), form_class_attrs)

I guess that it must be changed as following.

  1. Add exclude or fields as member of ModelForm.Meta
  2. Add excude or fields as argument of modelform_factory

TypeError

I am still getting a type error in django 1.5.1 while trying to access the profile in admin to take action. Did a pip install like this pip install git+https://github.com/lambdalisue/django-inspectional-registration.git#egg=django-inspectional-registration to get the latest.

My error is the same as an issue that was just closed.

Error is:

TypeError at /admin/registration/registrationprofile/1/
get_inline_instances() takes exactly 2 arguments (3 given)
Request Method: GET
Request URL: http://localhost:8000/admin/registration/registrationprofile/1/
Django Version: 1.5.1
Exception Type: TypeError
Exception Value:
get_inline_instances() takes exactly 2 arguments (3 given)

django.conf.urls.patterns() is depreceated, update to list/tuple?

It seems like this would be a harmless change for future compatibility. I'd be happy to make said change if this is something that's ok.

<root path>/venv/lib/python3.4/site-packages/registration/urls.py:26: RemovedInDjango110Warning:
 django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to
 be a list of django.conf.urls.url() instances instead.
 name='registration_complete'),

Override RegistrationProfile Admin

Is there a good way to extend the RegistrationAdmin? It looks like it is the model admin is called if 'registration' is in INSTALLED_APPS, but if I remove 'registration' I can't import the RegistrationAdmin.

Exception in Admin with Django 1.8

I got the following Exception while trying to approve a registration:

Environment:

Request Method: GET
Request URL: https://XXX.de/admin/registration/registrationprofile/1/

Django Version: 1.8a1
Python Version: 2.7.8
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'registration',
'registration.supplements.default',
'registration.contrib.notification',
'guardian',
'djangobower')
Installed Middleware:
('x_forwarded_for.middleware.XForwardedForMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                 response = wrapped_callback(request, _callback_args, *_callback_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
  2.             return self.admin_site.admin_view(view)(_args, *_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  3.                 response = view_func(request, _args, *_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  4.     response = view_func(request, _args, *_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  5.         return view(request, _args, *_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  6.         return bound_func(_args, *_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  7.                 response = view_func(request, _args, *_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  8.             return func.**get**(self, type(self))(_args2, *_kwargs2)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner
  9.                 return func(_args, *_kwargs)
    
    File "/srv/XXX/venv/src/django-inspectional-registration/src/registration/admin/init.py" in change_view
  10.             request, object_id, form_url, extra_context
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in change_view
  11.     return self.changeform_view(request, object_id, form_url, extra_context)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  12.         return bound_func(_args, *_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  13.                 response = view_func(request, _args, *_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  14.             return func.**get**(self, type(self))(_args2, *_kwargs2)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner
  15.                 return func(_args, *_kwargs)
    
    File "/srv/XXX/venv/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in changeform_view
  16.         obj = self.get_object(request, unquote(object_id), to_field)
    

Exception Type: TypeError at /admin/registration/registrationprofile/1/
Exception Value: get_object() takes exactly 3 arguments (4 given)

Permissions bug prevents non-superusers from accepting/rejecting/activating registrations

I have a Group called 'Admin', to which I have given every Registration related permission. However, my User, which is part of the Admin group, but not marked as a superuser, gets a PermissionDenied error whenever he tries to accept a user registration.

I traced the code, and determined that this is the fault of the RegistrationAdmin.has_accept_permission() method. Because it passes obj into the call to request.user.has_perm('registration.accept_registration', obj), Django's django.contrib.auth.backends.ModelBackend class automatically treats the user as having no permissions at all. Here are the relevant methods in ModelBackend:

def get_all_permissions(self, user_obj, obj=None):
    if user_obj.is_anonymous() or obj is not None:
        return set()
    if not hasattr(user_obj, '_perm_cache'):
        user_obj._perm_cache = set("%s.%s" % (p.content_type.app_label, p.codename) for p in user_obj.user_permissions.select_related())
        user_obj._perm_cache.update(self.get_group_permissions(user_obj))
    return user_obj._perm_cache

def has_perm(self, user_obj, perm, obj=None):
    if not user_obj.is_active:
        return False
    return perm in self.get_all_permissions(user_obj, obj)

Notice that get_all_permissions() automatically returns an empty set when obj is not None. This is because Django's default permissions system doesn't support object-level permissions. It only supports Model-level permissions.

The fix for this is to stop passing obj into request.user.has_perm() in all three RegistrationAdmin.has_*_permission() methods.

Please fix this as soon as possible, as this is a showstopper bug for my site.

forms.MultipleChoiceField and only the first option saved

Dear All,

My RegistrationSupplementBase has 2 fields defined as TextField.
My form contains a forms.MultipleChoiceField based on a choices array for organisation_type field.
But each time the user selects more options only last one is saved in the DB.

My code:

# models.py
class RegistrationSupplement(RegistrationSupplementBase):
    """
    """
    organisation_type = models.TextField(_('organisation type'),
                                         max_length=1000)
    motivation = models.TextField(_('motivation'), max_length=1000)

#forms.py
class MyRegistrationForm(RegistrationForm):
    """
    """
    first_name = forms.CharField(widget=forms.TextInput(attrs=dict(attrs_dict, maxlength=75)),
                                 label=_("Surname"))
    last_name = forms.CharField(widget=forms.TextInput(attrs=dict(attrs_dict, maxlength=75)),
                                label=_("Name"))
    organisation_type = forms.MultipleChoiceField(choices=ORGANISATION_TYPE_CHOICES,
                                                  widget=forms.SelectMultiple)
    tos = forms.BooleanField(widget=forms.CheckboxInput(attrs=attrs_dict),
                             label=_('I have read and agreed to the '
                                     '<a href="#" data-toggle="modal" data-target="#open-disclaimer">Terms of Service</a>'),
                             error_messages={'required': _(
                                 _("You must agree to the terms to register"))})

    def clean(self):
        cleaned_data = super(MyRegistrationForm, self).clean()
        organisation_type = cleaned_data.get("organisation_type")
        motivation = cleaned_data.get("motivation")

        if organisation_type and motivation:
            if len(motivation) < 10:
                raise forms.ValidationError(_("Please, Motivation should be at least 10 characters"))

            cleaned_data["organisation_type"] = str(','.join(organisation_type))
        return cleaned_data

# adding first_name and last_name using Django fields
def user_created(sender, user, request, **kwargs):
    """
    Called via signals when user registers. Creates different profiles and
    associations
    """
    form = GlofasRegistrationForm(request.POST)
    # Update first and last name for user
    user.first_name = form.data['first_name']
    user.last_name = form.data['last_name']
    user.save()

user_registered.connect(user_created)

cleaned_data["organisation_type"] is correct and it contains comma separated values, but "somehow" only the last option selected is saved for organisation_type.
Any idea?

ImportError: cannot import name RequestSite

Hello !

There seems to be an issue with the app with django 1.9.1.

When I try to launch the migrations :

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/thomas/.local/share/virtualenvs/djangossl/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/home/thomas/.local/share/virtualenvs/djangossl/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
    django.setup()
  File "/home/thomas/.local/share/virtualenvs/djangossl/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/thomas/.local/share/virtualenvs/djangossl/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/home/thomas/.local/share/virtualenvs/djangossl/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/thomas/.local/share/virtualenvs/djangossl/lib/python2.7/site-packages/registration/models.py", line 63, in <module>
    from registration.utils import generate_activation_key
  File "/home/thomas/.local/share/virtualenvs/djangossl/lib/python2.7/site-packages/registration/utils.py", line 9, in <module>
    from django.contrib.sites.models import RequestSite
ImportError: cannot import name RequestSite

There seems to ba a fix there : https://stackoverflow.com/questions/34250597/importerror-cannot-import-name-requestsite-when-inlude-registration-in-instal

Thanks :)

RunTimeError when saving via admin

At first attempt of using this app I got an error when saving an instance (with Accept, Force Accept, Reject..):

RuntimeError at /admin/registration/registrationprofile/1/None

Obviously there's some parameter that's not being resolved in the url. In the admin list page the bulk function works however, so until I have time to look into what's happening in the instance save method, the bulk action will have to do. As I get more information on it I'll add it to the issue.

Signals

Hello. I'm trying to send email on user_registered signal to get full information about this user. I made signals.py file with the following code (as in official django docs on signals):

from registration.signals import user_registered
from django.dispatch import receiver
from django.core.mail import send_mail

@receiver(user_registered)
def user_registered_callback(sender, **kwargs):
    raise Exception(kwargs)
    msg = "User: {} User email: {} User google id {} ".format(kwargs["user"], kwargs["user"]['email1'],
                                                             kwargs["profile"]["google_plus_acc_num"])
    msg += kwargs
    send_mail('New mm user', msg, 'email_from',
              ['email_to'], fail_silently=False)

Lately I have added raise Exception(kwargs) to see if smth. happens or not.
Unfortunately nothing happens nor Exception neither sending email.
Did I made a mistake using your library ?
Thanks.

Registration with Unique Emails

I've been trying the registration form with unique emails but it is still letting in not unique emails. My urls.py is as below

from registration.forms import RegistrationFormUniqueEmail
from registration.views import RegistrationView

class RegistrationViewUniqueEmail(RegistrationView):
form_class = RegistrationFormUniqueEmail

urlpatterns = patterns('',
url(r'^$','homepage.views.index'),

url(r'^register/$', RegistrationViewUniqueEmail.as_view(), name='registration_register'),
url('^registration/', include('registration.urls')),

)

Admin interface error when clicking on a user

AttributeError at /admin/registration/registrationprofile/1/change/
'Options' object has no attribute 'get_all_field_names'



Request Method: GET
Request URL: http://<snip>/admin/registration/registrationprofile/1/change/

Django Version: 1.10
Python Version: 3.4.1
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'registration',
 'registration.supplements.default',
 'base_registration',
 'inventory',
 'purchase_orders',
 'invoicing',
 'customers')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')



Traceback:

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/core/handlers/exception.py" in inner
  39.             response = get_response(request)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/options.py" in wrapper
  544.                 return self.admin_site.admin_view(view)(*args, **kwargs)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/sites.py" in inner
  211.             return view(request, *args, **kwargs)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/lib64/python3.4/contextlib.py" in inner
  30.                 return func(*args, **kwds)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/registration/admin/__init__.py" in change_view
  440.                 request, object_id, form_url, extra_context

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/options.py" in change_view
  1512.         return self.changeform_view(request, object_id, form_url, extra_context)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/lib64/python3.4/contextlib.py" in inner
  30.                 return func(*args, **kwds)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/options.py" in changeform_view
  1467.                 formsets, inline_instances = self._create_formsets(request, obj, change=True)

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/options.py" in _create_formsets
  1799.         for FormSet, inline in self.get_formsets_with_inlines(*get_formsets_args):

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/options.py" in get_formsets_with_inlines
  703.             yield inline.get_formset(request, obj), inline

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/options.py" in get_formset
  1881.             fields = flatten_fieldsets(self.get_fieldsets(request, obj))

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/options.py" in get_fieldsets
  298.         return [(None, {'fields': self.get_fields(request, obj)})]

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/options.py" in get_fields
  1957.         form = self.get_formset(request, obj, fields=None).form

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/django/contrib/admin/options.py" in get_formset
  1886.         exclude.extend(self.get_readonly_fields(request, obj))

File "/home/ryan/apps/kingsway/venv/lib/python3.4/site-packages/registration/admin/__init__.py" in get_readonly_fields
  143.             fields = self.model._meta.get_all_field_names()

Exception Type: AttributeError at /admin/registration/registrationprofile/1/change/
Exception Value: 'Options' object has no attribute 'get_all_field_names'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.