Skip to content

Twitter plugin to work with Django CMS, designed to work with latest API of twitter.

Notifications You must be signed in to change notification settings

django-cms-plugins/cmsplugin-twitter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##About

Downloads

Twitter recently dropped support for v1.0 of its REST API. Since this was used in DjangoCMS, all of the installations which used this plugin broke. Hence, this is an attempt to create a similar plugin using widgets.

##Installation

  • In order to install this plugin, fire up your virtualenv:

     	pip install cmsplugin-twitter
  • And add the this line in INSTALLED_APPS in your base.py

INSTALLED_APPS = (
    'south',
    'project.apps.movies',
    'project.apps.books',
    'project.apps.blog',
    'project.apps.linkedin',

    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    'cms',
    'cms.plugins.text',
    'cms.plugins.picture',
    'cms.plugins.link',
    'cms.plugins.file',
    'cms.plugins.snippet',
    'cms.plugins.googlemap',
    'sekizai',
    'cmsplugin_twitter',
    'menus',
    'mptt',
    'publisher',
    'storages',
    'boto',
    'tinymce', 
)

considering you have settings.py similar to this:

import os
import imp
import socket
import subprocess


WEBAPP_ROOT = os.path.dirname(os.path.realpath(__file__))

def get_environment_file_path(env):
    return os.path.join(WEBAPP_ROOT, 'config', '%s.py' % env)

config = imp.load_source('base_settings', get_environment_file_path('base'))
from base_settings import *


if 'APP_ENV' in os.environ:
    ENV = os.environ['APP_ENV']
else:
    ENV = 'local'

try:
    config = imp.load_source('env_settings', get_environment_file_path(ENV))
    from env_settings import *
except IOError:
    exit("No configuration file found for env '%s'" % ENV)
  • After saving them , run:

     	python manage.py syncdb
     	python manage.py migrate

##How to Use:

  • Login to your twitter account and go to this url: https://twitter.com/settings/widgets

  • Create a new widgets and then copy the twitter handle and widget_id from the generated script.

  • Enter those two fields in the plugin form and other fields and you are good to go.

##Plugin in Action

This is the plugin working on a Django-CMS site:

Twitter Plugin

Enjoy!

Bitdeli Badge

About

Twitter plugin to work with Django CMS, designed to work with latest API of twitter.

Resources

Stars

Watchers

Forks

Packages

No packages published