Well i only say the e.save() line causes social mayhem as when doing a
line by line debug of that section, that's the command that causes all
the trouble.  I suspected there's a problem with my dispatch.cgi
script, as if i were to manually add the table i get the same behavior
(though adding the redirect middleware solved some issues, i'd only
had the fallback middleware showing up).  The url it directs to hits
the same function just that it triggers a if request.POST statement,
and with all my sloppy fixes in place my error_log looks like:
http://dpaste.com/50434/

Now my only concern is any significant trunk differences between my
installation and the model installation a peer has shown me (which i
don't have open access to).  With what i've seen i believe it to be
either a version discrepancy issue (as i don't know much about the
django redirect apps) or something wrong with my dispatch.cgi.  I will
double check my URLS to be sure, but do either of my suspected causes
seem probable for this type of issue?  And again, thanks for the
input, i think this has been more than once from you;)

On Jun 1, 4:39 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Mon, Jun 1, 2009 at 5:09 PM, Robocop <btha...@physics.ucsd.edu> wrote:
>
> > Hello,
> > I'm trying to deploy another developer's blog code, and have run into
> > some snags with their ModelForm for adding entries.
>
> > The segment of code that triggers the error in my views.py:
> >http://dpaste.com/50238/
>
> > The model and modelforms for both the blog, and for the entries:
> >http://dpaste.com/50237/
>
> > The Traceback:
> >http://dpaste.com/50240/
>
> > Now my templates seem to be working fine, and the form is validated
> > properly on POST.  I can get at all the attributes of the form, and
> > they all look correct.  It's only when i save the form data that i get
> > the error.  Any help would be greatly appreciated, i've been trying to
> > sort this out all day and don't seem to be making much progress.
>
> Why do you say it is the e.save() in your first dpaste that causes the
> error?  The traceback:
>
> Traceback (most recent call last):
>   File "build/bdist.linux-i686/egg/flup/server/fcgi_base.py", line 558, in
> run
>   File "build/bdist.linux-i686/egg/flup/server/fcgi_base.py", line 1116, in
> handler
>   File
> "/usr/local/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line
> 243, in __call__
>     response = middleware_method(request, response)
>   File
> "/usr/local/lib/python2.4/site-packages/django/contrib/redirects/middleware.py",
> line 11, in process_response
>     r = Redirect.objects.get(site__id__exact=settings.SITE_ID,
> old_path=path)
>   File "/usr/local/lib/python2.4/site-packages/django/db/models/manager.py",
> line 93, in get
>     return self.get_query_set().get(*args, **kwargs)
>   File "/usr/local/lib/python2.4/site-packages/django/db/models/query.py",
> line 298, in get
>     num = len(clone)
>   File "/usr/local/lib/python2.4/site-packages/django/db/models/query.py",
> line 154, in __len__
>     self._result_cache = list(self.iterator())
>   File "/usr/local/lib/python2.4/site-packages/django/db/models/query.py",
> line 269, in iterator
>     for row in self.query.results_iter():
>   File
> "/usr/local/lib/python2.4/site-packages/django/db/models/sql/query.py", line
> 206, in results_iter
>     for rows in self.execute_sql(MULTI):
>   File
> "/usr/local/lib/python2.4/site-packages/django/db/models/sql/query.py", line
> 1700, in execute_sql
>     cursor.execute(sql, params)
>   File "/usr/local/lib/python2.4/site-packages/django/db/backends/util.py",
> line 19, in execute
>     return self.cursor.execute(sql, params)
>   File
> "/usr/local/lib/python2.4/site-packages/django/db/backends/mysql/base.py",
> line 83, in execute
>     return self.cursor.execute(query, args)
>   File
> "/usr/local/lib/python2.4/site-packages/MySQL_python-1.2.2-py2.4-linux-i686.egg/MySQLdb/cursors.py",
> line 166, in execute
>   File
> "/usr/local/lib/python2.4/site-packages/MySQL_python-1.2.2-py2.4-linux-i686.egg/MySQLdb/connections.py",
> line 35, in defaulterrorhandler
> ProgrammingError: (1146, "Table 'usbroker_brokerage.django_redirect' doesn't
> exist")
>
> doesn't support that statement.  Not only is your e.save() nowhere to be
> seen in that traceback, nothing from your code appears anywhere in that
> traceback.  Also, the error message that accompanies the generic '1146
> error' shows the problem is a table that does not exist.  Specifically, a
> table named django_redirect.  Looking further back in the traceback you can
> see the code that is issuing the query causing the exception is in
> django/contrib/redirects/middleware.py.  Doc for that middleware is here:
>
> http://docs.djangoproject.com/en/dev/ref/contrib/redirects/
>
> and it states that this middleware only does something when a response code
> of 404 is being returned.
>
> I'd guess somehow your form-save code path is resulting in a 404
> (redirecting to a nonexistent url?), causing this middleware to kick in, and
> it's running into trouble because apparently you didn't run manage.py syncdb
> after adding 'django.contrib.redirects' to your INSTALLED_APPS.
>
> 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