Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tidy up python source code (removing spaces at end of lines, etc…).

  • Loading branch information...
commit 61d15bb7a3d3060b246cf681a984e3a19c72925a 1 parent b1353d8
@richardbarran richardbarran authored
View
2  cms_facebook/templatetags/cms_facebook_tags.py
@@ -23,4 +23,4 @@ def cms_facebook_likebutton(likebutton_name):
except LookupError:
return "LikeButton Settings not found"
instance = LikeButton(**likebutton)
- return render_to_string("cms_facebook/likebutton.html", {"instance" : instance})
+ return render_to_string("cms_facebook/likebutton.html", {"instance" : instance})
View
6 cmsplugin_facebook/cms_plugins.py
@@ -4,7 +4,7 @@
class BasePlugin(CMSPluginBase):
name = None
-
+
def render(self, context, instance, placeholder):
context.update({'instance': instance, 'name': self.name})
return context
@@ -13,7 +13,7 @@ class FacebookLikeBoxPlugin(BasePlugin):
model = models.FacebookLikeBox
name = 'Facebook Like Box Plugin'
render_template = 'cmsplugin_facebook/likebox.html'
-
+
class FacebookShareButtonPlugin(BasePlugin):
model = models.FacebookShareButton
name = 'Facebook "Share" button plugin'
@@ -23,7 +23,7 @@ class FacebookLikeButtonPlugin(BasePlugin):
model = models.FacebookLikeButton
name = 'Facebook Like Button Plugin'
render_template = 'cmsplugin_facebook/likebutton.html'
-
+
plugin_pool.register_plugin(FacebookLikeBoxPlugin)
plugin_pool.register_plugin(FacebookLikeButtonPlugin)
plugin_pool.register_plugin(FacebookShareButtonPlugin)
View
30 cmsplugin_facebook/models.py
@@ -35,11 +35,11 @@
class FacebookShareButton(CMSPlugin):
- style = models.CharField(max_length=12,choices=SHARE_BUTTON_STYLES)
- share_url = models.URLField(_("URL to share"), help_text=_("If blank, the page where it's displayed will be used"),
+ style = models.CharField(max_length=12, choices=SHARE_BUTTON_STYLES)
+ share_url = models.URLField(_("URL to share"), help_text=_("If blank, the page where it's displayed will be used"),
null=True, blank=True)
- button_text = models.CharField(_("Button text"),help_text=_("This text will be displayed in the \"Share\" button"),
- max_length=255,default=_("Share"))
+ button_text = models.CharField(_("Button text"), help_text=_("This text will be displayed in the \"Share\" button"),
+ max_length=255, default=_("Share"))
class FacebookLikeBox(CMSPlugin):
pageurl = models.URLField(_("URL to like"))
@@ -50,24 +50,24 @@ class FacebookLikeBox(CMSPlugin):
transparent = models.BooleanField(_("Transparent"), default=True)
stream = models.BooleanField(_("Show stream"), default=True)
header = models.BooleanField(_("Show header"), default=True)
-
+
fb_bits = [
'id',
'connections',
'stream',
'header',
]
-
+
fb_aliases = {
- 'id': lambda r,c,i: i.fbpage.pageid,
+ 'id': lambda r, c, i: i.fbpage.pageid,
}
-
+
fb_default_width = 295
def __unicode__(self):
return "LikeBox (%s)" % (self.pageurl)
-
-
+
+
class FacebookLikeButton(CMSPlugin):
pageurl = models.URLField(_("URL to like"))
layout = models.CharField(_("Layout Style"), choices=LAYOUT_CHOICES, default="standard", max_length=50)
@@ -79,7 +79,7 @@ class FacebookLikeButton(CMSPlugin):
verb = models.CharField(_("Verb to display"), choices=VERB_CHOICES, default='like', max_length=50)
font = models.CharField(_("Font"), choices=FONT_CHOICES, default='verdana', max_length=50)
color_scheme = models.CharField(_("Color Scheme"), choices=COLOR_CHOICES, default='light', max_length=50)
-
+
fb_bits = [
'href',
'layout',
@@ -88,12 +88,12 @@ class FacebookLikeButton(CMSPlugin):
'font',
'color_scheme',
]
-
+
fb_aliases = {
- 'href': lambda r,c,i: i.url if i.url else r.build_absolute_uri(),
+ 'href': lambda r, c, i: i.url if i.url else r.build_absolute_uri(),
}
-
+
fb_default_width = 295
def __unicode__(self):
- return "LikeButton (%s)" % (self.pageurl)
+ return "LikeButton (%s)" % (self.pageurl)
View
18 setup.py
@@ -3,21 +3,21 @@
version = __import__('cmsplugin_facebook').__version__
setup(
- name = 'cmsplugin_facebook',
- version = version,
- license= 'BSD',
- description = 'Django CMS Facebook Plugins',
- author = 'Christopher Glass',
- author_email = 'christopher.glass@divio.ch',
- url = 'http://github.com/chrisglass/cmsplugin_facebook',
- packages = find_packages(),
+ name='cmsplugin_facebook',
+ version=version,
+ license='BSD',
+ description='Django CMS Facebook Plugins',
+ author='Christopher Glass',
+ author_email='christopher.glass@divio.ch',
+ url='http://github.com/chrisglass/cmsplugin_facebook',
+ packages=find_packages(),
zip_safe=False,
package_data={
'cmsplugin_facebook': [
'templates/cmsplugin_facebook/*.html',
]
},
- classifiers = [
+ classifiers=[
'Development Status :: 4 - Beta',
'Framework :: Django',
'Intended Audience :: Developers',
Please sign in to comment.
Something went wrong with that request. Please try again.