Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Support latest onegov.search release
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krienbühl committed Apr 3, 2019
1 parent 5fbb4ce commit f185f9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog
---------

- Support latest onegov.search release.
[href]

0.45.0 (2019-02-21)
~~~~~~~~~~~~~~~~~~~

Expand Down
21 changes: 1 addition & 20 deletions onegov/form/models/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,12 @@
from onegov.form.parser import parse_form
from onegov.form.utils import hash_definition
from onegov.form.extensions import Extendable
from onegov.search import ORMSearchable
from sqlalchemy import Column, Text
from sqlalchemy.orm import object_session, relationship
from sqlalchemy_utils import observes


class SearchableDefinition(ORMSearchable):
""" Defines how the definitions are searchable. For now, submissions are
not searched as they are usually accessed through the ticket, at least in
onegov.town. If other modules need this, it can be added here and
onegov.town can decied not to search for submissions.
"""
es_id = 'name'
es_public = True

es_properties = {
'title': {'type': 'localized'},
'lead': {'type': 'localized'},
'text': {'type': 'localized_html'}
}


class FormDefinition(Base, ContentMixin, TimestampMixin, SearchableDefinition,
Extendable):
class FormDefinition(Base, ContentMixin, TimestampMixin, Extendable):
""" Defines a form stored in the database. """

__tablename__ = 'forms'
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def get_long_description():
'onegov.core>=0.70.5',
'onegov.file',
'onegov.pay',
'onegov.search',
'phonenumbers',
'pyparsing>=2.3.1',
'pyyaml',
Expand Down

0 comments on commit f185f9d

Please sign in to comment.