Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moved newforms form_for_model and form_for_fields to django/newforms/…

…models.py

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4103 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8379785e79c6d92baa02f5705009d38f1601c1e1 1 parent 6b7cd79
Adrian Holovaty adrianholovaty authored
Showing with 14 additions and 12 deletions.
  1. +1 −12 django/newforms/__init__.py
  2. +13 −0 django/newforms/models.py
13 django/newforms/__init__.py
View
@@ -14,15 +14,4 @@
from widgets import *
from fields import *
from forms import Form
-
-##########################
-# DATABASE API SHORTCUTS #
-##########################
-
-def form_for_model(model):
- "Returns a Form instance for the given Django model class."
- raise NotImplementedError
-
-def form_for_fields(field_list):
- "Returns a Form instance for the given list of Django database field instances."
- raise NotImplementedError
+from models import *
13 django/newforms/models.py
View
@@ -0,0 +1,13 @@
+"""
+Helper functions for creating Forms from Django models and database field objects.
+"""
+
+__all__ = ('form_for_model', 'form_for_fields')
+
+def form_for_model(model):
+ "Returns a Form instance for the given Django model class."
+ raise NotImplementedError
+
+def form_for_fields(field_list):
+ "Returns a Form instance for the given list of Django database field instances."
+ raise NotImplementedError
Please sign in to comment.
Something went wrong with that request. Please try again.