Hey, can anybody figure out what's going on around here. I stumbled
on
this post since I have a similar issue, 'GeoPt' object has no
attribute 'widget'.
I followed Karen's response and it seems that I have a similar issue
since I
don't explicitly declare 'location' and 'location_geocells' in my
model, because
the get added from 'geomodel.py' . By the way, if I explicitly add
'location' and
'location_geocells' I get a DuplicateAttribute Error.

Here's some pastebin of some of the code, it trips up on the
'rform.is_valid'.
http://pastebin.com/m1cce44a5

And here's 'geomodel.py'
http://code.google.com/p/geomodel/source/browse/trunk/geo/geomodel.py

Red

On Oct 1, 7:54 am, Karen Tracey <kmtra...@gmail.com> wrote:
> On Thu, Oct 1, 2009 at 5:33 AM, dijxtra <nsko...@gmail.com> wrote:
>
> > On Sep 30, 5:12 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> > > On Wed, Sep 30, 2009 at 10:53 AM, dijxtra <nsko...@gmail.com> wrote:
>
> > > > I'm getting "'NoneType' object has no attribute 'widget'" exception
> > > > and I just can't figure out where is the problem. Here is my error:
>
> > > > Django Version: 1.1
>
> > > > Traceback:
> > > > [snip]
>
> > > In this form:
>
> > >    1. class DiaryEntryForm(ModelForm):
> > >    2.     importance = models.IntegerField(choices=IMPORTANCE_CHOICES)
> > >    3.     class Meta:
> > >    4.         model = DiaryEntry
> > >    5.         fields = ['text', 'date', 'type', 'importance']
>
> > > 'importance' has been specified as a model field instead of a form field.
> > > It needs to be a form field, since this is a form, not a model.
>
> > Damn. This one was obvious. But, despite of this bugfix, the error
> > still remains.
>
> > This one:http://pastebin.com/pastebin.php?diff=m1867a8ad
> > Gives me this:
> > Django Version: 1.1
>
> > Traceback:
> > [snip]
>
> 234.             value = field.widget.value_from_datadict(self.data,> 
> self.files, self.add_prefix(name))
>
> > Exception Value: 'NoneType' object has no attribute 'widget'
>
> OK, looking a bit further, the form lists 'type' in fields but I do not see
> that field in the model?
>
> (If you were only adding 'importance' to the form explicitly in order to try
> to fix this error, best to get rid of it.  Best to go back to the simplest
> version of your code that had problems when posting looking for solutions.
> Posting the original version modified with fixes that don't fix the problem
> just makes it more confusing.)
>
> Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to