Git Product home page Git Product logo

kotti_navigation's Introduction

Kotti

pypi license

build_status_stable_postgresql build_status_stable_mysql build_status_stable_sqlite

Kotti is a high-level, Pythonic web application framework based on Pyramid and SQLAlchemy. It includes an extensible Content Management System called the Kotti CMS (see below).

Kotti is most useful when you are developing applications that

  • have complex security requirements,
  • use workflows, and/or
  • work with hierarchical data.

Built on top of a number of best-of-breed software components, most notably Pyramid and SQLAlchemy, Kotti introduces only a few concepts of its own, thus hopefully keeping the learning curve flat for the developer.

Kotti CMS

Kotti CMS is a content management system that's heavily inspired by Plone. Its main features are:

  • User-friendliness: editors can edit content where it appears; thus the edit interface is contextual and intuitive
  • WYSIWYG editor: includes a rich text editor
  • Responsive design: Kotti builds on Bootstrap, which looks good both on desktop and mobile
  • Templating: you can extend the CMS with your own look & feel with almost no programming required
  • Add-ons: install a variety of add-ons and customize them as well as many aspects of the built-in CMS by use of an INI configuration file
  • Security: the advanced user and permissions management is intuitive and scales to fit the requirements of large organizations
  • Internationalized: the user interface is fully translatable, Unicode is used everywhere to store data

License

Kotti is offered under the BSD-derived Repoze Public License.

Install

See installation instructions.

Support and Documentation

Read Kotti's extensive documentation on Read the Docs.

If you have questions or need help, you can post on our mailing list / forum or join us on IRC: #kotti on irc.freenode.net.

If you think you found a bug, open an issue on our Github bugtracker.

Development

build_status_master_postgresql build_status_master_mysql build_status_master_sqlite

coveralls codacy codeclimate scrutinizer requires.io

gh_forks gh_stars

Kotti is actively developed and maintained. We adhere to high quality coding standards, have an extensive test suite with high coverage and use continuous integration.

Contributions are always welcome, read our contribution guidelines and visit our Github repository.

kotti_navigation's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kotti_navigation's Issues

Uncaught TypeError: $(...).chosen is not a function

Trying out version 0.5 I get below error on line 248 when visiting @@settings view.
Line 248 is $('.i-can-haz-chzn-select').chosen();.

Uncaught TypeError: $(...).chosen is not a function
(anonymous function) @ @@settings:248
fire @ jquery.js:1037
self.fireWith @ jquery.js:1148
jQuery.extend.ready @ jquery.js:433
completed @ jquery.js:103

has runtime dependency on pytest

Because it includes tests in the package and a configurator scan tries to import the test modules, resulting in this:

  File "/Users/marca/dev/git-repos/Kotti/kotti/__init__.py", line 163, in main
    config = base_configure(global_config, **settings)
  File "/Users/marca/dev/git-repos/Kotti/kotti/__init__.py", line 217, in base_configure
    config.include(module)
  File "/Users/marca/dev/git-repos/pyramid/pyramid/config/__init__.py", line 783, in include
    c(configurator)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/kotti_navigation/__init__.py", line 73, in include_navigation_widget_left
    include_navigation_widget(config, 'left')
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/kotti_navigation/__init__.py", line 66, in include_navigation_widget
    include_view(config)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/kotti_navigation/__init__.py", line 61, in include_view
    config.scan(__name__)
  File "/Users/marca/dev/git-repos/pyramid/pyramid/config/__init__.py", line 959, in scan
    ignore=ignore)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/venusian/__init__.py", line 205, in scan
    __import__(modname)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/kotti_navigation/tests/test_navigation.py", line 2, in <module>
    from kotti.testing import (
  File "/Users/marca/dev/git-repos/Kotti/kotti/testing.py", line 13, in <module>
    from pytest import mark
ImportError: No module named pytest

Add screenshot to README.rst

When I first saw kotti_navigation, I was curious what it did, but I was discouraged by the long prose description and ended up not taking advantage of it for a while.

I think a screenshot would greatly help sell it.

navigation slot should be totally omit if there is no items in the context

If there is no items in the context, we still get a blank "place holder" in the page, that is mostly we don't need. I add several lines in the Navigation class, like below:

class Navigation(object):

def __init__(self, context, request):
    self.context = context
    self.request = request
    self.location = 'top'
    self.slot = getattr(self.request, 'kotti_slot', None)

    # added by georgehu, to cancel the slot totally when we get a
    # empty list of items
    items = get_children(self.context, self.request, self.location)

    if self.slot is not None and items:
        self.location = self.slot

`__import__() argument 1 must be string, not module` using kotti_navigation git master with kotti master

I get __import__() argument 1 must be string, not module when I hit http://127.0.0.1:5000/

  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/pyramid_chameleon/zpt.py", line 10, in renderer_factory
    return renderer.template_renderer_factory(info, ZPTTemplateRenderer)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/pyramid_chameleon/renderer.py", line 140, in template_renderer_factory
    return lookup(info)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/pyramid_chameleon/renderer.py", line 115, in __call__
    filename)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1127, in resource_filename
    self, resource_name
  File "/Users/marca/dev/git-repos/pyramid/pyramid/config/assets.py", line 31, in get_resource_filename
    filename = overrides.get_filename(resource_name)
  File "/Users/marca/dev/git-repos/pyramid/pyramid/config/assets.py", line 125, in get_filename
    result = source.get_filename(path)
  File "/Users/marca/dev/git-repos/pyramid/pyramid/config/assets.py", line 224, in get_filename
    if pkg_resources.resource_exists(self.package, path):
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1116, in resource_exists
    return get_provider(package_or_requirement).has_resource(resource_name)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/pkg_resources/__init__.py", line 396, in get_provider
    __import__(moduleOrReq)
