Index: django/views/generic/create_update.py
===================================================================
--- django/views/generic/create_update.py	(revision 6470)
+++ django/views/generic/create_update.py	(working copy)
@@ -1,7 +1,6 @@
 from django.core.xheaders import populate_xheaders
 from django.template import loader
-from django import oldforms
-from django.db.models import FileField
+from django import newforms as forms
 from django.contrib.auth.views import redirect_to_login
 from django.template import RequestContext
 from django.http import Http404, HttpResponse, HttpResponseRedirect
@@ -10,7 +9,8 @@
 
 def create_object(request, model, template_name=None,
         template_loader=loader, extra_context=None, post_save_redirect=None,
-        login_required=False, follow=None, context_processors=None):
+        login_required=False, context_processors=None, form=forms.BaseForm,
+        formfield_callback=lambda f, **kwargs: f.formfield(**kwargs)):
     """
     Generic object-creation function.
 
@@ -23,22 +23,13 @@
     if login_required and not request.user.is_authenticated():
         return redirect_to_login(request.path)
 
-    manipulator = model.AddManipulator(follow=follow)
-    if request.POST:
-        # If data was POSTed, we're trying to create a new object
-        new_data = request.POST.copy()
+    ModelForm = forms.form_for_model(model, form=form, formfield_callback=formfield_callback)
+    if request.method == 'POST':
+        form = ModelForm(request.POST, request.FILES)
+        
+        if form.is_valid():
+            new_object = form.save()
 
-        if model._meta.has_field_type(FileField):
-            new_data.update(request.FILES)
-
-        # Check for errors
-        errors = manipulator.get_validation_errors(new_data)
-        manipulator.do_html2python(new_data)
-
-        if not errors:
-            # No errors -- this means we can save the data!
-            new_object = manipulator.save(new_data)
-
             if request.user.is_authenticated():
                 request.user.message_set.create(message=ugettext("The %(verbose_name)s was created successfully.") % {"verbose_name": model._meta.verbose_name})
 
@@ -51,12 +42,9 @@
             else:
                 raise ImproperlyConfigured("No URL to redirect to from generic create view.")
     else:
-        # No POST, so we want a brand new form without any data or errors
-        errors = {}
-        new_data = manipulator.flatten_data()
+        form = ModelForm()
 
-    # Create the FormWrapper, template, context, response
-    form = oldforms.FormWrapper(manipulator, new_data, errors)
+    # Create the template, context, response
     if not template_name:
         template_name = "%s/%s_form.html" % (model._meta.app_label, model._meta.object_name.lower())
     t = template_loader.get_template(template_name)
@@ -73,8 +61,9 @@
 def update_object(request, model, object_id=None, slug=None,
         slug_field='slug', template_name=None, template_loader=loader,
         extra_context=None, post_save_redirect=None,
-        login_required=False, follow=None, context_processors=None,
-        template_object_name='object'):
+        login_required=False, context_processors=None,
+        template_object_name='object', form=forms.BaseForm,
+        formfield_callback=lambda f, **kwargs: f.formfield(**kwargs)):
     """
     Generic object-update function.
 
@@ -102,16 +91,12 @@
     except ObjectDoesNotExist:
         raise Http404, "No %s found for %s" % (model._meta.verbose_name, lookup_kwargs)
 
-    manipulator = model.ChangeManipulator(getattr(object, object._meta.pk.attname), follow=follow)
+    ModelForm = forms.form_for_instance(object, form=form, formfield_callback=formfield_callback)
 
-    if request.POST:
-        new_data = request.POST.copy()
-        if model._meta.has_field_type(FileField):
-            new_data.update(request.FILES)
-        errors = manipulator.get_validation_errors(new_data)
-        manipulator.do_html2python(new_data)
-        if not errors:
-            object = manipulator.save(new_data)
+    if request.method == 'POST':
+        form = ModelForm(request.POST, request.FILES)
+        if form.is_valid():
+            object = form.save()
 
             if request.user.is_authenticated():
                 request.user.message_set.create(message=ugettext("The %(verbose_name)s was updated successfully.") % {"verbose_name": model._meta.verbose_name})
