Skip to content

Commit

Permalink
plone6 (draft)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico committed Jul 17, 2024
1 parent 2f989bc commit 50c156e
Show file tree
Hide file tree
Showing 91 changed files with 1,548 additions and 1,327 deletions.
15 changes: 7 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its
# containing dir.
Expand All @@ -9,8 +8,9 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import sys


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -42,18 +42,18 @@
master_doc = "index"

# General information about the project.
project = u"rer.ufficiostampa"
copyright = u"RedTurtle Technology (cekk)"
author = u"RedTurtle Technology (cekk)"
project = "rer.ufficiostampa"
copyright = "RedTurtle Technology (cekk)"
author = "RedTurtle Technology (cekk)"

# 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 = u"3.0"
version = "3.0"
# The full version, including alpha/beta/rc tags.
release = u"3.0"
release = "3.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -234,4 +234,3 @@

# If false, no module index is generated.
# latex_domain_indices = True

19 changes: 0 additions & 19 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,19 +0,0 @@
[check-manifest]
ignore =
*.cfg
.coveragerc
.editorconfig
.gitattributes

[isort]
# for details see
# http://docs.plone.org/develop/styleguide/python.html#grouping-and-sorting
force_alphabetical_sort = True
force_single_line = True
lines_after_imports = 2
line_length = 200
not_skip = __init__.py

[flake8]
exclude = bootstrap.py,docs,*.egg.,omelette
max-complexity = 15
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Installer for the rer.ufficiostampa package."""

from setuptools import find_packages
Expand All @@ -24,11 +23,12 @@
"Environment :: Web Environment",
"Framework :: Plone",
"Framework :: Plone :: Addon",
"Framework :: Plone :: 5.2",
"Framework :: Plone :: 6.0",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
],
Expand All @@ -48,13 +48,13 @@
package_dir={"": "src"},
include_package_data=True,
zip_safe=False,
python_requires="==2.7, >=3.6",
python_requires=">=3.8",
install_requires=[
"setuptools",
# -*- Extra requirements: -*-
'ftfy==4.4.3;python_version<="2.7"',
"collective.z3cform.jsonwidget",
"collective.dexteritytextindexer",
# "collective.dexteritytextindexer",
"itsdangerous>=1.1.0",
"plone.api>=1.8.4",
"plone.app.dexterity",
Expand Down
3 changes: 1 addition & 2 deletions src/rer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# -*- coding: utf-8 -*-
__import__('pkg_resources').declare_namespace(__name__)
__import__("pkg_resources").declare_namespace(__name__)
2 changes: 1 addition & 1 deletion src/rer/ufficiostampa/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
"""Init and utils."""

from zope.i18nmessageid import MessageFactory


Expand Down
10 changes: 7 additions & 3 deletions src/rer/ufficiostampa/behaviors/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
xmlns="http://namespaces.zope.org/zope"
xmlns:plone="http://namespaces.plone.org/plone"
xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone">
i18n_domain="plone"
>

<include package="plone.behavior" file="meta.zcml"/>
<include
package="plone.behavior"
file="meta.zcml"
/>

<plone:behavior
name="rer.ufficiostampa.basic"
title="Basic Title and description metadata for Comunicati"
description="Adds title and description fields."
provides=".metadata.IBasicComunicati"
factory=".metadata.BasicComunicati"
provides=".metadata.IBasicComunicati"
for="plone.dexterity.interfaces.IDexterityContent"
/>

Expand Down
10 changes: 5 additions & 5 deletions src/rer/ufficiostampa/behaviors/metadata.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from collective import dexteritytextindexer
from plone.app.dexterity import _
from plone.app.dexterity.behaviors.metadata import IBasic, Basic
from plone.app.dexterity import searchable
from plone.app.dexterity.behaviors.metadata import Basic
from plone.app.dexterity.behaviors.metadata import IBasic
from plone.autoform import directives as form
from plone.autoform.interfaces import IFormFieldProvider
from zope import schema
Expand All @@ -10,10 +10,10 @@

@provider(IFormFieldProvider)
class IBasicComunicati(IBasic):
title = schema.Text(title=_(u"label_title", default=u"Title"), required=True)
title = schema.Text(title=_("label_title", default="Title"), required=True)
form.widget("title", rows=2)

dexteritytextindexer.searchable("title")
searchable("title")


class BasicComunicati(Basic):
Expand Down
Loading

0 comments on commit 50c156e

Please sign in to comment.