{ "info": { "author": "Orne Brocaar, Camilo Nova", "author_email": "camilo.nova@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP" ], "description": "Django Google Tools\n===================\n\n.. image:: https://secure.travis-ci.org/camilonova/django-google-tools.png?branch=master\n :alt: Build Status\n :target: http://travis-ci.org/camilonova/django-google-tools\n\nDjango app for managing Google Analytics and Site Verification codes.\n\n\nInstallation\n------------\n\nIn your virtualenv just type::\n\n $ pip install django-google-tools\n\n\nConfiguration\n-------------\n\nIn Django 1.6 the sites framework is disabled by default, for enable the sites\nframework in Django 1.6 follow the steps 1, 2 and 3:\n\n1. Add 'django.contrib.sites' to your INSTALLED_APPS setting.\n\n2. Define a SITE_ID setting::\n\n SITE_ID = 1\n\n3. Run in your shell::\n\n $ ./manage.py syncdb\n\n4. Add ``googletools`` to your ``INSTALLED_APPS``::\n\n INSTALLED_APPS = (\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n ...\n 'googletools',\n ...\n )\n\n5. Run in your shell::\n\n $ ./manage.py syncdb\n\nOr if you are using ``South``::\n\n $ ./manage.py migrate\n\nIf you have in your settings ``DEBUG=True`` googletools will not render anything\nbecause this library is inteded mostly to use on production sites, if you want to\nchange this behavior you can set ``GOOGLETOOLS_ENABLED=True`` in your settings\nfile. Just for clarification it is defined like this::\n\n GOOGLETOOLS_ENABLED = not DEBUG\n\nThis means, by default googletools will be enabled when ``DEBUG=False``.\n\n\nManagement\n----------\n\nGo to the admin interface. When correctly installed, you will find the\n*Googletools* app. There you can manage your Google Analytics and Site Verification\ncodes.\n\n\nTemplatetags\n------------\n\nIn order to use the googletools in your templates you'll have to load the templatetags.\n\n``{% load googletools %}``\n\nUse ``{% analytics_code %}`` for inserting your Analytics code.\n\nUse ``{% site_verification_code %}`` for inserting your site verification code.\n\nTemplatetags will return an empty string if they are not configured for the current site.\n\nThe template should look like::\n\n {% load googletools %}\n \n
\n \n ...\n \n {% site_verification_code %}\n\n \n\n {% analytics_code %}\n \n \n