James Bennett  committed 00a5396

Wrap create_inactive_user in a transaction

  • Participants
  • Parent commits 4b2c792

Comments (0)

Files changed (2)

File docs/overview.txt

 There are three basic ways to install django-registration:
 automatically installing a package using Python's package-management
 tools, manually installing a package, and installing from a Mercurial
 Using a package-management tool

File registration/

 from django.conf import settings
 from django.db import models
+from django.db import transaction
 from django.template.loader import render_to_string
 from django.utils.translation import ugettext_lazy as _
 from django.contrib.auth.models import User
             send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [])
         return new_user
+    create_inactive_user = transaction.commit_on_success(create_inactive_user)
     def create_profile(self, user):