Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fresh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
cubes
fresh
Commits
6a6a97aba6cf
Commit
6a6a97aba6cf
authored
15 years ago
by
Sylvain Thénault
Browse files
Options
Downloads
Patches
Plain Diff
autocomplete_initfuncs is now expected as widget argument
parent
838ad9dc61ef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
entities.py
+1
-5
1 addition, 5 deletions
entities.py
views/__init__.py
+5
-4
5 additions, 4 deletions
views/__init__.py
with
6 additions
and
9 deletions
entities.py
+
1
−
5
View file @
6a6a97ab
"""
this contains the template-specific entities
'
classes
"""
from
cubes.expense.entities
import
Expense
as
BaseExpense
,
ExpenseLine
as
BaseExpenseLine
class
Expense
(
BaseExpense
):
autocomplete_initfuncs
=
{
'
spent_for
'
:
'
get_concerned_by
'
}
from
cubes.expense.entities
import
ExpenseLine
as
BaseExpenseLine
class
ExpenseLine
(
BaseExpenseLine
):
...
...
This diff is collapsed.
Click to expand it.
views/__init__.py
+
5
−
4
View file @
6a6a97ab
...
...
@@ -5,10 +5,11 @@
from
cubicweb.web.formwidgets
import
RestrictedAutoCompletionWidget
from
cubicweb.web.views
import
basecontrollers
uicfg
.
autoform_section
.
tag_subject_of
((
'
Expense
'
,
'
spent_for
'
,
'
*
'
),
'
primary
'
)
uicfg
.
autoform_field_kwargs
.
tag_subject_of
((
'
Expense
'
,
'
spent_for
'
,
'
*
'
),
{
'
widget
'
:
RestrictedAutoCompletionWidget
})
_afs
=
uicfg
.
autoform_section
_afs
.
tag_subject_of
((
'
Expense
'
,
'
spent_for
'
,
'
*
'
),
'
primary
'
)
_affk
=
uicfg
.
autoform_field_kwargs
_affk
.
tag_subject_of
((
'
Expense
'
,
'
spent_for
'
,
'
*
'
),
{
'
widget
'
:
RestrictedAutoCompletionWidget
(
autocomplete_initfunc
=
'
get_concerned_by
'
)})
@monkeypatch
(
basecontrollers
.
JSonController
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment