This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This page will talk about the EPFL templates for django. These templates have been developed in order to reflect the “web2010” Link graphical chart of EPFL.

To use these templates, add django_epfl to your INSTALLED_APPS. Then you can inherit the base template by adding {% extends 'django_epfl/base.html' %} in a template.

List of available blocks

All the following blocks are in the EPFL template. Each block is displayed in its context and has its role description next to it.

  • <html>
    • <head>
      • additional_meta : Place here all the additional meta in the HTML form
      • additional_links : Same for the links to additional resources
      • additional_css : Here for the CSS (don’t place CSS under additional_links to improve clarity and template inheritance)
      • additional_js : All JS that need to be loaded in the head section
      • page_title : If using the title var is not the best option, you can use this block to set the page title
    • </head>
    • <body>
      • header : Here is the header include. By default, the header is in English. (file: django_epfl/template_inc/header.en.html) To see the other options, take a look the package doc<http://kis-doc.epfl.ch/django/template.html#change-header-language-search-option>.
      • <div id=”main content”>
        • breadcrumbs : It is where you will put the “EPFL > Project > Section” navigation style.
        • languages : Links in the top right corner that permit the user to switch between languages.
        • <h1>
          • title : Area for the title of the project and (in general) its acronym.
        • </h1>
        • main-navigation : Area that contains droplists and all the navigation for the project.
        • tools : Space for the tools like RSS feed button, share button and so on.
        • <div id=”content”>
          • content : Contains the main content for the page.
        • </div>
        • <div id=”right-col”>
          • right_column : Contains the secondary content in the right column. If empty, the template will automatically switch to 1-column mode and the “right-col” div will not be displayed.
        • </div>
        • footer : Area for general contents like contact link, copyright, …
      • </div>
      • additional_js_ajax : Place JS that don’t need to be loaded first.
    • </body>
  • </html>

List of available variables

For the moment, only the title var (representing the page title) is available. Care to not be confused with the title block which is the big black title on the page.

Note

If title var is set, page_title block won’t be displayed.

Use the EPFL error pages

In order to handle EPFL 404 error page, you have to modify your file views.py and put in it this:

from django.shortcuts import render_to_response

def error404(request):
    return render_to_response('django_epfl/errors/404.fr.html')

Then, in your urls.py:

from django.conf.urls.defaults import handler404

handler404 = 'django_site.views.error404'

To handle the 500 error, it is the same logic. Since errors like 503 are not natively supported, you will have to create and raise it in your code. Some explanations on how to do this here.

https://docs.djangoproject.com/en/1.3/ref/request-response/#ref-httpresponse-subclasses can help you too if you need to return some HttpResponse with a defined status code.

Note

The 404 and 500 error pages won’t be displayed if DEBUG is set to True.

Change header language / search option

You can change the header with the header block.

There are four different headers available in the templates/template_inc dir:
  • header.fr.html
  • header.en.html
  • header-no-local-search.fr.html
  • header-no-local-search.en.html

Obviously, in the header name, fr means French and en English. The no-local-search version of the header does not include the search option “On this site”.

Release History

Release History

1.5.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_epfl-1.5.6.tar.gz (52.0 kB) Copy SHA256 Checksum SHA256 Source Oct 15, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting