Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
60c8df8
basic setup
lenadax Jan 26, 2026
54cbaa8
add modal-xl class to rendered Ajax Tile Errors
lenadax Jan 26, 2026
b3cf76e
fix ajax_playground
lenadax Jan 26, 2026
d781fd3
add example to change navbar height variable via css
lenadax Jan 26, 2026
3be549a
extend ajax message example
lenadax Jan 27, 2026
76d8427
allow title for ajax_message and ajax_status_message
lenadax Jan 27, 2026
7e50d7b
populate with examples. create landing page. improve views and fix is…
lenadax Jan 27, 2026
7330a43
allow css for ContentViewAction
lenadax Jan 27, 2026
e5ba614
sidebar_right: tutorial WIP
lenadax Jan 27, 2026
92c8420
add dynamic layout configuration. further demo improvements
lenadax Jan 29, 2026
a2bf46e
allow translatable titles for root nodes
lenadax Jan 29, 2026
0a26ca5
add center_content and sidebar static flags.
lenadax Jan 29, 2026
346ac15
add more settings to layout demo.
lenadax Jan 29, 2026
26499e0
add missing uncompiled scss and js
lenadax Jan 29, 2026
c78fe42
improve layout, include pygments WIP
lenadax Jan 29, 2026
acffd57
improve AjaxPlayground examples
lenadax Jan 30, 2026
d76d7c9
cone.example layouting adjustments. include pygments themes for light…
lenadax Jan 30, 2026
e0ceee0
update mainmenu active item color for dark mode
lenadax Jan 30, 2026
4ce226a
example test suite WIP
lenadax Jan 30, 2026
60aee31
Fix ExampleSettingsForm: Add missing EditFormTarget
lenadax Jan 30, 2026
cc68f88
fix python tests
lenadax Jan 30, 2026
bc6ad8f
collapse static sidebars by default. add limit_page_width flag.
lenadax Feb 2, 2026
4c39017
Update layout changes
lenadax Feb 2, 2026
e4628e3
reduce bulk. improve examples
lenadax Feb 2, 2026
0829280
fix mainmenu dropdown z-index. remove bs spacer.
lenadax Feb 3, 2026
d8228b8
merge 2.0
lenadax Feb 3, 2026
9e39ee9
Merge branch '2.0' into example
lenadax Feb 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Docs for 2.0 TODO
=================

[ ] fix quickstart documentation - unreleased packages, test all approaches
[ ] seperate docs for integrated and seperate plugin
[ ] clear up confusion around quickstart (maybe rename "creating a plugin", "create an app")
72 changes: 68 additions & 4 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependency. Add the following to ``pyproject.toml``.
.. code-block:: toml

[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools>=61.0,<81"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -75,7 +75,8 @@ dependency. Add the following to ``pyproject.toml``.
2. Virtual Environment
----------------------

Create a virtual environment and install the package:
Create a virtual environment and install the package.
From the cone.app root directory, run:

.. code-block:: sh

Expand All @@ -99,6 +100,13 @@ Alternatively, using ``uv`` (faster):
uv pip install -e .


.. Error::

If your package depends on unreleased versions of other ``cone.*`` packages,
ensure to install those packages first in editable mode before installing
your package. See :ref:`Developing on unreleased versions <developing_unreleased>`.


3. Application Configuration
----------------------------

Expand Down Expand Up @@ -352,11 +360,16 @@ into Ajax SSR can be found :ref:`here <ajax_custom_javascript>`.
------------------

After creating the virtual environment as described in section 2, run the
application:
application from the ``cone.app`` root directory:

.. code-block:: sh

./venv/bin/pserve example.ini
./venv/bin/pserve examples/cone.example/example.ini

.. .. XXX: document running from cone.example directory
.. .. code-block:: sh

.. ./venv/bin/pserve example.ini

The application is now available at ``localhost:8081``.

Expand Down Expand Up @@ -385,3 +398,54 @@ To set up mxmake for your plugin:
mxmake init

See the ``cone.app`` repository for an example mxmake configuration.


.. _developing_unreleased:

Advanced: Developing with unreleased package versions
-----------------------------------------------------

When developing your plugin with unreleased versions of ``cone.*`` packages,
you need to ensure that those packages are installed in your virtual environment.

To do so, first checkout and install the unreleased packages in sources/:

.. code-block:: sh

# cone.app root directory
make install

Follow up by creating your virtual environment as described in section 2:

.. code-block:: sh

# cone.app root directory
set -e
rm -rf ./venv/
python3 -m venv venv
source ./venv/bin/activate

Then, install the unreleased application packages in editable mode:

.. code-block:: sh

# cone.app root directory
# venv
pip install -e sources/cone.tile
# add other unreleased cone.* packages as needed

# Then install cone.app
pip install -e .

Finally, install your application package in editable mode:

.. code-block:: sh

# cone.app root directory
# venv
pip install -e examples/cone.example

# exit the venv
deactivate

You are now ready to run your application as described in section 9.
23 changes: 11 additions & 12 deletions examples/cone.example/example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ pyramid.debug_templates = true
pyramid.default_locale_name = en

# available languages
cone.available_languages = de, en
cone.available_languages = en, de

# cone.app admin user and password
#cone.admin_user =
#cone.admin_password =
cone.admin_user = admin
cone.admin_password = admin
#cone.authenticator =

# cone.app auth tkt settings
cone.auth_secret = 12345
Expand All @@ -39,21 +40,19 @@ cone.auth_secret = 12345
#cone.auth_path =
#cone.auth_wild_domain =

# application main template
#cone.main_template = package.browser:templates/main.pt

# plugins to be loaded
cone.plugins = cone.example

# application root node settings
#cone.root.node_factory = package.root_node_factory
cone.root.title = cone.example
#cone.root.default_child = example
#cone.root.default_content_tile =
#cone.root.default_child = example # XXX throws error
#cone.root.default_content_tile =
#cone.root.mainmenu_empty_title = false

ugm.backend = file
ugm.users_file = var/ugm/users
ugm.groups_file = var/ugm/groups
ugm.roles_file = var/ugm/roles
ugm.datadir = var/ugm/data

[pipeline:main]
pipeline =
example
example
27 changes: 27 additions & 0 deletions examples/cone.example/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[build-system]
requires = ["setuptools>=61.0,<81"] # XXX: depends on PIL
build-backend = "setuptools.build_meta"

[project]
name = "cone.example"
version = "0.1"
description = "Example cone plugin"
dependencies = [
"waitress",
"cone.app",
"pygments"
]

[project.optional-dependencies]
test = [
"pytest",
"zope.pytestlayer"
]

[tool.setuptools.packages.find]
where = ["src"]

[tool.pytest.ini_options]
consider_namespace_packages = true
addopts = ["--import-mode=importlib"]
pythonpath = "src"
22 changes: 0 additions & 22 deletions examples/cone.example/setup.py

This file was deleted.

1 change: 0 additions & 1 deletion examples/cone.example/src/cone/__init__.py

This file was deleted.

56 changes: 46 additions & 10 deletions examples/cone.example/src/cone/example/__init__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,63 @@
from cone.app import main_hook
from cone.app import register_config
from cone.app import register_entry
from cone.example.browser import _configure_layout_configs
from cone.example.browser import configure_resources
from cone.example.model import EntryFolder
from cone.example.model import LiveSearch
from pyramid.session import SignedCookieSessionFactory


@main_hook
def example_main_hook(config, global_config, settings):
"""Function which gets called at application startup to initialize
this plugin.
"""Application startup hook.

Registers all entry nodes, settings, search adapters, static resources,
and scans browser packages for tiles and views.
"""
# register live search adapter
# Configure session factory for storing user preferences
session_factory = SignedCookieSessionFactory('cone.example.secret')
config.set_session_factory(session_factory)

# Register live search adapter
config.registry.registerAdapter(LiveSearch)

# add translation
# Add translation directories
config.add_translation_dirs('cone.example:locale/')

# register plugin entry nodes
for i in range(1, 6):
register_entry(f'folder_{i}', EntryFolder)
# Register entry nodes in the main menu
from cone.example.layout.model import LayoutDemo
from cone.example.wiki.model import Wiki
from cone.example.ajax.browser import AjaxPlayground
from cone.example.populate import populate_wiki

def make_wiki():
wiki = Wiki()
populate_wiki(wiki)
return wiki

register_entry('layout', LayoutDemo)
register_entry('wiki', make_wiki)
register_entry('ajax_playground', AjaxPlayground)

# static resources
# Register settings node
from cone.example.settings.model import ExampleSettings
register_config('example_settings', ExampleSettings)

# Static resources
configure_resources(config, settings)

# scan browser package
# Register layout configs (deferred to avoid circular imports)
_configure_layout_configs()

# add static view for example images
config.add_static_view(
name='example-images',
path='cone.example.browser:static/images'
)

# Scan browser packages for tile and view registrations
config.scan('cone.example.browser')
config.scan('cone.example.wiki.browser')
config.scan('cone.example.layout.browser')
config.scan('cone.example.settings.browser')
config.scan('cone.example.ajax.browser')
Empty file.
Loading
Loading