Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed deprecated djangoforms from app engine helper

  • Loading branch information...
commit e9371f7f466502e7d72a79bf0906a319adfd1c34 1 parent 156cee4
@kumar303 kumar303 authored
View
21 appengine_django/__init__.py
@@ -612,22 +612,5 @@ def InstallAuthentication(settings):
def InstallModelForm():
"""Replace Django ModelForm with the AppEngine ModelForm."""
- # This MUST happen as early as possible, but after any auth model patching.
- from google.appengine.ext.db import djangoforms as aeforms
- try:
- # pre 1.0
- from django import newforms as forms
- except ImportError:
- from django import forms
-
- forms.ModelForm = aeforms.ModelForm
-
- # Extend ModelForm with support for EmailProperty
- # TODO: This should be submitted to the main App Engine SDK.
- from google.appengine.ext.db import EmailProperty
- def get_form_field(self, **kwargs):
- """Return a Django form field appropriate for an email property."""
- defaults = {'form_class': forms.EmailField}
- defaults.update(kwargs)
- return super(EmailProperty, self).get_form_field(**defaults)
- EmailProperty.get_form_field = get_form_field
+ # djangoforms is not supported anymore, removing this.
+ pass
View
5 appengine_django/tests/model_test.py
@@ -23,7 +23,6 @@
from django.db.models import get_models
from django import forms
-from google.appengine.ext.db import djangoforms
from google.appengine.ext import db
from appengine_django.models import BaseModel
@@ -104,7 +103,3 @@ def testDjangoModelPK(self):
self.assert_(pk)
new_obj = RegistrationTestModel.get(pk)
self.assertEqual(obj.key(), new_obj.key())
-
- def testModelFormPatched(self):
- """Tests that the Django ModelForm is being successfully patched."""
- self.assertEqual(djangoforms.ModelForm, forms.ModelForm)
Please sign in to comment.
Something went wrong with that request. Please try again.