Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
re2o
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
57021ad5
Commit
57021ad5
authored
Nov 07, 2017
by
Maël Kervella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Texte d'aide sur l'utilisation de termes de recherche exacts
parent
536081da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
search/forms.py
search/forms.py
+15
-4
No files found.
search/forms.py
View file @
57021ad5
...
...
@@ -45,21 +45,32 @@ CHOICES_AFF = (
)
def
initial_choices
(
c
):
def
initial_choices
(
c
hoice_set
):
"""Return the choices that should be activated by default for a
given set of choices"""
return
[
i
[
0
]
for
i
in
c
]
return
[
i
[
0
]
for
i
in
c
hoice_set
]
class
SearchForm
(
Form
):
"""The form for a simple search"""
q
=
forms
.
CharField
(
label
=
'Search'
,
max_length
=
100
)
q
=
forms
.
CharField
(
label
=
'Recherche'
,
help_text
=
(
'Utilisez « » et «,» pour spécifier différents mots, «"query"» '
'pour une recherche exacte et «
\\
» pour échapper un caractère.'
),
max_length
=
100
)
class
SearchFormPlus
(
Form
):
"""The form for an advanced search (with filters)"""
q
=
forms
.
CharField
(
label
=
'Search'
,
label
=
'Recherche'
,
help_text
=
(
'Utilisez « » et «,» pour spécifier différents mots, «"query"» '
'pour une recherche exacte et «
\\
» pour échapper un caractère.'
),
max_length
=
100
,
required
=
False
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment