Re: Date/time field styling?

2009-08-11 Thread mhulse

Hi!

> Look at the SplitDateTimeWidget in django.forms.widgets.

I am sorry to be a complete noob here, but I am not sure how I can use
SplitDateTimeWidget to break-up the two dat/time fields?

I am actually using django-schedule:



Looks like the author is already using SplitDateTimeWidget:



The docs:



Not much info there... Do I need to create my own widget for this?

All I want is to have separate control over the two input fields. :)

Again, sorry if noob question. I am new to Django and Python.

Thanks!
Micky


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Date/time field styling?

2009-08-04 Thread mhulse

For those interested, I found this link via browsing the django-html
git source:

Django Developers:
Proposal: Form rendering with filters


Looks interesting.

Unfortunately, I am still a noob, so I probably won't be able to cross
that bridge for a while. :)

Thanks again! I really appreciate the help.
Cheers,
Micky
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Date/time field styling?

2009-08-04 Thread mhulse

Thanks Alex and Malcolm! I really appreciate the help. :)

Have a great day/night.

Cheers,
Micky
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Date/time field styling?

2009-08-03 Thread Alex Gaynor

On Mon, Aug 3, 2009 at 6:18 PM, Malcolm
Tredinnick wrote:
>
> On Mon, 2009-08-03 at 11:29 -0700, mhulse wrote:
>> Hello,
>>
>> {{ form.start }}
>>
>> For example, outputs this:
>>
>> > >
>>
>> I have tried:
>>
>> {{ form.start_0 }} and {{ form.start_1 }}, but that outputs absolutely
>> nothing. :)
>>
>> Is it possible to split up the two fields so I can handle them
>> individually?
>
> Look at the SplitDateTimeWidget in django.forms.widgets.
>
>>
>> Also, is it possible to control the XHTML output? I prefer use a DTD
>> that does not allow an ending slash. :)
>
> Django outputs XHTML. You don't get to control that. If you want
> different output, you will need to write different widget classes and
> customise each render() method on the widgets (all the output is done by
> the widgets, so it's nicely encapsulated).
>
> Search around before doing that, however. I have a vague feeling that
> somebody might have started a project like this, but I haven't ever used
> it.
>
> Regards,
> Malcolm
>
>
> >
>

django-html is (presumably) the project Malcolm is referring to:
http://github.com/simonw/django-html/tree/master

Alex

-- 
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be simpler than you think, but never as simple as you
want" -- Me

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Date/time field styling?

2009-08-03 Thread Malcolm Tredinnick

On Mon, 2009-08-03 at 11:29 -0700, mhulse wrote:
> Hello,
> 
> {{ form.start }}
> 
> For example, outputs this:
> 
>  >
> 
> I have tried:
> 
> {{ form.start_0 }} and {{ form.start_1 }}, but that outputs absolutely
> nothing. :)
> 
> Is it possible to split up the two fields so I can handle them
> individually?

Look at the SplitDateTimeWidget in django.forms.widgets.

> 
> Also, is it possible to control the XHTML output? I prefer use a DTD
> that does not allow an ending slash. :)

Django outputs XHTML. You don't get to control that. If you want
different output, you will need to write different widget classes and
customise each render() method on the widgets (all the output is done by
the widgets, so it's nicely encapsulated).

Search around before doing that, however. I have a vague feeling that
somebody might have started a project like this, but I haven't ever used
it.

Regards,
Malcolm


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Date/time field styling?

2009-08-03 Thread mhulse

Hello,

{{ form.start }}

For example, outputs this:



I have tried:

{{ form.start_0 }} and {{ form.start_1 }}, but that outputs absolutely
nothing. :)

Is it possible to split up the two fields so I can handle them
individually?

Also, is it possible to control the XHTML output? I prefer use a DTD
that does not allow an ending slash. :)

Many thanks in advance. :D
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---