Index: django/db/models/fields/__init__.py
===================================================================
--- django/db/models/fields/__init__.py	(revision 4130)
+++ django/db/models/fields/__init__.py	(working copy)
@@ -20,6 +20,13 @@
 BLANK_CHOICE_DASH = [("", "---------")]
 BLANK_CHOICE_NONE = [("", "None")]
 
+# filters for chosing files and/or directories with FilePathField, use
+#     * MATCH_FILES to select only files,
+#     * MATCH_DIRECTORIES to select only directories and
+#     * MATCH_FILES | MATCH_DIRECTORIES to select both
+MATCH_FILES = 1
+MATCH_DIRECTORIES = 2
+
 # prepares a value for use in a LIKE query
 prep_for_like_query = lambda x: str(x).replace("\\", "\\\\").replace("%", "\%").replace("_", "\_")
 
@@ -622,12 +629,12 @@
         return os.path.normpath(f)
 
 class FilePathField(Field):
-    def __init__(self, verbose_name=None, name=None, path='', match=None, recursive=False, **kwargs):
-        self.path, self.match, self.recursive = path, match, recursive
+    def __init__(self, verbose_name=None, name=None, path='', match=None, match_type=MATCH_FILES, recursive=False, **kwargs):
+        self.path, self.match, self.match_type, self.recursive = path, match, match_type, recursive
         Field.__init__(self, verbose_name, name, **kwargs)
 
     def get_manipulator_field_objs(self):
-        return [curry(forms.FilePathField, path=self.path, match=self.match, recursive=self.recursive)]
+        return [curry(forms.FilePathField, path=self.path, match=self.match, match_type=self.match_type, recursive=self.recursive)]
 
 class FloatField(Field):
     empty_strings_allowed = False
Index: django/forms/__init__.py
===================================================================
--- django/forms/__init__.py	(revision 4130)
+++ django/forms/__init__.py	(working copy)
@@ -907,24 +907,36 @@
 
 class FilePathField(SelectField):
     "A SelectField whose choices are the files in a given directory."
-    def __init__(self, field_name, path, match=None, recursive=False, is_required=False, validator_list=None):
+    def __init__(self, field_name, path, match=None, match_type=None, recursive=False, is_required=False, validator_list=None):
         import os
         from django.db.models import BLANK_CHOICE_DASH
+        from django.db.models.fields import MATCH_DIRECTORIES, MATCH_FILES
         if match is not None:
             import re
             match_re = re.compile(match)
         choices = not is_required and BLANK_CHOICE_DASH[:] or []
         if recursive:
             for root, dirs, files in os.walk(path):
-                for f in files:
-                    if match is None or match_re.search(f):
-                        choices.append((os.path.join(root, f), f))
+                if MATCH_DIRECTORIES == match_type & MATCH_DIRECTORIES:
+                    for d in dirs:
+                        if match is None or match_re.search(d):
+                            choices.append((os.path.join(root, d), d))
+                if MATCH_FILES == match_type & MATCH_FILES:
+                    for f in files:
+                        if match is None or match_re.search(f):
+                            choices.append((os.path.join(root, f), f))
         else:
             try:
-                for f in os.listdir(path):
-                    full_file = os.path.join(path, f)
-                    if os.path.isfile(full_file) and (match is None or match_re.search(f)):
-                        choices.append((full_file, f))
+                if MATCH_DIRECTORIES == match_type & MATCH_DIRECTORIES:
+                    for d in os.listdir(path):
+                        full_dir = os.path.join(path, d)
+                        if os.path.isdir(full_dir) and (match is None or match_re.search(d)):
+                            choices.append((full_dir, d))
+                if MATCH_FILES == match_type & MATCH_FILES:
+                    for f in os.listdir(path):
+                        full_file = os.path.join(path, f)
+                        if os.path.isfile(full_file) and (match is None or match_re.search(f)):
+                            choices.append((full_file, f))
             except OSError:
                 pass
         SelectField.__init__(self, field_name, choices, 1, is_required, validator_list)
