{ "info": { "author": "Ken Cochrane", "author_email": "KenCochrane@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "===============\ndjango-intercom\n===============\n\ndjango-intercom makes it easy to use http://intercom.io in your django application. You just need to do the following.\n\nSupported Python versions: 2.7 and 3.3+\n\nReleases\n========\n- 0.1.3 : 07-09-2019\n - Fixed anonymous error where it wasn't getting set correctly [@humitos]\n - bump django to 2.0.13\n - changed default_user so it wasn't global [@humitos]\n- 0.1.2 : 10-19-2018\n - #35 fix(error): TypeError: 'bool' object is not callable [@AnArchkoleptik]\n - bump django dev requirement to 2.0.9\n- 0.1.1 : 07-21-2018\n - Fix intercom_tag when user is not authenticated\n- 0.1.0 : 06-30-2018\n - rename package to avoid conflict with python-intercom_tag\n - refactor custom_data and company_data parts\n - refactor is_authenticated\n - fix PEP8 issues\n - add ability to use intercom with anonymous users\n- 0.0.13 : 2-16-2016\n - fixed setup.py problems with python 3\n- 0.0.12 : 2-1-2016\n - added python3 support\n\nDocumentation\n=============\nDocumentation is also available online at http://django-intercom.readthedocs.org\n\nInstallation\n============\n1. Install django-intercom using easy_setup or pip::\n\n pip install django-intercom\n\n\n2. Add intercom to your ``INSTALLED_APPS`` in your django settings file::\n\n INSTALLED_APPS = (\n # all\n # other\n # apps\n 'django_intercom',\n )\n\n3. Add ``INTERCOM_APPID`` setting to your django settings file with your intercom application Id.\n\n in settings.py::\n\n INTERCOM_APPID = \"your appID\"\n\n4. Add the template tag code into your base template before the body tag.\n\n At the top of the page put this::\n\n {% load intercom %}\n\n At the bottom of the page before the tag put this::\n\n {% intercom_tag %}\n\n\nEnable Secure Mode (Optional)\n=============================\nThis is optional, if it isn't set, then you will not use secure mode.\n\nIf you want to turn on secure mode, you can add INTERCOM_SECURE_KEY to your settings.py with the private key you can get from your intercom->app->security page.\n\nin settings.py::\n\n INTERCOM_SECURE_KEY = \"your security_code\"\n\nYou will need to look in the code samples to find the security key.\n\nYou will also need to make sure you check the \"Enable secure mode\" check box on the security page before this will work correctly.\n\nDisable Tag (Optional)\n======================\nThis is optional, if it isn't set to True, then the tag will be active.\n\nIf you want to disable the tag, you can add INTERCOM_DISABLED to your settings.py.\n\nin settings.py::\n\n INTERCOM_DISABLED = True\n\nThis is useful when you do not want to send user information to intercom.io on every request in some enviroment for a period of time, e.g. in a development enviroment.\n\nThis provides a quick way to disable the tag without having to remove/comment out the tag in templates or the INTERCOM_APPID in settings.py (the latter would disable the sending of information but result in a setup warning in the log).\n\nIntercom Inbox\n==============\nIntercom has the ability to add an inbox link to your app so that people can contact you, and for you to let them know when they have a message waiting. If you would like to use these features you need to do the following.\n\n1. Add the intercom css id to any inline element containing text, for example::\n\n Support\n\n2. Add the appropriate CSS to your style sheet.\n\nNo Icon::\n\n #Intercom {\n display: inline-block;\n text-decoration: underline;\n padding: 0;\n }\n\nWhite Envelope (white text on black background)::\n\n #Intercom {\n display: inline-block;\n text-decoration: underline;\n padding: 0 0 0 24px;\n background: transparent url(https://www.intercom.io/images/white_env.png) no-repeat left center;\n }\n\nBlack Envelope (black text on white/grey background)::\n\n #Intercom {\n display: inline-block;\n text-decoration: underline;\n padding: 0 0 0 24px;\n background: transparent url(https://www.intercom.io/images/black_env.png) no-repeat left center;\n }\n\nIf you want to show the unread message count then also add the following::\n\n #Intercom em {\n display: inline-block;\n font-style: normal;\n text-decoration: underline;\n }\n\n3. Configure your settings. Add the following to your django settings if you would like to change the defaults.\n\nINTERCOM_ENABLE_INBOX\n---------------------\nDefault: True\n\nIn settings.py::\n\n INTERCOM_ENABLE_INBOX = True\n\n\nINTERCOM_ENABLE_INBOX_COUNTER\n-----------------------------\nDefault: True\n\nIn settings.py::\n\n INTERCOM_ENABLE_INBOX_COUNTER = True\n\n\nINTERCOM_INBOX_CSS_SELECTOR\n---------------------------\nDefault: '#Intercom'\n\nIn settings.py::\n\n INTERCOM_INBOX_CSS_SELECTOR = '#Intercom'\n\n\nUser Data\n=========\nBy default, django-intercom will send the following user information to intercom.io:\n\n1. user_id (sourced from request.user.id)\n2. email (sourced from request.user.email)\n3. name (sourced from request.user.username or, and as a fallback, request.user.get_username())\n4. created_at (sourced from request.user.date_joined)\n5. user_hash (calculated using INTERCOM_SECURE_KEY and user_id, if INTERCOM_SECURE_KEY is set)\n\nYou can override any or all of fields 1-4 by creating a Class with a user_data method that accepts a Django User model as an argument. The method should return a dictionary containing any or all of the keys **user_id**, **email**, **name** and **user_created**, and the desired values for each. Note that the user_created key must contain a datetime. Here is an example::\n\n from django.utils.dateformat import DateFormat\n\n class IntercomUserData:\n \"\"\" User data class located anywhere in your project\n This one is located in thepostman/utils/user_data.py \"\"\"\n\n def user_data(self, user):\n \"\"\" Required method, same name and only accepts one attribute (django User model) \"\"\"\n\n return {\n 'name' : user.userprofile.name,\n }\n\nYou will need to register your class with django-intercom so that it knows where to find it. You do this by adding the class to the INTERCOM_USER_DATA_CLASS setting.\n\nINTERCOM_USER_DATA_CLASS\n---------------------------\nDefault = None\n\nin settings.py::\n\n INTERCOM_USER_DATA_CLASS = 'thepostman.utils.user_data.IntercomUserData'\n\nCustom Data\n===========\nIntercom.io allows you to send them your own custom data, django-intercom makes this easy. All you need to do it create a Class with a custom_data method that accepts a Django User model as an argument and returns a dictionary. Here is an example::\n\n from thepostman.models import message\n\n class IntercomCustomData:\n \"\"\" Custom data class located anywhere in your project\n This one is located in thepostman/utils/custom_data.py \"\"\"\n\n def custom_data(self, user):\n \"\"\" Required method, same name and only accepts one attribute (django User model) \"\"\"\n\n num_messages = message.objects.filter(user=user).count()\n num_unread = messages.objects.filter(user=user, read=False).count()\n\n return {\n 'num_messages' : num_messages,\n 'num_unread' : num_unread,\n }\n\nOnce you have your classes built, you will need to register them with django-intercom so that it knows where to find them. You do this by adding the class to the INTERCOM_CUSTOM_DATA_CLASSES setting. It is important to note that if you have the same dict key returned in more then one Custom Data Class the last class that is run (lower in the list) will overwrite the previous ones.\n\nINTERCOM_CUSTOM_DATA_CLASSES\n----------------------------\nDefault = None\n\nin settings.py::\n\n INTERCOM_CUSTOM_DATA_CLASSES = [\n 'thepostman.utils.custom_data.IntercomCustomData',\n ]\n\n\nCompany Data\n============\nIntercom.io allows you to group your users by company, django-intercom makes this easy. All you need to do is create a Class with a company_data method that accepts a Django user model as an argument and returns a dictionary containing the keys id, name and created_at, and whatever other information you want to store about the company. Note that the created_at key must contain a Unix timestamp. Here is an example::\n\n from django.utils.dateformat import DateFormat\n\n class IntercomCompanyData:\n \"\"\" Company data class located anywhere in your project\n This one is located in thepostman/utils/company_data.py \"\"\"\n\n def company_data(self, user):\n \"\"\" Required method, same name and only accepts one attribute (django User model) \"\"\"\n\n organisation = user.organisation\n\n return {\n 'id' : organisation.id,\n 'name' : organisation.name,\n 'created_at' : DateFormat(organisation.created_at).U(),\n 'price_plan' : organisation.price_plan,\n }\n\nYou will need to register your class with django-intercom so that it knows where to find it. You do this by adding the class to the INTERCOM_COMPANY_DATA_CLASS setting.\n\nINTERCOM_COMPANY_DATA_CLASS\n---------------------------\nDefault = None\n\nin settings.py::\n\n INTERCOM_COMPANY_DATA_CLASS = 'thepostman.utils.company_data.IntercomCompanyData'", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kencochrane/django-intercom/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-intercom", "package_url": "https://pypi.org/project/django-intercom/", "platform": "", "project_url": "https://pypi.org/project/django-intercom/", "project_urls": { "Homepage": "https://github.com/kencochrane/django-intercom/" }, "release_url": "https://pypi.org/project/django-intercom/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Django App for integrating with intercom.io", "version": "0.1.3" }, "last_serial": 5507199, "releases": { "0.0.10": [ { "comment_text": "", "digests": { "md5": "0b7c8e730ba3d373c9ff0c239452ec7e", "sha256": "82fae2ee2e94f2a1df6c77f8535f1f14b355763f0d29a83f14a6a363b8719536" }, "downloads": -1, "filename": "django-intercom-0.0.10.tar.gz", "has_sig": false, "md5_digest": "0b7c8e730ba3d373c9ff0c239452ec7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10919, "upload_time": "2014-06-23T15:26:08", "url": "https://files.pythonhosted.org/packages/0c/8b/2ee468917d8f6ec0ee5b6c292364fa6cf076f5a85c8d13fad3c0bbb8abfe/django-intercom-0.0.10.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "e42eddf3766aa6cce3133b7b6754d203", "sha256": "5b2756a4ebb90373bd903992bc52795307664c8bb3a3c243c6ea49688a5fbcfb" }, "downloads": -1, "filename": "django-intercom-0.0.11.tar.gz", "has_sig": false, "md5_digest": "e42eddf3766aa6cce3133b7b6754d203", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10980, "upload_time": "2014-10-15T10:57:17", "url": "https://files.pythonhosted.org/packages/2f/00/c4956f48cbfe42ff9bf78f6a166a86091aad926f890d54bbc4a5020ac386/django-intercom-0.0.11.tar.gz" } ], "0.0.12": [ { "comment_text": "", "digests": { "md5": "b62cec31027222666c140a256958548e", "sha256": "c79cf290d1d735cfaa580032c5f09ee4c7175354000fb7763bd960df8c44659d" }, "downloads": -1, "filename": "django-intercom-0.0.12.tar.gz", "has_sig": false, "md5_digest": "b62cec31027222666c140a256958548e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10187, "upload_time": "2016-02-01T20:14:43", "url": "https://files.pythonhosted.org/packages/04/41/6216e8989a71f4f93e05fa29c71dce8f2c03d3cadf3a59c40a82c673dd61/django-intercom-0.0.12.tar.gz" } ], "0.0.13": [ { "comment_text": "", "digests": { "md5": "e3c61ac110516993a3c1b560c8cc70ab", "sha256": "62a807f89bce30984a1a9afa126c012ed6358afa258873e4a16f34902a9ed4bf" }, "downloads": -1, "filename": "django-intercom-0.0.13.tar.gz", "has_sig": false, "md5_digest": "e3c61ac110516993a3c1b560c8cc70ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10452, "upload_time": "2016-02-16T19:02:09", "url": "https://files.pythonhosted.org/packages/85/49/39156e507afe24ab21b16165b8e7a215b678899ed858d11d8be8c3f36587/django-intercom-0.0.13.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "7a1dde8a172c4150ac1fd811b6e667e2", "sha256": "7db584a89435cf4282ef45180a61e76509ab3db8e8b6ad2033ca9912ddc7d35a" }, "downloads": -1, "filename": "django-intercom-0.0.4.tar.gz", "has_sig": false, "md5_digest": "7a1dde8a172c4150ac1fd811b6e667e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4127, "upload_time": "2012-01-23T22:22:34", "url": "https://files.pythonhosted.org/packages/5f/c9/382c9bb4a7e8c64c5fa64503a5dc7e0c848c609f9246ec6c54e14eb548c1/django-intercom-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "5013e78e39d532fcd7eac1a8f3e9daa4", "sha256": "9c5e88ac6cd6caed57fd6625168395d60caef9262ae96f99afff08ee9507976f" }, "downloads": -1, "filename": "django-intercom-0.0.5.tar.gz", "has_sig": false, "md5_digest": "5013e78e39d532fcd7eac1a8f3e9daa4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5862, "upload_time": "2012-01-23T22:41:12", "url": "https://files.pythonhosted.org/packages/7d/14/023df463936364034f78da4e9ff5083ff1086b72f30f26ede0f1e92cb79d/django-intercom-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "dc87b59aed85c249dea5e8f4897406ba", "sha256": "d5ca15869bb72ff0a423c6294d2b18ff18c3fee12cb26296e0e06131178ab289" }, "downloads": -1, "filename": "django-intercom-0.0.6.tar.gz", "has_sig": false, "md5_digest": "dc87b59aed85c249dea5e8f4897406ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9678, "upload_time": "2012-01-25T01:04:43", "url": "https://files.pythonhosted.org/packages/88/1f/9c25fd997417f827924f09c49e1ff45a52d5d7694ef25aa060eaa207b633/django-intercom-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "0fd259c463bde5fa0f8eb8c1fcb54462", "sha256": "14fac7b70299198554af7351375ddc2ad981420e1da223784a7fc842ece470fc" }, "downloads": -1, "filename": "django-intercom-0.0.7.tar.gz", "has_sig": false, "md5_digest": "0fd259c463bde5fa0f8eb8c1fcb54462", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7434, "upload_time": "2014-03-28T14:20:38", "url": "https://files.pythonhosted.org/packages/10/b8/05f858f10117e985114ffa3233943d9a70dfff5aa2001e4e75d0621c1fa0/django-intercom-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "5fd669efa68a133845507be3fd7954cb", "sha256": "7fad4205b0969d5c774cddd8fcb92375d2f08f9c1d2b19f6e1f16e3cc1e5c6da" }, "downloads": -1, "filename": "django-intercom-0.0.8.tar.gz", "has_sig": false, "md5_digest": "5fd669efa68a133845507be3fd7954cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8045, "upload_time": "2014-04-06T16:32:24", "url": "https://files.pythonhosted.org/packages/46/6f/389bbd90f900b0f4119bfb8b1b2aecd7ced44dab9fc5f239296cf3d4e857/django-intercom-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "8401a76e0132457a83abb2d82cca9606", "sha256": "e4295d26ce193da991d3c3440074a4fb8d05315f8ec3cf611a980f5a2e39857d" }, "downloads": -1, "filename": "django-intercom-0.0.9.tar.gz", "has_sig": false, "md5_digest": "8401a76e0132457a83abb2d82cca9606", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8529, "upload_time": "2014-04-23T14:04:47", "url": "https://files.pythonhosted.org/packages/cc/00/e03a1491e83da8c804abb16dadf0f4fff3567ac2b80161f5ef7b4141414b/django-intercom-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "e6c70517676df560fe3a55230e44cf1d", "sha256": "106f92631c7b4d75158cb7642f96def93a5401e064efc6b7c544b29f18bd1f40" }, "downloads": -1, "filename": "django-intercom-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e6c70517676df560fe3a55230e44cf1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8817, "upload_time": "2018-06-30T11:57:09", "url": "https://files.pythonhosted.org/packages/d4/db/a9253bb2abb1bbb4a0fdb3ec4db9e28a822266f953d3c9f58d566bd5f572/django-intercom-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "302d6e424bb6ea138910dda28dba6487", "sha256": "ff16a66e6766747d764251b230232a0baf227d384b4ed82cf6fb2cf831b447cf" }, "downloads": -1, "filename": "django-intercom-0.1.1.tar.gz", "has_sig": false, "md5_digest": "302d6e424bb6ea138910dda28dba6487", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8856, "upload_time": "2018-07-21T14:22:56", "url": "https://files.pythonhosted.org/packages/d7/78/216ce890b9fad9cdb0ed603efd5fac931e57ff99c97c0610105b1a7d3170/django-intercom-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "72b2c6f9fec4f365a691ce89046938bc", "sha256": "3fa6c7f0884a9d66853a99ff752061e095cafaf36bc6158863429e27db4ffbb7" }, "downloads": -1, "filename": "django-intercom-0.1.2.tar.gz", "has_sig": false, "md5_digest": "72b2c6f9fec4f365a691ce89046938bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8973, "upload_time": "2018-10-19T12:15:05", "url": "https://files.pythonhosted.org/packages/a7/d5/6892854829de35d1d29856f2cf1fafcb79cf5f01f0937c71f72b13435fe4/django-intercom-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b9d3a66fa7bb965ac5fec4f94aa7ab23", "sha256": "33a7cd924cf6c371e18e4f835e208e12a54a2b94cbf0c2129359326a5f5f41df" }, "downloads": -1, "filename": "django-intercom-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b9d3a66fa7bb965ac5fec4f94aa7ab23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9079, "upload_time": "2019-07-09T13:32:00", "url": "https://files.pythonhosted.org/packages/6a/3a/69541a8020ffe1fbc728c5084f6ab6176234a0769a5a787c255cf56fe8ed/django-intercom-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b9d3a66fa7bb965ac5fec4f94aa7ab23", "sha256": "33a7cd924cf6c371e18e4f835e208e12a54a2b94cbf0c2129359326a5f5f41df" }, "downloads": -1, "filename": "django-intercom-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b9d3a66fa7bb965ac5fec4f94aa7ab23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9079, "upload_time": "2019-07-09T13:32:00", "url": "https://files.pythonhosted.org/packages/6a/3a/69541a8020ffe1fbc728c5084f6ab6176234a0769a5a787c255cf56fe8ed/django-intercom-0.1.3.tar.gz" } ] }