TypeError: __import__() argument 1 must be string, not module
[marca@marca-mac2 ~VIRTUAL_ENV]$ pip freeze 2> /dev/null | grep -i kotti
-e [email protected]:Kotti/Kotti.git@d1ff5594bf9ec05e20f68c2343fb12278fc47f6b#egg=Kotti-master
kotti-gabriel===0.1.dev0dev-r0
-e [email protected]:Kotti/kotti_navigation.git@44ebbc939ccc7126951de65ca94d122b83876eb5#egg=kotti_navigation-master
kotti-settings==0.2
kotti-tinymce==0.5.1

Static files do not get installed when installing from checkout

When installing from checkout like this
pip install https://github.com/Kotti/kotti_navigation/archive/0.3.1.zip
static files are not being installed.
The reason is they are absent from wheel which is being built in the process of installation by pip. The root cause is a mess in python world in regard to packaging data. See pypa/sampleproject#30 and links therein.
The solution seems to be using MANIFEST.in file.

Make new release?

The latest stable version (0.3.1) does not work with newer Kotti versions where there's not found view added. It looks this was fixed in master (by adding and root in lineage_items at

if not include_root and root in lineage_items:
).
Could we please have a stable release with this fix?

Traceback with 0.3 (latest from PyPI)

I pip installed kotti_navigation and added it to kotti.configurators but didn't configure where to show the nav yet. When I view a page, I get:

  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/chameleon/py26.py", line 5, in lookup_attr
    return getattr(obj, key)
  File "/Users/marca/dev/git-repos/Kotti/kotti/views/util.py", line 101, in __getattr__
    for snippet in objectevent_listeners(event):
  File "/Users/marca/dev/git-repos/Kotti/kotti/events.py", line 169, in __call__
    results.append(handler(event))
  File "/Users/marca/dev/git-repos/Kotti/kotti/views/slots.py", line 105, in <lambda>
    lambda ev: _render_view_on_slot_event(view_name, ev, params))
  File "/Users/marca/dev/git-repos/Kotti/kotti/views/slots.py", line 79, in _render_view_on_slot_event
    result = render_view(context, view_request, view_name)
  File "/Users/marca/dev/git-repos/pyramid/pyramid/view.py", line 114, in render_view
    iterable = render_view_to_iterable(context, request, name, secure)
  File "/Users/marca/dev/git-repos/pyramid/pyramid/view.py", line 87, in render_view_to_iterable
    response = render_view_to_response(context, request, name, secure)
  File "/Users/marca/dev/git-repos/pyramid/pyramid/view.py", line 60, in render_view_to_response
    return view(context, request)
  File "/Users/marca/dev/git-repos/pyramid/pyramid/config/views.py", line 352, in rendered_view
    result = view(context, request)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/kotti_navigation/views.py", line 125, in navigation_widget
    items = get_children(root, request)
  File "/Users/marca/python/virtualenvs/kotti_inventorysvc/lib/python2.7/site-packages/kotti_navigation/views.py", line 26, in get_children
    if c.in_navigation and c.__class__ not in ex_cts]
TypeError: 'in <string>' requires string as left operand, not DeclarativeMeta

 - Expression: "page_slots.left"
 - Filename:   ... marca/dev/git-repos/Kotti/kotti/templates/view/master.pt
 - Location:   (line 40: col 28)
 - Source:     tal:condition="page_slots.left"
                              ^^^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
               renderer_name: kotti:templates/view/document.pt
               req: <Request - at 0x1090ce190>
               request: <Request - at 0x1090ce190>
               renderer_info: <RendererHelper - at 0x107a65a10>
               api: <TemplateAPI - at 0x1091024d0>
               context: <Host my_host at 0x1090e2ad0>
               view: <function view at 0x106cd07d0>

Switching configuration to use kotti_settings

With the 0.4 version kotti_navigation brings new functionality, first of all the possibility to use the navigation in multiple locations at the same time. as @geojeff (who build this) already points out in the irc the configuration to handle all features is now somewhat complicated.

I suggest to use kotti_settings (https://github.com/j23d/kotti_settings). You can see, how settings are integrated within Kotti e.g. in kotti_tagcloud (https://github.com/j23d/kotti_tagcloud). It should be possible to bring all needed configuration in one settings page, but I hadn't checked this deeply.

Any opinions or suggestions on this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.