Skip to content

Repository files navigation

##About

Build Status

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:

importosimportimpimportsocketimportsubprocessWEBAPP_ROOT=os.path.dirname(os.path.realpath(__file__))
defget_environment_file_path(env):
returnos.path.join(WEBAPP_ROOT, 'config', '%s.py'%env)
config=imp.load_source('base_settings', get_environment_file_path('base'))
frombase_settingsimport*if'APP_ENV'inos.environ:
ENV=os.environ['APP_ENV']
else:
ENV='local'try:
config=imp.load_source('env_settings', get_environment_file_path(ENV))
fromenv_settingsimport*exceptIOError:
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!

About

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

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors