=======================
Model and front end library for choosing and integrating social media share widgets, similar to AddThis.
#Install
Add to your requirements.txt file:
```python
#requirements.txt
-e git+https://github.com/ninapavlich/django-social-share-settings.git@2ac1309c5f2e4a816263ee689bcc60655a0643b5#egg=django-social-share-settings-dev
```
Run install:
```
> pip install -r requirements.txt
```
#CMS Usage:
To make social settings administerable, include django_social_share_settings and rake the database:
```python
#settings.py
INSTALLED_APPS = (
...
'django_social_share_settings',
...
)
```
```
> python manage.py schemamigration django_social_share_settings --initial
> python manage.py migrate django_social_share_settings
```
To make track social shares:
```python
#urls.py
(r'^', include('django_social_share_settings.urls')),
```
#Template Usage:
To output share icons based on the settings from the cms, use the
"social_share_settings_tags" template tags. In this case I'm using
"Font Awesome" to render the icons.
```
#social-share-partial.html
{% load social_share_settings_tags %}
{% get_social_share_links as social_links %}
{% if social_links|length > 0 %}
<ul class="social sticky">
{% for link in social_links %}
{% get_social_share_link link object.get_absolute_url object.title as link_url %}
<li>
<a href="{{ link_url }}" target="_blank">
<i class="fa fa-{{link.font_awesome_class}}"></i>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
```
#Sticky Usage
For sticky behavior, include or compile in the styles and javscript.
See screencast of sticky widget in action: http://screencast.com/t/Gm8Sah4IMQ
```html
#base-template.html
<!-- Include Font Awesome for easier social icons -->
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" />
<!-- Include js plugin and css or compile into your source js -->
<link rel="stylesheet" href="{% static 'ccl/sticky.min.css' %}"/>
<script src="{% static 'js/sticky.jqueryplugin.js'%}"></script>
<script>
$(".sticky").sticky({
topSelector : "#main",
bottomSelector : "#footer",
fixedMargin : 160,
topMargin : 0,
bottomMargin : 0
});
</script>
```
*topSelector* is the selector for the item the sticky widget should top-align with.
*bottomSelector* is the selector for the item the sticky widget should not go below.
*topMargin* refers to the top margin the sticky item will have when aligned to the top selector item

*fixedMargin* refers to the top margin the sticky item will have when the screen has scrolled past the top selector item

*bottomMargin* refers to the bottom margin the sticky item will have when aligned to the bottom selector item

Metadata
Release files for django-social-share-settings 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-social-share-settings-0.2.tar.gz | 10.2 kB | Without provenance | Details for django-social-share-settings-0.2.tar.gz |
Security for django-social-share-settings 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.