Skip to content

Commit

Permalink
Fixed typo in new.html
Browse files Browse the repository at this point in the history
Fixed google maps plugin loading wrong javascript files
  • Loading branch information
Jonas Obrist committed Jan 26, 2011
1 parent 4ac3e42 commit 888a46a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions cms/plugins/googlemap/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from cms.plugin_base import CMSPluginBase
from django.utils.translation import ugettext_lazy as _
from cms.plugins.googlemap.models import GoogleMap
from cms.plugins.googlemap.settings import GOOGLE_MAPS_API_KEY
from django.forms.widgets import Media

class GoogleMapPlugin(CMSPluginBase):
Expand All @@ -19,11 +18,6 @@ def render(self, context, instance, placeholder):
return context

def get_plugin_media(self, request, context, plugin):
if 'GOOGLE_MAPS_API_KEY' in context:
key = context['GOOGLE_MAPS_API_KEY']
else:
key = GOOGLE_MAPS_API_KEY
lang = getattr(request, 'LANGUAGE_CODE', settings.LANGUAGE_CODE[0:2])
return Media(js = ('http://maps.google.com/maps?file=api&v=2&key=%s&hl=%s' % (key, lang),))
return Media(js = ('http://maps.google.com/maps/api/js?sensor=true',))

plugin_pool.register_plugin(GoogleMapPlugin)
2 changes: 1 addition & 1 deletion cms/templates/cms/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<p><img src="{{ CMS_MEDIA_URL }}images/pony.jpg" alt="" />&nbsp;</p>
</div>
<div class="box-right">
<h1>Welcome django CMS!<br />Here is what to do next:</h1>
<h1>Welcome to the django CMS!<br />Here is what to do next:</h1>
<p>&nbsp;</p>
<h2>Log into the <a href="/admin/">admin</a> interface and start <a href="/admin/cms/page/add/">adding</a> some pages!</h2>
<p class="info">Make sure you publish them.</p>
Expand Down

0 comments on commit 888a46a

Please sign in to comment.