Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
EntryAdmin.form does not inherit from BaseModelForm.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chris Fox  
View profile  
 More options Sep 29 2012, 9:19 pm
From: Chris Fox <chris.fox...@gmail.com>
Date: Sat, 29 Sep 2012 18:19:54 -0700 (PDT)
Local: Sat, Sep 29 2012 9:19 pm
Subject: EntryAdmin.form does not inherit from BaseModelForm.

Hello,

I'm having a strange issue where I get the following exception on my
production server, but have no issues on my dev machine:

Django Version:1.3.1Exception Type:ImproperlyConfiguredException Value:

EntryAdmin.form does not inherit from BaseModelForm.

Exception Location:/home/cjfox/webapps/django_1_3_1/starship/django/contrib/admin/val idation.py
in validate_base, line 292Python Executable:/usr/local/bin/pythonPython
Version:2.7.3

I have narrowed the problem down to this area of the code:

class EntryAdminForm(forms.ModelForm):
class Meta:
model = Entry

latitude = CoordinateField()
longitude = CoordinateField()

class EntryAdmin(admin.ModelAdmin):
form = EntryAdminForm      ## COMMENT OUT THIS LINE MAKES THE PRODUCTION
SERVER WORK ##
list_display = ('title', 'location', 'pub_date', 'type', 'blogger')
list_filter = ('blogger', 'pub_date', 'type')

I have hit a wall with this one and could use some inspiration.
As mentioned above commenting out form = EntryAdminForm in EntryAdmin makes
everything work fine

Below is more details on the error:
Environment:

Request Method: GET
Request URL: http://URL/admin/sail_blog/entry/120/

Django Version: 1.3.1
Python Version: 2.7.3
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'sail_blog',
 'blog_redirect']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File
"/home/cjfox/webapps/django_1_3_1/starship/django/core/handlers/base.py" in
get_response
  101.                             request.path_info)
File
"/home/cjfox/webapps/django_1_3_1/starship/django/core/urlresolvers.py" in
resolve
  250.             for pattern in self.url_patterns:
File
"/home/cjfox/webapps/django_1_3_1/starship/django/core/urlresolvers.py" in
_get_url_patterns
  279.         patterns = getattr(self.urlconf_module, "urlpatterns",
self.urlconf_module)
File
"/home/cjfox/webapps/django_1_3_1/starship/django/core/urlresolvers.py" in
_get_urlconf_module
  274.             self._urlconf_module = import_module(self.urlconf_name)
File "/home/cjfox/webapps/django_1_3_1/starship/django/utils/importlib.py"
in import_module
  35.     __import__(name)
File "/home/cjfox/webapps/django_1_3_1/starship/urls.py" in <module>
  5. admin.autodiscover()
File
"/home/cjfox/webapps/django_1_3_1/starship/django/contrib/admin/__init__.py "
in autodiscover
  26.             import_module('%s.admin' % app)
File "/home/cjfox/webapps/django_1_3_1/starship/django/utils/importlib.py"
in import_module
  35.     __import__(name)
File "/home/cjfox/webapps/django_1_3_1/starship/sail_blog/admin.py" in
<module>
  45. admin.site.register(Entry, EntryAdmin)
File
"/home/cjfox/webapps/django_1_3_1/starship/django/contrib/admin/sites.py"
in register
  97.             validate(admin_class, model)
File
"/home/cjfox/webapps/django_1_3_1/starship/django/contrib/admin/validation. py"
in validate
  24.     validate_base(cls, model)
File
"/home/cjfox/webapps/django_1_3_1/starship/django/contrib/admin/validation. py"
in validate_base
  292.                 "BaseModelForm." % cls.__name__)

Exception Type: ImproperlyConfigured at /admin/sail_blog/entry/120/
Exception Value: EntryAdmin.form does not inherit from BaseModelForm.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Fox  
View profile  
 More options Oct 3 2012, 5:25 pm
From: Chris Fox <chris.fox...@gmail.com>
Date: Wed, 3 Oct 2012 14:25:43 -0700 (PDT)
Local: Wed, Oct 3 2012 5:25 pm
Subject: Re: EntryAdmin.form does not inherit from BaseModelForm.

I have since upgraded to version 1.4.1 which has resolved this issue.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »