{ "info": { "author": "Evgeny Demchenko", "author_email": "little_pea@list.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "django-site-basics\n========================\n\nA reusable app to add favicon.ico, robots.txt, SEO tricks and 404/500 error pages handling for your site.\n\nInstallation\n------------------------------------\n\nInstall \"django-site-basics\" using pip or easy_install::\n\n pip install django-site-basics\n\nAdd \"site_basics\" and optionally \"sitemetrics\" to your INSTALLED_APPS in settings.py::\n\n INSTALLED_APPS = (\n ...\n 'sitemetrics', # (optional) for Google Analytics support\n 'site_basics',\n )\n\nAdd site_basics URL patterns and handlers (if you want to use them) to urls.py::\n\n handler404 = 'site_basics.views.page_404'\n handler500 = 'site_basics.views.page_500'\n\n urlpatterns = patterns('',\n ...\n url(r'^', include('site_basics.urls')),\n )\n\nReplace Django's LocaleMiddleware with UpdatedLocaleMiddleware in your MIDDLEWARE_CLASSES::\n\n MIDDLEWARE_CLASSES = (\n ...\n #'django.middleware.locale.LocaleMiddleware', # disabled in favor of UpdatedLocaleMiddleware\n 'site_basics.middleware.UpdatedLocaleMiddleware',\n ...\n )\n\nUsage\n------------------------------------\n\nFavicon\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nPut favicon.ico into your STATIC_ROOT. and you good to go, /favicon.ico will automatically redirect to /static/favicon.ico if your STATIC_URL = '/static/'.\n\nOtherwise you can set a custom path to your favicon using FAVICON_PATH setting. For example::\n\n FAVICON_PATH = STATIC_URL + 'images/favicon.png'\n\nRobots.txt\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nrobots.txt will be working out-of-the-box but if you need to customize it put custom robots.txt file into your templates directory.\nIf you need to change template location use ROBOTS_TEMPLATE setting (robots.txt by default). Example::\n\n ROBOTS_TEMPLATE = 'myfolder/robots.txt'\n\nUpdatedLocaleMiddleware\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThis is a fix of Django i18n_urlpatterns and SEO problem described in `Yawd's article`_.\n\n.. _Yawd's article: http://blog.yawd.eu/2012/impact-django-page-redirects-seo/\n\nIt changes LocaleMiddleware i18n redirects from Temporary (302) to Permanent (301) which prevents search engines from indexing and ranking double links for the same page.\n\nTo activate it replace Django's LocaleMiddleware with UpdatedLocaleMiddleware in your MIDDLEWARE_CLASSES::\n\n MIDDLEWARE_CLASSES = (\n ...\n #'django.middleware.locale.LocaleMiddleware', # disabled in favor of UpdatedLocaleMiddleware\n 'site_basics.middleware.UpdatedLocaleMiddleware',\n ...\n )\n\nError pages\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nError pages work out-of-the-box providing you fancy themes from Annanta_ and Robotik_.\n\n.. image:: http://www.designersdigest.co/wp-content/uploads/2010/03/404-Error-Template.jpg\n\n.. image:: http://mogoolab.com/wp-content/uploads/2011/10/robotik_1-450x260.png\n\nIn development you can test these views by opening /test_page_404/ and /test_page_500/.\n\nAnnanta is default but you can switch to Robotik using setting::\n\n ERROR_PAGE_THEME = 'robotik' # default is 'annanta'\n\nYou can also set a color::\n\n ERROR_PAGE_THEME_COLOR = 'blue'\n\nAvailable colors:\n\n* blue\n* green\n* gray (Robotik only)\n* grey (Annanta only)\n* red (Annanta only)\n* brown (Annanta only)\n\nAnd if you're using Django CMS you can show links to your root pages by setting::\n\n ERROR_PAGE_CMS_LINKS = True\n\nMore configuration options below...\n\nGoogle Analytics (sitemetrics)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n1. Add 'sitemetrics' to 'INSTALLED_APPS' in your settings file (usually 'settings.py')\n2. Add '{% load sitemetrics %}' tag to the top of a template (usually base template, e.g. 'base.html')\n\nThen you have two options that add metrics client code to your page:\n\n* Use so-called 'four arguments' sitemetrics tag notation::\n\n {% sitemetrics by google for \"UA-000000-0\" %}\n\nHere: 'google' \u2014 provider alias; 'UA-000000-0' \u2014 keycode argument. That's how you put Google Analytics client code (with 'UA-000000-0' keycode) into page.\n\n* Use so-called 'no arguments' sitemetrics tag notation::\n\n {% sitemetrics %}\n\nThat's how you put all client codes registered and active for the current site.\n\nClient codes are registered with sites through Django Admin site interface.\n'Admin site' and 'Sites' from Django contrib are required for this option to work.\n\n'./manage.py syncdb' is required just once for this option to work (it installs sitemetrics table into database).\n\nConfiguration\n------------------------------------\n\nROBOTS_TEMPLATE\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSets a template for robots.txt handler ('robots.txt' by default). Example::\n\n ROBOTS_TEMPLATE = 'myforlder/myrobotstemplate.txt'\n\nERROR_PAGE_THEME\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSets a theme for error pages ('annanta' or 'robotik', 'annanta' by default). Example::\n\n ERROR_PAGE_THEME = 'robotik'\n\nERROR_PAGE_THEME_COLOR\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSets a color for error pages theme ('blue' by default). Example::\n\n ERROR_PAGE_THEME_COLOR = 'green'\n\nERROR_404_PAGE_TEMPLATE\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n404 template ('%s/404.html' % ERROR_PAGE_THEME by default). Example::\n\n ERROR_404_PAGE_TEMPLATE = 'myforlder/404.html'\n\nERROR_500_PAGE_TEMPLATE\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n500 template ('%s/500.html' % ERROR_PAGE_THEME by default). Example::\n\n ERROR_404_PAGE_TEMPLATE = 'myforlder/500.html'\n\nERROR_PAGE_LOGO_URL\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSet it if you want to display your logo on the error pages (None by default). Example::\n\n ERROR_PAGE_LOGO_URL = '%simages/logo.png' % settings.STATIC_URL\n\nERROR_PAGE_CMS_LINKS\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAllows you to show your root menu links on the error pages if you're using Django CMS (False by default). Example::\n\n ERROR_PAGE_CMS_LINKS = True\n\nERROR_PAGE_NAV_LINKS\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAllows you to show your root menu links on the error pages if you're using Django CMS. Format is a tuple of tuples. Example::\n\n ERROR_PAGE_NAV_LINKS = (\n ('/', ugettext('Home')),\n ))\n\nERROR_PAGE_SOCIAL_LINKS\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAllows you to show your social media links on the error pages. Format is a tuple of tuples (empty by default).\n\nAllowed values (because of the icons preloaded) are anything from the GoSocial_ icons pack.\n\nExample::\n\n ERROR_PAGE_SOCIAL_LINKS = (\n ('twitter', 'http://twitter.com/YOURUSERNAME'),\n ('facebook', 'http://www.facebook.com/pages/YOURUSERNAME/YOURUSERID'),\n ('last.fm', 'http://www.last.fm/user/YOURUSERNAME'),\n ('flickr', 'http://www.flickr.com/photos/YOURUSERNAME'),\n ('vimeo', 'http://vimeo.com/YOURUSERID'),\n ('rss', '/rss/'),\n )\n\n\nERROR_PAGE_SEARCH_ACTION\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAllows you to setup a search form on your error pages (None by default).\n\nAdditional settings:\n\n* ERROR_PAGE_SEARCH_METHOD ('GET' by default)\n* ERROR_PAGE_SEARCH_PARAM ('q' by default)\n\nExample::\n\n ERROR_PAGE_SEARCH_ACTION = '/search/'\n ERROR_PAGE_SEARCH_METHOD = 'POST'\n ERROR_PAGE_SEARCH_PARAM = 'query'\n\nRunning the Tests\n------------------------------------\n\nYou can run the tests with via::\n\n python setup.py test\n\nor::\n\n python runtests.py\n\nTODO\n------------------------------------\n\n* Add more templates\n* Add locales and translations\n* Sitemaps support\n\nCredits\n------------------------------------\n\n* Developed and maintained under supervision of `Evgeny Demchenko`_\n* Uses django-favicon_ for favicon.ico handling\n* Uses django-robots-txt_ for robots.txt handling\n* Uses django-sitemetrics_ for Google Analytics handling\n* Uses Robotik_ 404 error page template\n* Uses Annanta_ 404 error page template\n* Uses GoSocial_ icons pack\n* `Yawd's middleware code`_\n\n.. _Evgeny Demchenko: https://github.com/littlepea\n.. _django-favicon: https://github.com/littlepea/django-favicon\n.. _django-robots-txt: https://github.com/nkuttler/django-robots-txt\n.. _django-sitemetrics: https://github.com/idlesign/django-sitemetrics\n.. _Annanta: http://www.designersdigest.co/archive/404-error-template/\n.. _Robotik: http://mogoolab.com/portfolio/free-404-error-page-html-template/\n.. _GoSocial: https://www.gosquared.com/blog/gosocial-a-free-social-media-icon-pack\n.. _Yawd's middleware code: http://blog.yawd.eu/2012/impact-django-page-redirects-seo/", "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/littlepea/django-site-basics", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-site-basics", "package_url": "https://pypi.org/project/django-site-basics/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-site-basics/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/littlepea/django-site-basics" }, "release_url": "https://pypi.org/project/django-site-basics/0.2.5/", "requires_dist": null, "requires_python": null, "summary": "Reusable django app to handle /favicon.ico and robots.txt for your site", "version": "0.2.5" }, "last_serial": 871506, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e8fe9a886ff43b1bd7470fa6597dfd4a", "sha256": "cb98619972fff7639e8431d7269a031ca9d21712ee02e62c38f25527b6a908dc" }, "downloads": -1, "filename": "django-site-basics-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e8fe9a886ff43b1bd7470fa6597dfd4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3762, "upload_time": "2013-03-04T08:43:55", "url": "https://files.pythonhosted.org/packages/fd/ec/e6dd542d14f28e129cc8247af437e17f026471f3da2f876510e4ba476585/django-site-basics-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e23b5a5311efdf21a2e4303d256cc70a", "sha256": "5eb0a8f59b68f69e5a5c3d0c9db36713045166a18d62b3f39dfe8045091c6825" }, "downloads": -1, "filename": "django-site-basics-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e23b5a5311efdf21a2e4303d256cc70a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3918, "upload_time": "2013-03-04T08:52:20", "url": "https://files.pythonhosted.org/packages/2d/d6/61b740cfa8f3284af539772296f3cca5c78a6e9fb2fe70ba1b2178303ba8/django-site-basics-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "509f82dcfa2a8fc41b9d710f28cad14f", "sha256": "256e8dd554a20a5de751b600d5cf4d3bcd56c114425a1e0d53e882c8548a9718" }, "downloads": -1, "filename": "django-site-basics-0.1.2.tar.gz", "has_sig": false, "md5_digest": "509f82dcfa2a8fc41b9d710f28cad14f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3931, "upload_time": "2013-03-04T08:56:53", "url": "https://files.pythonhosted.org/packages/48/5b/89eb1c154bf036886f95e40a2e9944ae1f3aa5c4376c1026d940f36b27ae/django-site-basics-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ed39d1639f223c2f2f656a970123f255", "sha256": "affbbd44ac00db65800e2fe8ba485d98c399769aca31d8faad33d0d026cd8e7b" }, "downloads": -1, "filename": "django-site-basics-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ed39d1639f223c2f2f656a970123f255", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4030, "upload_time": "2013-03-04T09:00:04", "url": "https://files.pythonhosted.org/packages/1b/54/61e6e87eee7ea06ce2aa83dd2b14899bbe155216b9515880791cda72e812/django-site-basics-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "dcfe73ce84c68f14a4612fa496a31462", "sha256": "4c0d58fffcfdc5f54a25035c7190df90c6cebd5cc8a5494d589f3cc84703cc0a" }, "downloads": -1, "filename": "django-site-basics-0.1.4.tar.gz", "has_sig": false, "md5_digest": "dcfe73ce84c68f14a4612fa496a31462", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4038, "upload_time": "2013-03-06T05:54:52", "url": "https://files.pythonhosted.org/packages/4a/32/5c206be7045f5ee0f9709dd05fff72dc42d695ded6a275f92456812635f5/django-site-basics-0.1.4.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "1f8c1775892bc861fd0fac56f9fffe16", "sha256": "66b5c56dd63fd0213131af70b249369117d0fbc5142104a0c4f0e2f5aa14642e" }, "downloads": -1, "filename": "django-site-basics-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1f8c1775892bc861fd0fac56f9fffe16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 639887, "upload_time": "2013-03-08T10:55:05", "url": "https://files.pythonhosted.org/packages/12/f5/a2ac14c35107d60fbc219ee30ecfe97e095317ae181f17ab1cd1c7fa344d/django-site-basics-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "a0a33ff1c5e02ea2ed2d1b60e670d466", "sha256": "5f95255bc308fe002edf7ab66ba962c6253843b022f5bf2429a75a3f01500ff5" }, "downloads": -1, "filename": "django-site-basics-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a0a33ff1c5e02ea2ed2d1b60e670d466", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 639911, "upload_time": "2013-03-08T12:20:35", "url": "https://files.pythonhosted.org/packages/75/2b/0f3618395d0dffd9aeca79e079a2937aee77b70c7bd841c25dcb45e82ce7/django-site-basics-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "74f86b8cbe6a27461fab749946187810", "sha256": "85223bd8589a6eccafbec93a20af0a1740b9c4ccc32f4331b890f5daad8a6ca4" }, "downloads": -1, "filename": "django_site_basics-0.2.2-py2.7.egg", "has_sig": false, "md5_digest": "74f86b8cbe6a27461fab749946187810", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 752345, "upload_time": "2013-03-09T02:01:31", "url": "https://files.pythonhosted.org/packages/cf/0a/7d99dc65c8d1c62ee226a72479d38c1d5662d516fbeacd62592115174f70/django_site_basics-0.2.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "5d3885f1cc7ad380c2e923c24027c74a", "sha256": "d13f9ed641806341709220ea84e52b5e24300525d39acb7f5743ea6307eac4d4" }, "downloads": -1, "filename": "django-site-basics-0.2.2.tar.gz", "has_sig": false, "md5_digest": "5d3885f1cc7ad380c2e923c24027c74a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 640793, "upload_time": "2013-03-09T02:01:09", "url": "https://files.pythonhosted.org/packages/f0/56/0a082d291e4cd9e320e0a0df2a9230a20e1ca4bedd43de8beccdb1315c2f/django-site-basics-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "0c66e57eb361c120f455a80ba250ccb6", "sha256": "9109ed4614942804f99e02774e779708758cd72db274317f3433bc4b98c50115" }, "downloads": -1, "filename": "django_site_basics-0.2.3-py2.7.egg", "has_sig": false, "md5_digest": "0c66e57eb361c120f455a80ba250ccb6", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 752835, "upload_time": "2013-04-12T10:57:00", "url": "https://files.pythonhosted.org/packages/be/16/43e4473bb2911c79a9cb0450a6d11aca626b00b853753e6cd112cfb084af/django_site_basics-0.2.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "074d9ef661d0e87431079dd940f9ea12", "sha256": "69e25e66ef773a7780b2cbb8b8b41610c09a4f3c6819ef4c61f5114a40b205b3" }, "downloads": -1, "filename": "django-site-basics-0.2.3.tar.gz", "has_sig": false, "md5_digest": "074d9ef661d0e87431079dd940f9ea12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 648005, "upload_time": "2013-04-12T10:56:42", "url": "https://files.pythonhosted.org/packages/69/d4/d92045a575bc619bcf4f85fc3ad44df20206171973083f21d792f018633e/django-site-basics-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "bf2e310ad0b998a66f5091913be389ec", "sha256": "4e8ffe9e14d3e6f67f5c9ec13f5dec63fe85e2c36c06276b419c389e2ed378aa" }, "downloads": -1, "filename": "django_site_basics-0.2.4-py2.7.egg", "has_sig": false, "md5_digest": "bf2e310ad0b998a66f5091913be389ec", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 752838, "upload_time": "2013-04-19T05:21:58", "url": "https://files.pythonhosted.org/packages/fc/70/0a7eebd4b3c455055ce9a816a35533b9c18e397a9e84245deca6a200a09b/django_site_basics-0.2.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "49308c08ad0071a100c9d1c0e7a76f6c", "sha256": "004a560657d2e420ca166930dc7fede48b2381198f7102b76460b8a42d29f978" }, "downloads": -1, "filename": "django-site-basics-0.2.4.tar.gz", "has_sig": false, "md5_digest": "49308c08ad0071a100c9d1c0e7a76f6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 647996, "upload_time": "2013-04-19T05:21:42", "url": "https://files.pythonhosted.org/packages/db/05/5ff754c5a38397020c895145029dcf31d9ca297dfac03b9718ff905745fb/django-site-basics-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "70463fd35eb0cce53b569e63a3e1dceb", "sha256": "4865e3abc4305ea6c6cf0b7a13779f4de0cd5513ba4c15e6b92a59900f381d67" }, "downloads": -1, "filename": "django_site_basics-0.2.5-py2.7.egg", "has_sig": false, "md5_digest": "70463fd35eb0cce53b569e63a3e1dceb", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 752869, "upload_time": "2013-09-22T23:52:36", "url": "https://files.pythonhosted.org/packages/a0/8f/adec4feb45c2ee55dce4c9a7f3f06b889b79046b81b995f537638ec83395/django_site_basics-0.2.5-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "0dbc048ed25f1a408fa1d8f8d87107f5", "sha256": "da11c6f2338f613497ae79592eea382f90b93a536a7b58bb6aa2ec03f6e91a9d" }, "downloads": -1, "filename": "django-site-basics-0.2.5.tar.gz", "has_sig": false, "md5_digest": "0dbc048ed25f1a408fa1d8f8d87107f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 630645, "upload_time": "2013-09-22T23:52:20", "url": "https://files.pythonhosted.org/packages/75/df/7d6d6e41ae80677c17482c26c46561875f2eb4452ad0bb3be7891d67a863/django-site-basics-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "70463fd35eb0cce53b569e63a3e1dceb", "sha256": "4865e3abc4305ea6c6cf0b7a13779f4de0cd5513ba4c15e6b92a59900f381d67" }, "downloads": -1, "filename": "django_site_basics-0.2.5-py2.7.egg", "has_sig": false, "md5_digest": "70463fd35eb0cce53b569e63a3e1dceb", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 752869, "upload_time": "2013-09-22T23:52:36", "url": "https://files.pythonhosted.org/packages/a0/8f/adec4feb45c2ee55dce4c9a7f3f06b889b79046b81b995f537638ec83395/django_site_basics-0.2.5-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "0dbc048ed25f1a408fa1d8f8d87107f5", "sha256": "da11c6f2338f613497ae79592eea382f90b93a536a7b58bb6aa2ec03f6e91a9d" }, "downloads": -1, "filename": "django-site-basics-0.2.5.tar.gz", "has_sig": false, "md5_digest": "0dbc048ed25f1a408fa1d8f8d87107f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 630645, "upload_time": "2013-09-22T23:52:20", "url": "https://files.pythonhosted.org/packages/75/df/7d6d6e41ae80677c17482c26c46561875f2eb4452ad0bb3be7891d67a863/django-site-basics-0.2.5.tar.gz" } ] }