Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Edit and display links to your online social network profiles.
Python
branch: master

This branch is 6 commits ahead of leah:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
elsewhere
.gitignore
README.markdown
setup.py

README.markdown

Friendly fork to update to Django 1.4.


django-elsewhere - Social Network Links for Django

Formerly Django-PSN (Portable Social Networks) and originally created for Pownce.

Authors:

Install:

  1. You can get the source directly from GitHub either by downloading the project or checking out the repository: 'git clone git://github.com/leah/django-elsewhere.git'

  2. After checking the project out, add the 'elsewhere' directory to your Python path.

  3. Once the project is on your python path, add 'elsewhere' to your INSTALLED_APPS in settings.py.

  4. run python manage.py syncdb from within your project to add the elsewhere database tables and initial data.

About:

Django-elsewhere allows users of a website to provide and display information about their other online social networks. The project was created to let Pownce users show their friends what other online social networks they participate in. The hyperlinks to other profiles make use of the XFN rel="me" standard http://www.gmpg.org/xfn/, which enables auto-discovery of social network profiles which the user has chosen to consolidate into a single identity.

Dependencies:

  • Django 1.0
  • Django Contrib Auth, place 'django.contrib.auth' in INSTALLED_APPS setting

To use the sample views:

Add the following to your urlconf:

(r'^elsewhere/', include('elsewhere.urls'))

For sample templates add the path to elsewhere/templates to your TEMPLATE_DIRS setting.

To use the icons:

Each profile object has an icon property that will render the icon while in DEBUG mode. Just use:

{{ profile.icon }}

To enable the icons in production, you'll need to point your webserver to the icon directory. The default path to an icon is like: /elsewhere/img/vox.png

About the models:

For Django-elsewhere, the online profiles have been divided into three categories:

  • Social Networks (online social site profiles)
  • Instant Messengers (screennames)
  • Websites (can be used for other types of online profiles such as weblogs or OpenID providers)

You can create and edit these either in the Django admin or using Django forms.

Using a different list of profiles:

You can define your own list of available social networks and instant messengers by adding SOCIAL_NETWORKS and/or INSTANT_MESSENGERS lists to your settings:

SOCIAL_NETWORKS = [
    {
        'id': 'facebook',
        'name': 'Facebook',
        'url': 'http://www.facebook.com/profile.php?id=%s',
        'identifier': 'User ID',
        'icon': 'facebook.png',
    },
    {
        'id': 'myspace',
        'name': 'MySpace',
        'url': 'http://www.myspace.com/%s',
        'identifier': 'Username',
        'icon': 'myspace.png',
    },
]

INSTANT_MESSENGERS = [
    {
        'id': 'aim',
        'name': 'AIM',
        'url': 'aim:goim?screenname=%s',
        'icon': 'aim.png',
    },
    {
        'id': 'yahoo',
        'name': 'Y!',
        'url': 'ymsgr:sendim?%s',
        'icon': 'yahoo.png',
    },
]

If no SOCIAL_NETWORKS or INSTANT_MESSENGERS are defined in your project settings, django-elsewhere will default to using the lists in fatty_lists.py.

Other resources:

Something went wrong with that request. Please try again.