Re: Re: Using admin js in template code

2006-11-08 Thread John Hwang

I figured it out...

the template needs:



the jsi18n file has the gettext() function

Hope that works for you too.

/JohnH

On 11/8/06, John Hwang <[EMAIL PROTECTED]> wrote:
> I'm trying the exact same thing but the widgets do not seem to
> display.  I'd like to display the date/time pickers but the event
> doesn't seem to be triggered.
>
> I'm also getting errors in firebug about gettext() function.
>
> Any help/suggestion would be great.
>
> Thanks,
>
> /John
>
> On 11/1/06, Guillermo Fernandez Castellanos
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I've a model with a DateTimeField in it, and I'm creating a form to add 
> > objects.
> >
> > So, I create the form for the DateTimeField. Up to here, everything
> > ok, it works.
> >
> > Now I would like to add the js helpers we can find when we use the
> > admin to create an object (the little calendar and watch with 'Today'
> > and 'Now' besides).
> >
> > I add in the header the following:
> > 
> > 
> >  > src="/admin_media/js/core.js"> > src="/admin_media/js/admin/RelatedObjectLookups.js"> > type="text/javascript"
> > src="/admin_media/js/calendar.js"> > type="text/javascript"
> > src="/admin_media/js/admin/DateTimeShortcuts.js">
> > but it does not seem to work.
> >
> > I've surrounded the DateTimeField form with:
> > 
> > 
> > 
> > 
> > but it does not seem to work neither.
> >
> > Someone has an idea about how I could make it work?
> >
> > Thanks a lot,
> >
> > G
> >
> > > >
> >
>
>
> --
> John Hwang
>


-- 
John Hwang

--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Using admin js in template code

2006-11-08 Thread John Hwang

I'm trying the exact same thing but the widgets do not seem to
display.  I'd like to display the date/time pickers but the event
doesn't seem to be triggered.

I'm also getting errors in firebug about gettext() function.

Any help/suggestion would be great.

Thanks,

/John

On 11/1/06, Guillermo Fernandez Castellanos
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I've a model with a DateTimeField in it, and I'm creating a form to add 
> objects.
>
> So, I create the form for the DateTimeField. Up to here, everything
> ok, it works.
>
> Now I would like to add the js helpers we can find when we use the
> admin to create an object (the little calendar and watch with 'Today'
> and 'Now' besides).
>
> I add in the header the following:
> 
> 
>  src="/admin_media/js/core.js"> src="/admin_media/js/admin/RelatedObjectLookups.js"> type="text/javascript"
> src="/admin_media/js/calendar.js"> type="text/javascript"
> src="/admin_media/js/admin/DateTimeShortcuts.js">
> but it does not seem to work.
>
> I've surrounded the DateTimeField form with:
> 
> 
> 
> 
> but it does not seem to work neither.
>
> Someone has an idea about how I could make it work?
>
> Thanks a lot,
>
> G
>
> >
>


-- 
John Hwang

--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Using admin js in template code

2006-11-01 Thread Guillermo Fernandez Castellanos

Hi,

I've a model with a DateTimeField in it, and I'm creating a form to add objects.

So, I create the form for the DateTimeField. Up to here, everything
ok, it works.

Now I would like to add the js helpers we can find when we use the
admin to create an object (the little calendar and watch with 'Today'
and 'Now' besides).

I add in the header the following:



but it does not seem to work.

I've surrounded the DateTimeField form with:




but it does not seem to work neither.

Someone has an idea about how I could make it work?

Thanks a lot,

G

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---