semvec/pypi-packages huggingface dataset:
rebecca.menu 0.1
UNKNOWN
License: MIT

.. contents::

.. image:: https://travis-ci.org/rebeccaframework/rebecca.menu.png?branch=master
   :target: https://travis-ci.org/rebeccaframework/rebecca.menu

Introduction
======================

``rebecca.menu`` is component for `pyramid <http://pypi.python.org/pypi/pyramid>`_, that provides management of menu urls.

Install
--------------------

You can install ``rebecca.menu`` with pip.

::

  $ pip install rebecca.menu


Usage
====================

``rebecca.menu`` provides include hook.::

    config.include('rebecca.menu')

register and use Menu
--------------------------------------------------------

To add menu, use ``add_route_menu`` directive.::

    config.add_route('menu1', '/menus/menu1')
    config.add_route('menu2', '/menus/menu2')
    config.add_route_menu(menu_name="system", route_name="menu1", display_name="system menu item1")

Or use ``route_menu_config`` decorator.::

    @route_menu_config('system')
    class SystemMenu3(object):
        route_name="menu3"
        display_name = "system menu item3"


To get menu, use ``get_menu`` API::

    from rebecca.menu import get_menu

    def menu(request):
        system_menu = get_menu(request, system)
        return dict(menu=system_menu)

``get_menu`` returns the object that provides ``rebecca.menu.interfaces.IMenu``.
``IMenu`` has a property named ``menu_items`` that is list including ``IMenuItem``.

``IMenuItem`` has some property, ``display_name``, ``name`` and ``url``.
Maybe you use menu items in template such as below::

    <ul class="nav">
    %for m in system_menu.menu_items:
        <li><a href="${m.url}">${m.display_name}</a></li>
    %endfor
    </ul>

Permissions
-----------------------------------

Registering menu with permission ::

    @route_menu_config('system')
    class SystemMenu3(object):
        route_name="menu3"
        display_name = "system menu item3"
        permission = 'menu3-permission'

``get_menu`` check permission of request with ``has_permission``,
causes that menu_items includes menu items passed permission check.

Matchdict
----------------------------------------

If route has placeholder, the menu url fills values from ``request.matchdict``.
::

        config.add_route("menu1", 'menus/menu1/{testing_vars}')
        menu_factory.add_item(route_name="menu1", display_name="testing-menu1")

When matchdict has values for ``testing_vars`` as "that-is-testing", menu1's url is "menus/menu1/that-is-testing".

Contributors
============

- Atsushi Odagiri, Original Author

Changelog
==================

0.1 (2013-10-13)
--------------------

- first release
django-twemoir 0.2.1
Twitter data models
License: MIT
Keywords: python django twitter data model sync

TWEMOIR
=======

Twitter memoirs: Stateful Django models encapsulating Twitter data (using Bootstrap, no less).

![twemoir admin](http://i.imgur.com/MCPMY.jpg)

![editing a twitter user Oauth2 keyset](http://i.imgur.com/wPMwE.jpg)
ipython_doctester 0.3.0
Run doctests in individual IPython Notebook cells
License: MIT

=================
ipython_doctester
=================

Lets you run the doctests of a single class or function at a time.  Useful for 
tutorials based on the IPython Notebook, using doctests for student feeback.

Install with ``pip install ipython_doctester``, or 
navigate to this directory and run::

    python setup.py install

Use
===

Run ``ipython notebook``, then start your notebook with this import::

    In [1]: from ipython_doctester import test

In each subsequent cell, set up objects with their doctests, and with absent 
(or flawed) function bodies, and decorate them with @test::

    In [2]: @test
            def square(x):
                '''
                >>> f(2)
                4
                '''
                
Tests will run on each cell as it is executed.

If you want to track students' progress through a notebook in a 
classroom setting, you can; see 
http://ipython-docent.appspot.com/
for instructions.

If no doctests are found in the function's docstring, the program will look 
for a file ``./docstrings/<function name>.txt``, append that to the function's
docstring, and check for doctests again.  This can be used to keep the presence
of the docstrings from confusing students.

Development
===========

https://github.com/catherinedevlin/ipython_doctester

Thanks to
=========

Brian Granger for technical advice