@@ -124,11 +109,8 @@
             else:
                 raise ImproperlyConfigured("No URL to redirect to from generic create view.")
     else:
-        errors = {}
-        # This makes sure the form acurate represents the fields of the place.
-        new_data = manipulator.flatten_data()
+        form = ModelForm()
 
-    form = oldforms.FormWrapper(manipulator, new_data, errors)
     if not template_name:
         template_name = "%s/%s_form.html" % (model._meta.app_label, model._meta.object_name.lower())
     t = template_loader.get_template(template_name)
Index: tests/regressiontests/views/tests/__init__.py
===================================================================
--- tests/regressiontests/views/tests/__init__.py	(revision 6470)
+++ tests/regressiontests/views/tests/__init__.py	(working copy)
@@ -1,4 +1,5 @@
 from defaults import *
 from i18n import *
 from static import *
-from generic.date_based import *
\ No newline at end of file
+from generic.date_based import *
+from generic.create_update import *
\ No newline at end of file
Index: tests/regressiontests/views/tests/generic/create_update.py
===================================================================
--- tests/regressiontests/views/tests/generic/create_update.py	(revision 0)
+++ tests/regressiontests/views/tests/generic/create_update.py	(revision 0)
@@ -0,0 +1,91 @@
+
+import datetime
+from django.test import TestCase 
+from django.contrib.auth.views import redirect_to_login
+from regressiontests.views.models import Article, Author
+
+class CreateObjectTest(TestCase):
+    fixtures = ['testdata.json']
+    
+    def test_not_logged_in(self):
+        """Verifies the user is logged in through the login_required kwarg"""
+        view_url = '/views/create_update/member/create/article/'
+        response = self.client.get(view_url)
+        self.assertRedirects(response, 'http://testserver/accounts/login/?next=%s' % view_url)
+    
+    def test_create_article_display_page(self):
+        """Ensures the generic view returned the page and contains a form."""
+        view_url = '/views/create_update/create/article/'
+        response = self.client.get(view_url)
+        self.assertEqual(response.status_code, 200)
+        if not response.context.get('form'):
+            self.fail('No form found in the response.')
+    
+    def test_create_article_with_errors(self):
+        """POSTs a form that contain validation errors."""
+        view_url = '/views/create_update/create/article/'
+        response = self.client.post(view_url, {
+            'title': 'My First Article',
+        })
+        self.assertFormError(response, 'form', 'slug', [u'This field is required.'])
+    
+    def test_create_article(self):
+        """Creates a new article through the generic view and ensures it gets
+        redirected to the correct URL defined by post_save_redirect"""
+        view_url = '/views/create_update/create/article/'
+        response = self.client.post(view_url, {
+            'title': 'My First Article',
+            'slug': 'my-first-article',
+            'author': '1',
+            'date_created': datetime.datetime(2007, 6, 25),
+        })
+        self.assertRedirects(response,
+            'http://testserver/views/create_update/view/article/my-first-article/',
+            target_status_code=404)
+
+class UpdateDeleteObjectTest(TestCase):
+    fixtures = ['testdata.json']
+    
+    def test_update_object_form_display(self):
+        """Verifies that the form was created properly and with initial values."""
+        response = self.client.get('/views/create_update/update/article/old_article/')
+        self.assertEquals(unicode(response.context['form']['title']),
+            u'<input id="id_title" type="text" name="title" value="Old Article" maxlength="100" />')
+    
+    def test_update_object(self):
+        """Verifies the form POST data and performs a redirect to
+        post_save_redirect"""
+        response = self.client.post('/views/create_update/update/article/old_article/', {
+            'title': 'Another Article',
+            'slug': 'another-article-slug',
+            'author': 1,
+            'date_created': datetime.datetime(2007, 6, 25),
+        })
+        self.assertRedirects(response,
+            'http://testserver/views/create_update/view/article/another-article-slug/',
+            target_status_code=404)
+        article = Article.objects.get(pk=1)
+        self.assertEquals(article.title, "Another Article")
+    
+    def test_delete_object_confirm(self):
+        """Verifies the confirm deletion page is displayed using a GET."""
+        response = self.client.get('/views/create_update/delete/article/old_article/')
+        self.assertTemplateUsed(response, 'views/article_confirm_delete.html')
+    
+    def test_delete_object_redirect(self):
+        """Verifies that post_delete_redirect works properly."""
+        response = self.client.post('/views/create_update/delete/article/old_article/')
+        self.assertRedirects(response,
+            'http://testserver/views/create_update/',
+            target_status_code=404)
+    
+    def test_delete_object(self):
+        """Verifies the object actually gets deleted on a POST."""
+        response = self.client.post('/views/create_update/delete/article/old_article/')
+        try:
+            Article.objects.get(slug='old_article')
+        except Article.DoesNotExist:
+            pass
+        else:
+            self.fail('Object was not deleted.')
+        
\ No newline at end of file
Index: tests/regressiontests/views/urls.py
===================================================================
--- tests/regressiontests/views/urls.py	(revision 6470)
+++ tests/regressiontests/views/urls.py	(working copy)
@@ -20,6 +20,10 @@
     'month_format': '%m', 
 } 
 
