GithubHelp home page GithubHelp logo

thoas / django-social-bookmarking Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pydanny/django-social-bookmarking

3.0 2.0 2.0 230 KB

An eggified model based BSD licensed social booking app for Django

Home Page: http://github.com/pydanny/social-bookmarking

License: MIT License

Python 100.00%

django-social-bookmarking's Introduction

Django Social Bookmarking

Table of Contents

A common use case in building applications is to provide links to social networking services. There are other Django apps that do this already, but they suffer from having the links stored statically and/or have licenses we can't use effectively in a US Federal government environment.

This solution provides the following:

  • A MIT license.
  • Target social bookmarking sites stored in a model
  • Admin tools
  • A fixture of 14 target sites
  • Icons for each of those target sites and many more
  • A test application to confirm that the basic view works
  • Eggification for easy installation and control

Installation

Install into your Python path. Tag coming soon for easy pip/easy_install.

Add 'social_bookmarking' to your INSTALLED_APPS in settings.py:

INSTALLED_APPS = (
    ...
    'social_bookmarking',
    )

If you have not yet done so, add 'django.core.context_processors.request' to the TEMPLATE_CONTEXT_PROCESSORS in your settings.py file:

TEMPLATE_CONTEXT_PROCESSORS = (
    ...
    'django.core.context_processors.request',
    )

Synch the database:

./manage.py syncdb

Load the fixtures:

./manage.py loaddata <location-of-django-social-bookmarking>/social_bookmarking/fixtures/bookmarks.json

Depending on your setup, you may need to copy the media files to your local media folder:

cp -R <location-of-django-social-bookmarking>/social_bookmarking/media/social_bookmarking <my-project>/media/

Usage

At the top of your page:

{% load social_bookmarking_tags %}

{% show_bookmarks object.title 'full-http-path-to-object' object.description %}

-- or --

{% show_bookmarks object.title object object.description %}    

Note: The object.description field is optional.


Customizations

Django Social Bookmarking is designed to be easily customizable.

Skin Customizations

The most frequent customization will be on how links are displayed. Create a directory called social_bookmarking in your project's template directory. Then copy the HTML file social_bookmarking/templates/social_bookmarking/links.html to this project directory.

CSS customizations

The following classes and IDS are attached to the skin:

div.social-bookmarking
    span.bookmark #bookmark.title|slugify

Other classes and IDs will be assigned as requested by competent CSS designers.

Todo

  • Add more social networking sites
  • Validation existing social networking sites. Sounds like a test to me!
  • Full suite of tests against each site stored in the fixture.
  • Maybe some caching stuff?

Other Django Social Bookmarking applications

Django Social Bookmarking is a very rough fork of these two applications.

django-social-bookmarking's People

Contributors

pydanny avatar thoas avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.