{
"info": {
"author": "Caio Ariede",
"author_email": "caio.ariede@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: JavaScript",
"Programming Language :: Python",
"Topic :: Utilities"
],
"description": "Django Facebook Utils\n=====================\n\n**License:** MIT\n\nThe intent of this project is to provide some very basic utilities related to Facebook.\n\nAt the moment there are only two features:\n\n* An utility that forces the update of an URL in the Facebook's share cache.\n* A Context Processor that allows you to hide Facebook [Open Graph Protocol](http://developers.facebook.com/docs/opengraphprotocol/) <meta> tags from other User Agents.\n\n\nInstallation\n------------\n\n`pip install django-facebook-utils`\n\nor\n\n`pip install git+http://github.com/caioariede/django-facebook-utils.git#egg=facebook_utils`\n\n\nHow to force an URL to be updated from Facebook's cache\n-------------------------------------------------------\n\n1. The `ping_facebook` command:\n\n\t`python manage.py ping_facebook http://example.com`\n\t\n\tSee below **How to extend the ping_facebook command** to fit your needs.\n\n2. Calling the `ping_facebook` shortcut:\n\n\t\tfrom facebook_utils.shortcuts import ping_facebook\n\t\t\n\t\tif ping_facebook('http://example.com'):\n\t\t\tprint('success')\n\t\telse:\n\t\t\tprint('fail')\n\t\n\tThis shortcut will only return `True` or `False`. If you need more information to debug, you can call `facebook_utils.utils.ping` or use the `ping_facebook` command with `--verbosity=2` (more verbose).\n\nDetecting Facebook requests\n---------------------------\n\n1. The `facebookexternalhit` context processor (for templates):\n\n\tAdd `facebook_utils.context_processors.facebookexternalhit` to the [TEMPLATE_CONTEXT_PROCESSOR](https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATE_CONTEXT_PROCESSORS) setting in `settings.py`:\n\t\n TEMPLATE_CONTEXT_PROCESSORS = (\n # .. other stuff\n 'facebook_utils.context_processors.facebookexternalhit',\n )\n\n\tIn the template:\n\t\n\t\t{% if facebookexternalhit %}\n \t\t\n \t\t\n \t\t\n \t\t\n \t{% endif %}\n\n2. The `is_facebookexternalhit` shortcut:\n\n\t\tfrom facebook_utils.shortcuts import is_facebookexternalhit\n\t\t\n\t\tdef some_view(request):\n\t\t\tif is_facebookexternalhit(request):\n\t\t\t\treturn HttpResponse('Hello, Facebook!')\n\t\t\treturn HttpResponse('Hello visitor!')\n\nHow to extend the ping_facebook command\n---------------------------------------\n\nYou can easily extend the `ping_facebook` command to fit your needs.\n\n1. First of all, [start writing your own custom command](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/).\n2. Now extends the `ping_facebook` command:\n\n\t\tfrom facebook_utils.management.commands import BasePingCommand\n\t\t\n3. Finally, extend it to fit your needs:\n\n class Command(BasePingCommand):\n help = 'Ping some pages stored in database'\n\n def handle(self, **options):\n verbosity = options.get('verbosity')\n traceback = options.get('traceback')\n \n for page in Page.objects.all():\n page_url = page.get_absolute_url()\n self.do_ping(page_url, verbosity, traceback)",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/caioariede/django-facebook-utils/",
"keywords": null,
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "django-facebook-utils",
"package_url": "https://pypi.org/project/django-facebook-utils/",
"platform": "any",
"project_url": "https://pypi.org/project/django-facebook-utils/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://github.com/caioariede/django-facebook-utils/"
},
"release_url": "https://pypi.org/project/django-facebook-utils/1.0.4/",
"requires_dist": null,
"requires_python": null,
"summary": "Some Facebook utilities to use in Django projects",
"version": "1.0.4"
},
"last_serial": 789610,
"releases": {
"1.0.1": [],
"1.0.2": [
{
"comment_text": "built for Darwin-12.2.0",
"digests": {
"md5": "c258e5559c719b8d221d2eb71f1dd6fa",
"sha256": "fdc3ec2ed2c349d793c4de9b528051866e9ed322e8544af798a18024b8531afe"
},
"downloads": -1,
"filename": "django-facebook-utils-1.0.2.macosx-10.8-intel.tar.gz",
"has_sig": false,
"md5_digest": "c258e5559c719b8d221d2eb71f1dd6fa",
"packagetype": "bdist_dumb",
"python_version": "any",
"requires_python": null,
"size": 4592,
"upload_time": "2013-01-31T13:28:02",
"url": "https://files.pythonhosted.org/packages/24/4e/6538795078f5e3f34909daa5d7971bae256323cf2191a03c0c14fa6c0327/django-facebook-utils-1.0.2.macosx-10.8-intel.tar.gz"
},
{
"comment_text": "",
"digests": {
"md5": "12e3b0a2e2f098ea89f6440a0d127440",
"sha256": "8a7b134bc752e5bde6a51eff8544a2d543d1f00cca0689253136e8e2d58f6699"
},
"downloads": -1,
"filename": "django-facebook-utils-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "12e3b0a2e2f098ea89f6440a0d127440",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3115,
"upload_time": "2013-01-31T13:28:00",
"url": "https://files.pythonhosted.org/packages/21/a6/ed4bdc203828e596a20d3171f7e46e59e40430277e536f4aeda5613c6671/django-facebook-utils-1.0.2.tar.gz"
}
],
"1.0.3": [
{
"comment_text": "",
"digests": {
"md5": "77782a80970317394086a8d0a3ecfa3d",
"sha256": "a4ad690a0990a1beae5f58c3b797720372447b87b8daf71ffb9c6a104d457c5c"
},
"downloads": -1,
"filename": "django-facebook-utils-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "77782a80970317394086a8d0a3ecfa3d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3114,
"upload_time": "2013-01-31T13:31:33",
"url": "https://files.pythonhosted.org/packages/98/0c/cfe73f8e4eedc6dca026d449c6b8c63146202ec346cef98281a014c29273/django-facebook-utils-1.0.3.tar.gz"
}
],
"1.0.4": [
{
"comment_text": "",
"digests": {
"md5": "6b1419f9eceab94002fef6e43b0a9d89",
"sha256": "748f2e39354d8935b61d519b67445e2b139fe5568f7c356c3bb7232e751b8c9a"
},
"downloads": -1,
"filename": "django-facebook-utils-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "6b1419f9eceab94002fef6e43b0a9d89",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3540,
"upload_time": "2013-01-31T13:37:10",
"url": "https://files.pythonhosted.org/packages/0b/bb/fbae56125b32ae046b6a7aee36dbae609b9b1b6313f34dfa910eb6748aac/django-facebook-utils-1.0.4.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "6b1419f9eceab94002fef6e43b0a9d89",
"sha256": "748f2e39354d8935b61d519b67445e2b139fe5568f7c356c3bb7232e751b8c9a"
},
"downloads": -1,
"filename": "django-facebook-utils-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "6b1419f9eceab94002fef6e43b0a9d89",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3540,
"upload_time": "2013-01-31T13:37:10",
"url": "https://files.pythonhosted.org/packages/0b/bb/fbae56125b32ae046b6a7aee36dbae609b9b1b6313f34dfa910eb6748aac/django-facebook-utils-1.0.4.tar.gz"
}
]
}