+crud_info_dict = {
+    'model': Article,
+}
+
 urlpatterns = patterns('',
     (r'^$', views.index_page),
     
@@ -44,5 +48,15 @@
         dict(allow_future=True, slug_field='slug', **date_based_info_dict)), 
     (r'^date_based/archive_month/(?P<year>\d{4})/(?P<month>\d{1,2})/$', 
         'django.views.generic.date_based.archive_month', 
-        date_based_info_dict),     
+        date_based_info_dict),
+    
+    # crud generic views
+    (r'^create_update/member/create/article/$', 'django.views.generic.create_update.create_object',
+        dict(login_required=True, **crud_info_dict)),
+    (r'^create_update/create/article/$', 'django.views.generic.create_update.create_object',
+        dict(post_save_redirect='/views/create_update/view/article/%(slug)s/', **crud_info_dict)),
+    (r'create_update/update/article/(?P<slug>[-\w]+)/$', 'django.views.generic.create_update.update_object',
+        dict(post_save_redirect='/views/create_update/view/article/%(slug)s/', slug_field='slug', **crud_info_dict)),
+    (r'create_update/delete/article/(?P<slug>[-\w]+)/$', 'django.views.generic.create_update.delete_object',
+        dict(post_delete_redirect='/views/create_update/', slug_field='slug', **crud_info_dict)),
 )
Index: tests/templates/views/article_confirm_delete.html
===================================================================
--- tests/templates/views/article_confirm_delete.html	(revision 0)
+++ tests/templates/views/article_confirm_delete.html	(revision 0)
@@ -0,0 +1 @@
+This template intentionally left blank
\ No newline at end of file
Index: tests/templates/views/article_form.html
===================================================================
--- tests/templates/views/article_form.html	(revision 0)
+++ tests/templates/views/article_form.html	(revision 0)
@@ -0,0 +1 @@
+This template intentionally left blank
\ No newline at end of file
Index: docs/generic_views.txt
===================================================================
--- docs/generic_views.txt	(revision 6470)
+++ docs/generic_views.txt	(working copy)
@@ -894,14 +894,21 @@
 The ``django.views.generic.create_update`` module contains a set of functions
 for creating, editing and deleting objects.
 
