One way around this is to call the view on a different path one thats not
password protected such as the admin urls.
In order to do that, you simply add this to your urls: (r'^my_url/jsi18n',
'django.views.i18n.javascript_catalog') and when your loading the
javascript files on your templated you do this <script
src="/my_url/jsi18n/" type="text/javascript"></script>

Thank you,
Victor Rocha
rochapps.com

On Sat, Feb 2, 2013 at 12:15 AM, KVR <kvr....@gmail.com> wrote:

> Yeah, it's throwing js error. Could you please tell me how to point that,
> I am just newbie to Django.
> I've tried adding the following to urls.py
>
> (r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascript_catalog'),
>
> I did not understand what to replace with <package>
>
>
> On Saturday, February 2, 2013 10:38:29 AM UTC+5:30, Victor Rocha wrote:
>
>> I remember running into this problem quite sometime ago. What happens is
>> that in order to access the file jsi18n you need to be logged in. What
>> you need to do it's save a copy of the file and point to the file instead.
>>
>> thank you,
>> Victor rocha
>> rochapps.com
>>
>> On Fri, Feb 1, 2013 at 11:52 PM, KVR <kvr...@gmail.com> wrote:
>>
>>> forms.py
>>> class SampleWidget(forms.Form):
>>> date=forms.CharField(widget=**AdminDateWidget,max_length=**100)
>>>  users = forms.**ModelMultipleChoiceField(**queryset=User.objects.all(),
>>> **widget=FilteredSelectMultiple(**("Users"), False))
>>>
>>>
>>> mytemple.html
>>>
>>> {% block content %}
>>> <link rel="stylesheet" type="text/css" href="/static/admin/css/base.**css"
>>> />
>>> <link rel="stylesheet" type="text/css" href="/static/admin/css/forms.**css"
>>> />
>>> <!--[if lte IE 7]><link rel="stylesheet" type="text/css"
>>> href="/static/admin/css/ie.**css" /><![endif]-->
>>>
>>> <script type="text/javascript">window.**__admin_media_prefix__ =
>>> "/static/admin/";</script>
>>>
>>>
>>> <script type="text/javascript" src="/admin/jsi18n/"></script>
>>> <script type="text/javascript" src="/static/admin/js/core.js"**
>>> ></script>
>>> <script type="text/javascript" src="/static/admin/js/admin/**
>>> RelatedObjectLookups.js"></**script>
>>> <script type="text/javascript" src="/static/admin/js/jquery.**
>>> js"></script>
>>> <script type="text/javascript" src="/static/admin/js/jquery.**
>>> init.js"></script>
>>> <script type="text/javascript" src="/static/admin/js/actions.**
>>> js"></script>
>>> <script type="text/javascript" src="/static/admin/js/**
>>> SelectBox.js"></script>
>>> <script type="text/javascript" src="/static/admin/js/**
>>> SelectFilter2.js"></script>
>>> <script type="text/javascript" src="/static/admin/js/**
>>> calendar.js"></script>
>>> <script type="text/javascript" src="/static/admin/js/admin/**
>>> DateTimeShortcuts.js"></**script>
>>>
>>> <form action="." method="POST">
>>> {{ form.as_p }}
>>> {{ form.media }}
>>> {% csrf_token %}
>>> <p><input type="submit" value="Submit"></p>
>>> </form>
>>>
>>>
>>> This working fine if I log in with admin credentials , how to use this
>>> with normal user.
>>>
>>> Please help me.
>>>
>>> Regards,
>>> kvr
>>>
>>> On Thursday, January 31, 2013 9:44:11 PM UTC+5:30, Victor Rocha wrote:
>>>>
>>>> Can you post up your code?
>>>>
>>>>
>>>> On Thursday, January 31, 2013 6:29:08 AM UTC-5, KVR wrote:
>>>>>
>>>>> Hi,
>>>>> I am trying to reuse FilteredSelectMultiple widget from django admin
>>>>> widgets.
>>>>>
>>>>> I've defined my form and media classes, and included form and media
>>>>> contexts in my template also.
>>>>>
>>>>> But when I load the page, it's just showing multiselect box and below
>>>>> line:
>>>>>
>>>>> <myapp.admin.forms.media instance at 0xa8589d8c>
>>>>>
>>>>> What may be the problem and how to get the entire widget.
>>>>>
>>>>> Regards,
>>>>> kvr
>>>>>
>>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@**googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>>
>>> Visit this group at 
>>> http://groups.google.com/**group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to