{ "info": { "author": "vicalloy", "author_email": "zbirder@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Using django-simple-avatar\n===================\n\n\nBasics\n------\n\nTo integrate ``django-simple-avatar`` with your site, there are relatively few things\nthat are required. A minimal integration can work like this:\n\n1. List this application in the ``INSTALLED_APPS`` portion of your settings\nfile. Your settings file will look something like::\nINSTALLED_APPS = (\n# ...\n'avatar',\n)\n\n2. Add the pagination urls to the end of your root urlconf. Your urlconf\nwill look something like::\nurlpatterns = patterns('',\n# ...\n(r'^admin/(.*)', admin.site.root),\n(r'^avatar/', include('simpleavatar.urls')),\n)\n\n3. Somewhere in your template navigation scheme, link to the change avatar\npage::\nChange your avatar\n\n4. Wherever you want to display an avatar for a user, first load the avatar\ntemplate tags::\n{% load avatar_tags %}\nThen, use the ``avatar`` tag to display an avatar of a default size::\n{% avatar user %}\nOr specify a size (in pixels) explicitly::\n{% avatar user 65 %}\n\n5. Optionally customize ``avatar/change.html`` and\n``avatar/confirm_delete.html`` to conform to your site's look and feel.\n\n\nViews\n-----\n\nThere are only two views for this application: one for changing a user's avatar,\nand another for deleting a user's avatar.\n\nChanging an avatar\n~~~~~~~~~~~~~~~~~~\n\nThe actual view function is located at ``avatar.views.change``, and this can\nbe referenced by the url name ``avatar_change``. It takes two keyword\narguments: ``extra_context`` and ``next_override``. If ``extra_context`` is\nprovided, that context will be placed into the template's context.\n\nIf ``next_override`` is provided, the user will be redirected to the specified\nURL after form submission. Otherwise the user will be redirected to the URL\nspecified in the ``next`` parameter in ``request.POST``. If ``request.POST``\nhas no ``next`` parameter, ``request.GET`` will be searched. If ``request.GET``\nhas no ``next`` parameter, the ``HTTP_REFERER`` header will be inspected. If\nthat header does not exist, the user will be redirected back to the current URL.\n\nDeleting an avatar\n~~~~~~~~~~~~~~~~~~\n\nThe actual view function is located at ``avatar.views.delete``, and this can be\nreferenced by the url name ``avatar_delete``. It takes the same two keyword\narguments as ``avatar.views.change`` and follows the same redirection rules\nas well.\n\n\nTemplate Tags\n-------------\n\nTo begin using these template tags, you must first load the tags into the\ntemplate rendering system:\n\n{% load avatar_tags %}\n\n``{% avatar_url user [size in pixels] %}``\nRenders the URL of the avatar for the given user. User can be either a\n``django.contrib.auth.models.User`` object instance or a username.\n\n``{% avatar user [size in pixels] %}``\nRenders an HTML ``img`` tag for the given user for the specified size. User\ncan be either a ``django.contrib.auth.models.User`` object instance or a\nusername.\n\n``{% render_avatar avatar [size in pixels] %}``\nGiven an actual ``avatar.models.Avatar`` object instance, renders an HTML\n``img`` tag to represent that avatar at the requested size.\n\n\nGlobal Settings\n---------------\n\nThere are a number of settings available to easily customize the avatars that\nappear on the site. Listed below are those settings:\n\nAUTO_GENERATE_AVATAR_SIZES\nAn iterable of integers representing the sizes of avatars to generate on\nupload. This can save rendering time later on if you pre-generate the\nresized versions. Defaults to ``(80,)``\n\nAVATAR_RESIZE_METHOD\nThe method to use when resizing images, based on the options available in\nPIL. Defaults to ``Image.ANTIALIAS``.\n\nAVATAR_STORAGE_DIR\nThe directory under ``MEDIA_ROOT`` to store the images. If using a\nnon-filesystem storage device, this will simply be appended to the beginning\nof the file name.\n\nAVATAR_GRAVATAR_BACKUP\nA boolean determining whether to default to the Gravatar service if no\n``Avatar`` instance is found in the system for the given user. Defaults to\nTrue.\n\nAVATAR_DEFAULT_URL\nThe default URL to default to if ``AVATAR_GRAVATAR_BACKUP`` is set to False\nand there is no ``Avatar`` instance found in the system for the given user.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/vicalloy/django-simple-avatar/", "keywords": "avatar,django", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-simple-avatar", "package_url": "https://pypi.org/project/django-simple-avatar/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-simple-avatar/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/vicalloy/django-simple-avatar/" }, "release_url": "https://pypi.org/project/django-simple-avatar/0.8.6/", "requires_dist": null, "requires_python": null, "summary": "django-simple-avatar", "version": "0.8.6" }, "last_serial": 790621, "releases": { "0.8": [ { "comment_text": "", "digests": { "md5": "c920e411e2d54eaaf47240e3d892a988", "sha256": "0100b1d2be9b7c43247fe2c3f66a36ec343ad11bf97f104ffc17ebe7f8ec9138" }, "downloads": -1, "filename": "django-simple-avatar-0.8.zip", "has_sig": false, "md5_digest": "c920e411e2d54eaaf47240e3d892a988", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13025, "upload_time": "2010-11-29T08:59:57", "url": "https://files.pythonhosted.org/packages/9c/2c/1334a34b0ec827847c55bbd939be039b11396e5fc408f7c8f651a33c2824/django-simple-avatar-0.8.zip" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "6a69a1344a5441a3c3aca2faad732161", "sha256": "1f4508b187ea722d7f0a193e154728c1e82e1989088bd136d3bc1b20abb96e42" }, "downloads": -1, "filename": "django-simple-avatar-0.8.1.zip", "has_sig": false, "md5_digest": "6a69a1344a5441a3c3aca2faad732161", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12849, "upload_time": "2011-03-22T15:07:35", "url": "https://files.pythonhosted.org/packages/3e/86/1c86f807b75c3504c5313bb2d6ec154b04bc22c2a579d2a6bb4df08d2cb4/django-simple-avatar-0.8.1.zip" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "2aa0ff8a6647ecd727ec015b8640decd", "sha256": "98f67826dca16c48aaae2204560b6fc533e930e12a41f8b2e3356c235c3bf073" }, "downloads": -1, "filename": "django-simple-avatar-0.8.2.zip", "has_sig": false, "md5_digest": "2aa0ff8a6647ecd727ec015b8640decd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18604, "upload_time": "2011-03-24T15:13:26", "url": "https://files.pythonhosted.org/packages/f3/c3/7d7e522f2ac8fbef98a5062b3bcc0ea52f73707370029b03f8e73605cf8b/django-simple-avatar-0.8.2.zip" } ], "0.8.4": [ { "comment_text": "", "digests": { "md5": "afb25c07eca329e5cfdbda2f739aa6c4", "sha256": "d54d704ec34c4567a1bc483ab844f7a42166a69f7cc1df8dfd71be4924b7054a" }, "downloads": -1, "filename": "django-simple-avatar-0.8.4.zip", "has_sig": false, "md5_digest": "afb25c07eca329e5cfdbda2f739aa6c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17891, "upload_time": "2011-04-26T13:19:18", "url": "https://files.pythonhosted.org/packages/de/26/c30b38f08af327242c08972c8ac7f4eea97877e6b27eb2b4a2f4e96cb982/django-simple-avatar-0.8.4.zip" } ], "0.8.5": [ { "comment_text": "", "digests": { "md5": "9aa8064bc16da73c4b0ba7bac3b0584f", "sha256": "d344624b58468af563193b2024ba9e2a16fd23e3ac207768c4dd24d1882e16e6" }, "downloads": -1, "filename": "django-simple-avatar-0.8.5.zip", "has_sig": false, "md5_digest": "9aa8064bc16da73c4b0ba7bac3b0584f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17891, "upload_time": "2011-05-11T03:50:26", "url": "https://files.pythonhosted.org/packages/2f/0b/f1b5bf008f087705a34e781ca6caa0cdfbfd695da170d52d12b5fad1780f/django-simple-avatar-0.8.5.zip" } ], "0.8.6": [ { "comment_text": "", "digests": { "md5": "9eb2b7cfcf71da6aaf6c581307de55a5", "sha256": "3e360045bbf50500a3e7df276d7908ef76d10c416885329e49063fedbf843c99" }, "downloads": -1, "filename": "django-simple-avatar-0.8.6.zip", "has_sig": false, "md5_digest": "9eb2b7cfcf71da6aaf6c581307de55a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18872, "upload_time": "2011-06-23T16:27:00", "url": "https://files.pythonhosted.org/packages/23/56/96052b9a62380c815f181bd67f29e2d51f91ee0dc3cd1e9a34a600ac7bbc/django-simple-avatar-0.8.6.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9eb2b7cfcf71da6aaf6c581307de55a5", "sha256": "3e360045bbf50500a3e7df276d7908ef76d10c416885329e49063fedbf843c99" }, "downloads": -1, "filename": "django-simple-avatar-0.8.6.zip", "has_sig": false, "md5_digest": "9eb2b7cfcf71da6aaf6c581307de55a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18872, "upload_time": "2011-06-23T16:27:00", "url": "https://files.pythonhosted.org/packages/23/56/96052b9a62380c815f181bd67f29e2d51f91ee0dc3cd1e9a34a600ac7bbc/django-simple-avatar-0.8.6.zip" } ] }