On Dec 1, 5:44 pm, ChrisK <[EMAIL PROTECTED]> wrote:
> > I often have this need so I created a custom widget where I just set
> > the readonly attribute on a TextInput widget:
>
> > class LabelWidget(forms.TextInput):
>
> Thanks but ... it seems that fo
> I often have this need so I created a custom widget where I just set
> the readonly attribute on a TextInput widget:
>
> class LabelWidget(forms.TextInput):
Thanks but ... it seems that form.as_p doesn't understand how to
display this!
--~--~-~--~~~---~--~~
You
> I think you really need to explain what the real problem is that you're
> trying to solve, because you're asking a question that is too specific.
Fair enough. It's been several days, so I had to dredge a bit to
remember :-)
I think the basic issue is that there are some fields in the object
t
Sorry, I cut down my example poorly.
template has
{{form.teaser.field.initial}}
{{form.auth_id}} {{form.fence_id}}
Reminder String:
invocation looks like
print m.teaser
form = editFenceForm(initial={
'auth_id' : auth_id, 'fence_id': fence_id,
I'm doing a custom template (probably stupid), and using initial
values. Here's a precis:
template has
{{form.url.field.initial}}
{{form.auth_id}} {{form.media_id}} {{form.fence_id}}
Reminder String:
form type looks like
class editFenceForm(forms.Form):
teaser = forms.CharField(max_l
> form = newFenceForm(initial={'auth_id' : auth_id})
Awesome. That was exactly what I needed - thanks very much.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
OK, thanks for your suggestions (and yes, I meant "POST").
The problem now appears to be how I initialize the form's value of
auth_id! If I use just
{{form.as_p}}
in my template, I get the following html:
(Hidden field auth_id) This field is
required.
This field is required.
Teaser:
This fiel
> Well..you aren't passing auth_id to the template, you are passing
> form. auth_id is a field inside your template. Can you post your
> template?
Oh, sorry - my oversight. Template is
Reminder String:
URL of document:
Address of interest:
Range (in meters):
I guess I'm
I'm just not getting this. I've looked at many examples and can't seem
to pass a hidden value into a form.
The problem is that I initially get to the form with GET, and then
instantiate the form with PUT. The key that I need is part of the
original URL, and I'm trying to push it down into the PUT
Well, this is interesting.
The problem seems to be that GPolygon calls
self.latlng_from_coords(poly.shell.coords)
to unpack the coordinates. I handed in 2D points for the shell
coordinates, but somewhere along the line, a third coordinate of
"almost zero" in floating point was added to every po
I'm struggling to get django.contrib.gis.maps.google.gmap to do
something interesting. I have looked at the embedded examples, and as
far as they go, they're great. I would really like to display a
polygon using GPolygon, and for the life of me can't figure out the
right syntax to get the first ar
{{ post.assoc_cats.all|join:", " }}
does the right thing. Thank you.
BTW: The RemovingTheMagic Document says change __repr__ to __str__
so i've done it. IMO it's a bit confusing.
--~--~-~--~~~---~--~~
You received this message because you are subscribe
Hi *
I'm on trunk and using 'CookBookCategoryDataModelPostMagic'.
In my models file i have this:
class Post(models.Model):
...
assoc_cats = models.ManyToManyField(Category)
...
In my template {% for post in latest %}... works fine, but if i try to
use the Many-to-many related lookup {{ post
13 matches
Mail list logo