예제 #1
0
파일: conf.py 프로젝트: pcon-world/pcon_db
# The encoding of source files.
#source_encoding = 'utf-8'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'openPLM'
copyright = u'2010-2013, LinObject'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = get_version().split(' ')[0]
# The full version, including alpha/beta/rc tags.
release = get_version()

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = "fr"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of documents that shouldn't be included in the build.
#unused_docs = []
예제 #2
0
파일: base.py 프로젝트: amarh/openPLM
            except (ControllerError, ValueError) as exc:
                ctx = init_ctx("-", "-", "-")
                ctx["message"] = _(str(exc))
                return render_to_response("error.html", ctx, context_instance=RequestContext(request))
            except Http404:
                raise
            except StandardError:
                if settings.DEBUG:
                    raise
            return HttpResponseServerError()
        return wrapper
    if func:
        return decorator(func)
    return decorator

_version = get_version()
def init_ctx(init_type_, init_reference, init_revision):
    """
    Initiate the context dictionnary we used to transfer parameters to html pages.
    Get type, reference and revision of an object and return a dictionnary with them
    plus current time, :attr:`settings.THUMBNAILS_URL` the begining of the URL to
    get thumbnail of a file and :attr:`settings.LANGUAGES`.

    Example::

        >>> init_ctx('BiosOs','BI-0044','1.4.3')
        {'THUMBNAILS_URL': '/media/thumbnails',
         'object_reference': 'BI-0044',
         'object_revision': '1.4.3',
         'object_type': 'BiosOs'}
예제 #3
0
파일: conf.py 프로젝트: amarh/openPLM
# The encoding of source files.
#source_encoding = 'utf-8'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'openPLM'
copyright = u'2010-2013, LinObject'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = get_version().split(' ')[0]
# The full version, including alpha/beta/rc tags.
release = get_version()

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = "fr"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of documents that shouldn't be included in the build.
#unused_docs = []
예제 #4
0
파일: base.py 프로젝트: pcon-world/pcon_db
                    context_instance=RequestContext(request))
            except Http404:
                raise
            except StandardError:
                if settings.DEBUG:
                    raise
            return HttpResponseServerError()

        return wrapper

    if func:
        return decorator(func)
    return decorator


_version = get_version()


def init_ctx(init_type_, init_reference, init_revision):
    """
    Initiate the context dictionnary we used to transfer parameters to html pages.
    Get type, reference and revision of an object and return a dictionnary with them
    plus current time, :attr:`settings.THUMBNAILS_URL` the begining of the URL to
    get thumbnail of a file and :attr:`settings.LANGUAGES`.

    Example::

        >>> init_ctx('BiosOs','BI-0044','1.4.3')
        {'THUMBNAILS_URL': '/media/thumbnails',
         'object_reference': 'BI-0044',
         'object_revision': '1.4.3',