+**New in Django development version:**
+
+``django.views.generic.create_update.create_object`` and
+``django.views.generic.create_update.update_object`` now use `newforms`_ to
+build and display the form.
+
+.. _newforms: ../newforms/
+
 ``django.views.generic.create_update.create_object``
 ----------------------------------------------------
 
 **Description:**
 
 A page that displays a form for creating an object, redisplaying the form with
-validation errors (if there are any) and saving the object. This uses the
-automatic manipulators that come with Django models.
+validation errors (if there are any) and saving the object.
 
 **Required arguments:**
 
@@ -938,6 +945,15 @@
     * ``context_processors``: A list of template-context processors to apply to
       the view's template. See the `RequestContext docs`_.
 
+    * **New in Django development version:** ``form``: A ``BaseForm`` subclass
+      to allow form customization and validation. See an example
+      `using an alternate base class`_ to fully understand the usage of this
+      argument.
+    
+    * **New in Django development version:** ``formfield_callback``: A callback
+      function to easily customize the fields and widgets displayed by the form.
+      See the `newforms documentation`_ for more information.
+
 **Template name:**
 
 If ``template_name`` isn't specified, this view will use the template
@@ -947,22 +963,23 @@
 
 In addition to ``extra_context``, the template's context will be:
 
-    * ``form``: A ``django.oldforms.FormWrapper`` instance representing the form
+    * ``form``: A ``django.newforms.Form`` instance representing the form
       for editing the object. This lets you refer to form fields easily in the
       template system.
 
       For example, if ``model`` has two fields, ``name`` and ``address``::
 
           <form action="" method="post">
-          <p><label for="id_name">Name:</label> {{ form.name }}</p>
-          <p><label for="id_address">Address:</label> {{ form.address }}</p>
+          <p>{{ form.name }}</p>
+          <p>{{ form.address }}</p>
           </form>
 
-      See the `manipulator and formfield documentation`_ for more information
-      about using ``FormWrapper`` objects in templates.
+      See the `newforms documentation`_ for more information about using
+      ``Form`` objects in templates.
 
 .. _authentication system: ../authentication/
-.. _manipulator and formfield documentation: ../forms/
+.. _using an alternate base class: ../newforms/#using-an-alternate-base-class
+.. _newforms documentation: ../newforms/
 
 ``django.views.generic.create_update.update_object``
 ----------------------------------------------------
@@ -1019,6 +1036,15 @@
 
     * ``template_object_name``:  Designates the name of the template variable
       to use in the template context. By default, this is ``'object'``.
+    
+    * **New in Django development version:** ``form``: A ``BaseForm`` subclass
+      to allow form customization and validation. See an example
+      `using an alternate base class`_ to fully understand the usage of this
+      argument.
+    
+    * **New in Django development version:** ``formfield_callback``: A callback
+      function to easily customize the fields and widgets displayed by the form.
+      See the `newforms documentation`_ for more information.
 
 **Template name:**
 
@@ -1029,19 +1055,19 @@
 
 In addition to ``extra_context``, the template's context will be:
 
-    * ``form``: A ``django.oldforms.FormWrapper`` instance representing the form
+    * ``form``: A ``django.newforms.Form`` instance representing the form
       for editing the object. This lets you refer to form fields easily in the
       template system.
 
       For example, if ``model`` has two fields, ``name`` and ``address``::
 
           <form action="" method="post">
-          <p><label for="id_name">Name:</label> {{ form.name }}</p>
-          <p><label for="id_address">Address:</label> {{ form.address }}</p>
+          <p>{{ form.name }}</p>
+          <p>{{ form.address }}</p>
           </form>
 
-      See the `manipulator and formfield documentation`_ for more information
-      about using ``FormWrapper`` objects in templates.
+      See the `newforms documentation`_ for more information about using
+      ``Form`` objects in templates.
 
     * ``object``: The original object being edited. This variable's name
       depends on the ``template_object_name`` parameter, which is ``'object'``
