Sounds like a great idea. I'm going to give it a try. In the meantime,
though...why can I get the script no problem using a non-django, pure
html+js page?
On Tuesday, November 20, 2012 6:58:17 PM UTC-5, Issam Outassourt wrote:
>
> {
> "error": {
> "errors": [
> {
> "domain": "usageLimits",
> "reason": "dailyLimitExceededUnreg",
> "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use
> requires signup.",
> "extendedHelp": "https://code.google.com/apis/console"
> }
> ],
> "code": 403,
> "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use
> requires signup."
> }
> }
>
>
> When I follow the link you passed through, I (give it a try) found this more
> detailed response.
> What you actually need to do is within your view that renders the page
> requirements log in to your google
>
> account, retrieve the file, and pass it to your template so it incorporates
> your response within the html
> web page.
>
> In your head section template all you need to do is something of this kind :
>
> {% for jsscript in jsscript_list %}
> <script type="text/javascript">
> {{ jsscript }}
> </script>
>
> {% endfor %}
>
> assuming that jsscript is the text jsscript that you want to add to your web
> page.
> You can use pycurl's python module to request the .js file that's needed.
>
> Hope this helped,
>
> Issam
>
>
>
> 2012/11/21 Chris Pagnutti <[email protected] <javascript:>>
>
>> Hi. I'm trying to get the Google Web Font loader via
>> <script type="text/javascript" src="
>> http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
>> in my <head> section.
>> But when I load the page I get (in Chromium's console) this message:
>> GET https://www.googleapis.com/webfonts/v1/webfonts 403 (Forbidden)
>> HOWEVER, if I call the webfonts.js script in a pure HTML/Javascript page
>> (not running behind the django development server) it works fine.
>>
>> I can request other googleapis resources without problems, e.g.
>> <script type="text/javascript" src="
>> http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
>> </script>
>> works fine.
>>
>> Any ideas about what's going wrong?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/U-KJVz1N_McJ.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/IpMHZPCDPZ8J.
To post to this group, send email to [email protected].
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.