Commits

James Bennett committed c5f81c8

Some final pre-release cleanup.

Comments (0)

Files changed (4)

 
 # General information about the project.
 project = u'django-registration'
-copyright = u'2007-2012, James Bennett'
+copyright = u'2007-2013, James Bennett'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
 # The short X.Y version.
-version = '0.9'
+version = '1.0'
 # The full version, including alpha/beta/rc tags.
-release = '0.9'
+release = '1.0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
    quickstart
    release-notes
    upgrade
-   api
    default-backend
    simple-backend
    forms
 Backwards-incompatible changes
 ------------------------------
 
-If you're upgrading from an older release of django-registration, and
-if you were using the default setup (i.e., the included default
-URLconf and no custom URL patterns or custom arguments to views), you
-do not need to make any chances.
+The entire codebase was rewritten for |version|, switching from
+function-based views accepting keyword arguments to class-based views
+with overridable attributes. Whether this affects you will depend on
+how you were using django-registration previously:
 
-If you had customized django-registration by writing your own backend,
-you will now need to implement that backend by subclassing :ref:`the
-built-in views <views>` and overriding or implementing your
-customizations appropriately. Much of this is similar to previous
-backend class implementations, so minimal changes to existing code
-should be required.
+* If you're upgrading from an older release of django-registration,
+  and if you were using the default setup (i.e., the included default
+  URLconf and no custom URL patterns or custom arguments to views),
+  you do not need to make any changes.
+
+* If you had customized django-registration by writing your own
+  backend, you will now need to implement that backend by subclassing
+  :ref:`the built-in views <views>` and overriding or implementing
+  your customizations appropriately. Much of this is similar to
+  previous backend class implementations, so minimal changes to
+  existing code should be required; the primary change is that the
+  backend classes now *are* the views, so if you had multiple views
+  (e.g., one for signup and one for activation) your backend will now
+  consist of multiple classes -- one class per view -- rather than one
+  class total.

registration/models.py

 from django.utils.translation import ugettext_lazy as _
 
 try:
+    from django.contrib.auth import get_user_model
+    User = get_user_model()
+except ImportError:
+    from django.contrib.auth.models import User
+
+try:
     from django.utils.timezone import now as datetime_now
 except ImportError:
     datetime_now = datetime.datetime.now
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.