{ "info": { "author": "Information Systems Group, University Information Services, University of Cambridge", "author_email": "information-systems@ucs.cam.ac.uk", "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" ], "description": "Introduction\n============\n\nThis app allows you to include the University of Cambridge's Project\nLight theme to your Django apps in a very easy way.\n\nUsage\n-----\n\nYo only need to add to your settings.py this application.\n\n.. code:: python\n\n INSTALLED_APPS = (\n ...\n 'ucamprojectlight',\n ...\n )\n\nCreate a template that extends ucamprojectlight.html and use the\ncorresponding blocks to modify the bits of the template you need. You\ncan create a global template with the global customizations for your\nproject and then extend all the templates from this global template, or\nyou can simply extend the ucamprojectlight.html template in any of your\ntemplates and apply different customizations to different blocks. It is\nworth remembering that if you are using the first option and creating a\nglobal customize template and extend this template in all your other\ntemplates, that you can modify the blocks that you modified in your\nglobal template in all the temples that extend the global one.\n\n.. code:: python\n\n {% extends 'ucamprojectlight.html' %}\n\nCustomization using blocks\n--------------------------\n\n- campl\\_block\\_head: This block rewrites the whole head tag of the\n template.\n- head\\_title: The full name of the site that will be shown in the\n browser toolbar.\n- additional\\_head: This block is reserverd to load extra css or js in\n case you are using extensions to the base Project Light app template.\n- app\\_head: If your application is using their own javascript and\n stylesheets, load them using this block.\n- campl\\_page\\_header: This block rewrites the whole page header of the\n template.\n- all\\_breadcrumbs: This block rewrites the whole breadcrumb section in\n case you do not want to include it in your app.\n- static\\_breadcrumbs: This block includes the fixed breadcrumbs of\n your application (those that will be always shown independent from\n the page/view). The default is:\n\n .. code:: html\n\n
  • \n University of Cambridge\n
  • \n
  • \n My Django app\n
  • \n\n- site\\_name: The full name of the site to show it in the header of the\n page.\n- search\\_bar: Overwrite this block in case you do not want a search\n box in your app.\n- search\\_action: action propierty of the form tag of the search box.\n Shown inside search\\_bar block.\n- campl\\_tabs\\_header: Overwrite this block in case that your app does\n not use tabs neither have a subtitle in the page header.\n- subtitle\\_div: Overwrite this block in case you do not want to show a\n subtitle in the header. The subtitle is only shown if the\n campl\\_tabs\\_header has not been overwritten.\n- subtitle: A subtitle to be shown below the site\\_name in the page\n header. Shown inside subtitle\\_div block.\n- tabs: Overwrite this block in case that your app does not use tabs.\n- page\\_content: In this block the page content should be written if\n you do not want to use the contant\\_column blocks.\n- content\\_column\\_1..content\\_column\\_12: Project light is responsive\n and uses a 12 columns grid system (like twitter bootstrap). The\n django-ucamprojectlight offers 12 blocks in case you want to use up\n to 12 different columns. If you just want to use n columns because\n columns are wider than 1 unit, you can use the n blocks wanted.\n- local\\_footer: This block rewrites the whole page footer. Half of the\n footer is ocuppied by the variable blurb, the other half is divided\n into two, footer1 and footer2.\n- blurb: The text shown in the footer. It uses the first half of the\n width of the footer.\n- footer1: Usually used for the Help link.\n- footer2: Usually used for the Privacy & cookie policy link.\n- global\\_footer: This block contains the whole global footer.\n- campl\\_foot\\_js: A section a the end of the body tag to load lazy\n javascript files.\n\nBreadcrumbs\n-----------\n\nThe default template include breadcrumbs to help with the navigation in\nthe page. Application-specific breadcrumbs are handled by a dictionary\nvariable \"breadcrumbs\" passed to the template like:\n\n.. code:: python\n\n breadcrumbs = {}\n breadcrumbs[0] = dict(name='Page of my cool app', url='http://my.cool.app/page/')\n breadcrumbs[1] = dict(name='Subpage of my cool app', url='http://my.cool.app/page/subthingy/')\n ...\n return render_to_response('ucamprojectlight.html', {'breadcrumbs':breadcrumbs, ...})\n\nTabs\n----\n\nIf your Project Light page uses tabs as part of its subheading (like the\n\"search\" page) define them in a python file, along with their\ndestinations, and then add this python file to\nTEMPLATE\\_CONTEXT\\_PROCESSORS in your settings.py\n\n.. code:: python\n\n def tabs(request):\n tabs = {}\n tabs[0] = dict(name=\"Main\",url='index')\n tabs[1] = dict(name=\"Example\",url='example')\n tabs[2] = dict(name=\"Test\",url='test')\n return {'tabs': tabs}\n\n.. code:: python\n\n TEMPLATE_CONTEXT_PROCESSORS = TEMPLATE_CONTEXT_PROCESSORS + ('myapp.ucamprojectlight_context_processors.tabs',)", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://git.csx.cam.ac.uk/x/ucs/raven/django-ucamprojectlight.git", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-ucamprojectlight", "package_url": "https://pypi.org/project/django-ucamprojectlight/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-ucamprojectlight/", "project_urls": { "Homepage": "https://git.csx.cam.ac.uk/x/ucs/raven/django-ucamprojectlight.git" }, "release_url": "https://pypi.org/project/django-ucamprojectlight/1.1/", "requires_dist": null, "requires_python": null, "summary": "A Django module to use the template system of the University of Cambridge: Project light", "version": "1.1" }, "last_serial": 4129187, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "1a8486ac4fade7830987fbdc2d471e91", "sha256": "4adf15c11120d995b1b2f60c51152a45ef936e34e75dc79c0474dcd5bd6636d0" }, "downloads": -1, "filename": "django-ucamprojectlight-1.1.tar.gz", "has_sig": false, "md5_digest": "1a8486ac4fade7830987fbdc2d471e91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1610341, "upload_time": "2014-09-10T12:27:52", "url": "https://files.pythonhosted.org/packages/ba/96/2cd360578bd9ae16f561cef2f407487b3c927804e9ee0213070f31c6f236/django-ucamprojectlight-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1a8486ac4fade7830987fbdc2d471e91", "sha256": "4adf15c11120d995b1b2f60c51152a45ef936e34e75dc79c0474dcd5bd6636d0" }, "downloads": -1, "filename": "django-ucamprojectlight-1.1.tar.gz", "has_sig": false, "md5_digest": "1a8486ac4fade7830987fbdc2d471e91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1610341, "upload_time": "2014-09-10T12:27:52", "url": "https://files.pythonhosted.org/packages/ba/96/2cd360578bd9ae16f561cef2f407487b3c927804e9ee0213070f31c6f236/django-ucamprojectlight-1.1.tar.gz" } ] }