remove the quotes around mysite.books.views.search in:
(r'^search/$', 'mysite.books.views.search')
On Jan 16, 2:58 pm, Mikey3D <[EMAIL PROTECTED]> wrote:
> I have an error:
>
> Exception Type: ImproperlyConfigured at /search/
> Exception Value: Error while importing URLconf 'mysite.urls': 'tuple
t;> f = CartForm({'a':'1', 'b':'2'})
> >>> f.is_bound
> True
> >>> f.is_valid()
> False
> >>> k = CartForm({'a':1, 'b':2})
> >>> k.is_bound
> True
> >>> k.is_valid()
x27;cart_item_' + str(key)].bf._data =
> int(a[key])
> return
>
> However, I still have some problems.
> 1- I don't understand how the form validates:
>
> >>> f = CartForm({'a':'1', 'b':'2'})
> >&g
In your example,
self.fields[str(key)]=forms.CharField(initial=c[key])
isn't doing what you expect.
You are setting the initial attribute of a field, not creating
a BoundField. See django/newforms/forms.py, and look at the
comments for BaseForm and Form and the code for
BoundField.
On Oct 6,
wrote:
> On Jul 19, 12:24 pm, FrankW <[EMAIL PROTECTED]> wrote:
>
> > A couple of things to check - what are the permissions on
> > dispatch.fcgi?
> > It needs to be executable, e.g. -rwxr-xr-x
>
> Permissions are correct.
>
> > Also, make sure it does not h
A couple of things to check - what are the permissions on
dispatch.fcgi?
It needs to be executable, e.g. -rwxr-xr-x
Also, make sure it does not have DOS mode CR-LF
And, do you have debug set in your settings.py?
On Jul 19, 2:04 pm, walterbyrd <[EMAIL PROTECTED]> wrote:
> As I said, I tried to
Oops - I didn't read far enough in the DB API!
Q objects do exactly this!
--~--~-~--~~~---~--~~
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
I'm trying to define a bunch of queries that take advantage of
__icontains and other filter parameters. Its easy to do this
statically -
res = Foo.objects.filter(title__icontains=something,
desc__icontains=something_else)
But I have many queries and want to create something like this:
quer
Thanks for the comments, Tim. The way that I use Forms is by
form_for_model, so I think its important to have Forms near Models.
Templates are very different - not python modules, not imported, so I
made them a different color. I made Settings and URLs orange, since
they are mostly declarative
I'm teaching my son Django and came up with a diagram
for him - you know what they say - a picture is worth a
thousand words.
The diagram is at http://zdecisions.com/zdmedia/img/django.jpg
Any comments or suggestions for making it better?
--~--~-~--~~~---~--~~
Y
10 matches
Mail list logo