2008/4/24 Phil Davis <[EMAIL PROTECTED]>:
> 2008/4/24 Raisins <[EMAIL PROTECTED]>:
>
[...]
> {% for x in form %}
> {{x.item.some_x_attr}}
> {{x}}
> {% endfor %}
>
I forgot that within the template there is a BoundField wrapper around
each real form fie
2008/4/24 Raisins <[EMAIL PROTECTED]>:
>
> I have moved along some more. Now Using this snippet (
> http://www.djangosnippets.org/snippets/148/ )
>
> z = FOO.objects.get(id=pram_id)
> y = z.BAR.filter(off = False)
> #.
> form_dict = {}
> for x in y:
> form_dict[x.id] = forms.Boo
super(EventForm, , self).__init__(*args, **kwargs)
self.fields['endDate'].widget = DateTimeWidget()
class Meta:
model = Event
--
Phil Davis
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
s['object_category'].widget =
> forms.RadioSelect(choices=[(c.id, c) for c in
> self.fields['object_category'].queryset])
There is an empty_label kwarg you can set to None to supress the "-"
option so I guess something like:
self.fields['object_ca
k a shell prompt
so the other commands will actually be run.
Running postgres by hand like this is fairly unusual. Normally it would
be started/stopped by the main init scripts which is a far more reliable
way.
--
Phil Davis
--~--~-~--~~~---~--~~
You received this m
ld' is actually a boundfield instance which
wraps the real field. To get to the real field use 'field.field' in
the template. I.e. your template would look like:
{% for field in form %}
{% if field.field.is_song %}
...
--
Phil Davis
--~--~-~--~~
On 01/04/2008, timc3 <[EMAIL PROTECTED]> wrote:
> I thought that I could add in some additional information to a form
> before it gets saved as a new object in the database but the following
> isn't working:
>
> def groupadd(request):
>
> if request.method == 'POST':
> form = Group
On 24/02/2008, richard <[EMAIL PROTECTED]> wrote:
>
> I'd like to migrate a biggish mission critical 0.96 django powered
> site to a recent development version so my ongoing work harnesses
> newer goodies, in particular newer new forms. To do this I need to
> assess how much of my code will br
ns this very case.
The answer is use {{form.FIELDNAME.label_tag}} in your template.
Cheers,
--
Phil Davis
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
from which
CSS style line and even change it in the browser to test out what
effect any change would have.
http://www.getfirebug.com/
Cheers,
--
Phil Davis
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
at the admin app uses
(django/contrib/admin/media/css/forms.css) so one way to fix your
problem would be to edit that file or include your own style sheet
after the forms.css which overrode the label element's width.
Cheers,
--
Phil Davis
--~--~-~--~~~---~--
On 26/07/07, Matt <[EMAIL PROTECTED]> wrote:
> Can you confirm that the CRUD generic views are compatible with
> newforms? I haven't seen any examples of how to do it, but I'm having
> a hard time believing that this core functionality hasn't been
> implemented (or even patched) for newforms yet.
On 10/06/07, MartinWinkler <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have implemented a captcha solution for django (because the already
> available approaches did not fit my needs), and came to this problem:
>
> An image is created for every captcha-enabled form that is being
> displayed. Wen
On 30/04/07, Mario Graziosi <[EMAIL PROTECTED]> wrote:
>
> I have a form with several checkboxes created dynamically, where each
> field has a name similar to "mycheck_xxx". From within the template I
> don't know how many checks the form holds, since these are built
> dynamically. How can I rende
On 30/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
[...]
> Same problem:
> AttributeError at /telecom/conference/detail/9/
> 'tuple' object has no attribute 'strftime'
>
> This happens on update of newform. What am I doing wrong?
>
> view code:
> -
[...]
> conf.co
On 16/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
[...]
> After they are displayed...they can be nuked...but the guy working on
> this piece told me he couldn't get the temp table to stick around long
> enough with the django connection to be able to get the results back
> because I believ
On 1/27/07, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote:
> Does anyone worked on some way to django models work with composite
> primary keys? I need to implement a login system and the login should
> be unique for an specified username and a specified site url. I see the
> ticket above and it
i/ExprTag
I think you would need to pass last_seen in via extra_context and do:
{% expr object.topic_modification_date > last_seen as newflag %}
{% if newflag %}
NEW!
{% endif %}
Cheers,
--
Phil Davis
--~--~-~--~~~---~--~~
You received this message because you
{{post.post_set.all.-5.post_text}} directly in the
template (untested)?
--
Phil Davis
--~--~-~--~~~---~--~~
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@googlegro
'value':f.__getattribute__(f._meta.fields[0].attname)
> }
> )
Try:
app_fields = []
for f in app._meta.fields:
app_fields.append(
{
'label' : f.verbose_name,
'value': getattr(app, f.name),
}
Works for me on Boolean field
On 11/9/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
> On 11/9/06, Phil Davis <[EMAIL PROTECTED]> wrote:
[...]
> > I have just tried a 'by-the-docs' generic view with simple 2 model
> > master/detail update form and get exactly the same problem
list of
> participants doubles!
Did you ever find out the answer to this problem?
I have just tried a 'by-the-docs' generic view with simple 2 model
master/detail update form and get exactly the same problem or
duplicated detail rows after each save.
--
Phil Davis
--~--~-~--~
22 matches
Mail list logo